Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

augur curate format-dates: accept masked dates #1501

Merged
merged 5 commits into from
Jul 1, 2024

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Jun 28, 2024

Description of proposed changes

Add DEFAULT_EXPECTED_DATE_FORMATS to augur curate format-dates. These are default date formats that the command should parse without additional input from the user, which includes the ISO 8601 date format and it's various masked forms.

Also includes some minor restructuring of tests for format-dates to be more modular cram tests.

Related issue(s)

Resolves #1496

Checklist

  • Checks pass (seasonal-flu CI expected to fail due to unrelated issue)
  • If making user-facing changes, add a message in CHANGES.md summarizing the changes in this PR

@joverlee521 joverlee521 requested a review from a team June 28, 2024 22:44
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.53%. Comparing base (a9d1b3a) to head (25f4993).
Report is 234 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1501   +/-   ##
=======================================
  Coverage   69.53%   69.53%           
=======================================
  Files          73       73           
  Lines        7788     7789    +1     
  Branches     1905     1905           
=======================================
+ Hits         5415     5416    +1     
  Misses       2087     2087           
  Partials      286      286           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joverlee521 joverlee521 force-pushed the format-dates-accept-mask branch 2 times, most recently from 95df70f to 2cd7111 Compare July 1, 2024 18:05
Moving to a subdirectory with the intent of separating the tests into
more modular tests and adding new tests.
Shows the current behavior of how augur curate format-dates can handle
already masked dates.
These are default date formats that the command should parse without
additional input from the user, which includes the ISO 8601 date format
and it's various masked forms.

Resolves #1496
@joverlee521
Copy link
Contributor Author

Rebased on to master to resolve merge conflicts in the changelog.

@joverlee521 joverlee521 merged commit 403f46f into master Jul 1, 2024
17 of 19 checks passed
@joverlee521 joverlee521 deleted the format-dates-accept-mask branch July 1, 2024 23:14
joverlee521 added a commit that referenced this pull request Oct 17, 2024
Because of the added default values in
<#1501>, this is no longer a
required argument.

The alternative is to explicitly mark this option as `required=True`,
but that's a breaking change that can be considered later. Currently,
if `--expected-date-formats` is not provided and dates match the
defaults, then it's a no-op. If dates do not match the default formats,
it will raise a loud error so the user can add the custom formats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

augur curate format-dates should recognize masked dates internally
3 participants