augur
augur copied to clipboard
augur curate format-dates
Context
Augur commands expect dates to be in ISO 8601 format so we should provide a robust way for users to convert any date format to ISO 8601. We've used many ways to tackle this date formatting issue throughout the Nextstrain ecosystem:
- using manual annotations in fauna.vdb.upload
- using pandas date parser in augur.parse.fix_dates
- using Python
datetimemodule in ncov-ingest/transform - using Python
datetimemodule in monkeypox/ingest
See #860 for more details of the general augur curate design/structure.
Description
augur curate format-dates should adopt the latest iteration of robust date formatting from monkeypox/ingest. We should keep masking incomplete dates with XX as the default behavior since this is expected in other Augur commands. However, we should probably provide a flag to allow users to skip masking if desired.
There various other improvements that can be added as well:
- catch escaped directives edge cases (see monkeypox/ingest post-merge review comment)
- improve readability by explicitly listing directive combinations (see monkeypox/ingest post-merge review comment)
- add support for platform-specific directives (see monkepox/ingest post-merge review comment)