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

Invalid none key #1113

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Invalid none key #1113

merged 3 commits into from
Jan 23, 2025

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Dec 13, 2022

Description of proposed changes

  • Updates the export v2 schema to make "none" an invalid key for colorings and branch labels.
  • Updates export v2 to warn about invalid "none" key and ignore it in exports.
  • Does not include changes in export v2 for branch labels to ignore the "none" key because it is currently hard-coded to only export "clades" and "aa" as branch labels. We should ignore "none" keys for branch labels once we allow for arbitrary labels in Allow users to specify arbitrary branch & clade labels #728.

Related issue(s)

Related to nextstrain/auspice#1618

Testing

  • Added new functional test for export v2 using a "none" coloring key.

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

@joverlee521 joverlee521 requested a review from a team December 13, 2022 22:16
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.94%. Comparing base (a78b2e1) to head (54cc39f).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1113      +/-   ##
==========================================
+ Coverage   72.89%   72.94%   +0.04%     
==========================================
  Files          79       79              
  Lines        8308     8315       +7     
  Branches     1696     1698       +2     
==========================================
+ Hits         6056     6065       +9     
+ Misses       1963     1962       -1     
+ Partials      289      288       -1     

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

augur/data/schema-export-v2.json Outdated Show resolved Hide resolved
@tsibley
Copy link
Member

tsibley commented Jan 28, 2023

Looks good, needs a changelog entry though.

@genehack
Copy link
Contributor

@joverlee521 how would you feel about rebasing this and adding a Changelog entry so it can get merged? Still seems like a worthwhile change, yeah?

@joverlee521
Copy link
Contributor Author

Rebased and added changelog entry. I've also made additional changes to make "none" an invalid --metadata-columns value since they are added directly as node_attrs that can clash with Auspice's use of "none" to hide tip labels.

This is ready for a fresh review after ~2 years 😅

CHANGES.md Outdated Show resolved Hide resolved
Make "none" an invalid key for "tree.branch_attrs.labels",
"tree.node_attrs", and "colorings" because the "none" key is used
internally in Auspice to hide branch labels¹ and tip labels².

¹ https://github.com/nextstrain/auspice/blob/a4487b59989270b860d2508636f09ebdbc50d0f8/src/util/treeJsonProcessing.js#L56
² nextstrain/auspice#1618
Update `augur export v2` to warn about the invalid metadata column and
coloring "none" key and skip it in export so that it does not clash with
Auspice's internal use of "none" to hide tip labels.¹

¹ <nextstrain/auspice#1618>
@joverlee521
Copy link
Contributor Author

Did one final rebase to ensure the changelog isn't messed up after the latest release. Will merge once the tests pass.

@joverlee521 joverlee521 merged commit 73f1fa9 into master Jan 23, 2025
36 checks passed
@joverlee521 joverlee521 deleted the invalid-none-key branch January 23, 2025 00:17
@victorlin victorlin added the breaking Makes a backwards incompatible change and should wait for major release label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Makes a backwards incompatible change and should wait for major release
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

4 participants