-
Notifications
You must be signed in to change notification settings - Fork 130
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
utils: Fix numeric date handling #841
utils: Fix numeric date handling #841
Conversation
The intent is unclear and tests still pass without it.
…adata being dropped
Codecov Report
@@ Coverage Diff @@
## master #841 +/- ##
==========================================
+ Coverage 33.83% 33.91% +0.07%
==========================================
Files 41 41
Lines 5905 5906 +1
Branches 1507 1507
==========================================
+ Hits 1998 2003 +5
+ Misses 3824 3821 -3
+ Partials 83 82 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @victorlin! This looks great.
Description of proposed changes
Currently, date format handling is inaccurate (#747) as numeric dates are thrown out:
augur/augur/utils.py
Lines 115 to 119 in a85194c
This change ensures numeric dates are processed, and that non-negative integers are evaluated as year-only ambiguous dates.
Also including a few refactors:
raise_error
parameter. The intent is unclear and tests still pass without it.return
instead of an intermediate variable.Related issue(s)
Fixes #747.
Testing