-
Notifications
You must be signed in to change notification settings - Fork 129
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
Port merge-user-metadata to augur curate #1495
Merged
Merged
Conversation
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
Noticed while I was removing executable permission for new script that this file still had executable permissions.
Copy the `merge-user-metadata` script from nextstrain/ingest in preparation for porting the functionality into the new `augur curate apply-record-annotations` command. Copied from <https://github.com/nextstrain/ingest/blob/c94d78d1f38b99e893007a76526f3d3824ecded0/merge-user-metadata>
Includes changes to make the copied script work as a new Augur subcommand and fit in with the codebase: - remove unneeded executable permissions and shebang - add as a subcommand of augur curate - replace main entrypoint with register_parser() and run() - let augur curate handle records I/O - use AugurError and print_err()
The `annotating-new-fields` test reveals undesired behavior which will be addressed in the next commit.
I don't think we should support adding new fields with record annotations because it's hard to ensure that the new field gets added across all records that are streamed through the command. This is a deviation from the original nextstrain/ingest script, but I think a necessary one to avoid bugs in the final output metadata.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1495 +/- ##
==========================================
+ Coverage 69.15% 69.28% +0.13%
==========================================
Files 70 71 +1
Lines 7694 7727 +33
Branches 1887 1895 +8
==========================================
+ Hits 5321 5354 +33
Misses 2087 2087
Partials 286 286 ☔ View full report in Codecov by Sentry. |
genehack
approved these changes
Jun 28, 2024
genehack
approved these changes
Jun 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Porting over
merge-user-metadata
from nextstrain/ingest toaugur curate apply-record-annotations
.Includes a functional change to skip annotations for fields that do not exist in the record because it's hard to ensure that the new field gets added across all records that are streamed through the command.
This is a deviation from the original nextstrain/ingest script, but I think a necessary one to avoid bugs in the final output metadata.
Related issue(s)
Resolves #1482
Checklist