-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils: Fix numeric date handling (#841)
Currently, date format handling is inaccurate (#747) as numeric dates are thrown out: https://github.com/nextstrain/augur/blob/a85194c243db8d85e6fc06ea2d614e0b6095a0c4/augur/utils.py#L115-L119 This change ensures numeric dates are processed, and that non-negative integers are evaluated as year-only ambiguous dates. Also including a few refactors: - Remove `raise_error` parameter. The intent is unclear and tests still pass without it. - Use `return` instead of an intermediate variable. Testing: - Add broken tests and verify new changes pass. - Fix inaccurate existing tests.
- Loading branch information
Showing
3 changed files
with
54 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters