-
Notifications
You must be signed in to change notification settings - Fork 128
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
Schema updates #727
Schema updates #727
Conversation
Codecov Report
@@ Coverage Diff @@
## master #727 +/- ##
==========================================
+ Coverage 31.51% 32.63% +1.12%
==========================================
Files 41 41
Lines 5674 5972 +298
Branches 1373 1487 +114
==========================================
+ Hits 1788 1949 +161
- Misses 3812 3942 +130
- Partials 74 81 +7
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.
This looks good to me, @jameshadfield. I made a few clarifying comments inline, but we could probably just merge this as is, if you like.
It might be nice to add some minimal doctests to the new functions before merging even if it's just to get the practice of implementing tests in this module. We can chat about this offline though.
These updates allow specification of custom legend info via the auspice config JSON which is schema-validated and exported. This functionality is utilised by auspice 2.26.0 (see nextstrain/auspice#1340 for more).
a3e4be7
to
1f271fc
Compare
Auspice 2.26.0 can now use custom colors for continuous scales via the `scale` property on such a coloring; previously custom colors were only available for discrete scales (see nextstrain/auspice#1340 for more). Here we extend the schema for the auspice config JSON and update `augur export` to allow export of such scale information for continuous colorings. Previously, scale information (for discrete scales) could only come from a colors TSV file supplied via `augur export --colors <TSV>`. We now allow this to be specified in the auspice config JSON, and use this information preferentially over the TSV.
This sets up a template for testing `augur export v2` which is rather complex in the different ways it can be called. The tests here are only intended to cover features introduced by this PR.
1f271fc
to
73649be
Compare
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.
This looks excellent, @jameshadfield. The new tests helped me understand this PR, but they also provide great documentation for the future. The mocked up tree data is especially handy for similar types of tests in the future.
"legend": [ | ||
{"value": 1, "display": "0-2", "bounds": [-1,2]}, | ||
{"value": 3, "display": "3-5", "bounds": [2,5]}, | ||
{"value": 5, "display": ">5", "bounds": [5, 10]} | ||
], | ||
"scale": [ | ||
[1, "#081d58"], | ||
[3, "#1d91c0"], | ||
[5, "#c7e9b4"] | ||
] |
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.
This is really helpful documentation of how to use these new features! I will probably refer to these tests as I learn how to use these features.
Updates
augur export v2
and the relevant schemas to allow us to use features introduced in Auspice v2.26.0.See commit messages for more details.