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

schemas: Add missing display_default properties for Auspice config v2 #916

Merged
merged 2 commits into from
May 12, 2022

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented May 6, 2022

Resolves #911 which noted
"language". In confirming that, I cross-referenced Auspice's view
settings doc¹ and code² which revealed "sidebar" and "panels" too.
Clarifies the purpose of the two different "panels" keys.

¹ https://docs.nextstrain.org/projects/auspice/en/stable/advanced-functionality/view-settings.html#dataset-json-configurable-defaults
² https://github.com/nextstrain/auspice/blob/ce8380f7/src/actions/recomputeReduxState.js#L699-L718

Testing

Not yet tested. Will look at CI tests and maybe add a test case too.

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good from reading the diff. Scanning the languages auspice supports I think they're all BCP-47, although this was never specified explicitly.

CI is failing, though it's not immediately obvious why...

	ERROR: 'nDescendents' is not one of ['clade', 'aa', 'none']. Trace: ... - properties - display_defaults - properties - branch_label - enum

tsibley added 2 commits May 12, 2022 14:33
…g and dataset)

Resolves <#911> which noted
"language".  In confirming that, I cross-referenced Auspice's view
settings doc¹ and code² which revealed "sidebar" and "panels" too.
Clarifies the purpose of the two different "panels" keys.

¹ https://docs.nextstrain.org/projects/auspice/en/stable/advanced-functionality/view-settings.html#dataset-json-configurable-defaults
² https://github.com/nextstrain/auspice/blob/ce8380f7/src/actions/recomputeReduxState.js#L699-L718
…nd dataset

Reconciles the two schemas with some minor improvements + a bug fix.
While the enum values in one schema were valid, they're not the _only_
valid values.

This display_default refers to the keys of branch_attr.labels objects on
nodes, so I reused the former's pattern of allowed characters.  I think
that pattern may be too restrictive and not accurately describe what
Auspice will handle, but that's a broader issue with other parts of the
schema too and something to investigate for another day.

Hint that there's a special-cased value ("none") by mentioning it
explicitly in the pattern.
@tsibley tsibley force-pushed the trs/schema/missing-auspice-display-defaults branch from 0c09991 to 65ebea1 Compare May 12, 2022 21:35
@tsibley
Copy link
Member Author

tsibley commented May 12, 2022

Sorry, yeah, wasn't quite ready for review. Auspice langs should be BCP-47 (and appear so to me). Repushed with a fix addressing the schema for branch_labels in both the export config and exported dataset. We'll see if CI passes.

@tsibley tsibley marked this pull request as ready for review May 12, 2022 21:37
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #916 (65ebea1) into master (0db0a41) will increase coverage by 0.36%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #916      +/-   ##
==========================================
+ Coverage   34.66%   35.02%   +0.36%     
==========================================
  Files          42       42              
  Lines        6018     6189     +171     
  Branches     1542     1605      +63     
==========================================
+ Hits         2086     2168      +82     
- Misses       3859     3940      +81     
- Partials       73       81       +8     
Impacted Files Coverage Δ
augur/filter.py 65.58% <0.00%> (-4.80%) ⬇️
augur/parse.py 61.44% <0.00%> (-3.12%) ⬇️
augur/io.py 98.36% <0.00%> (-1.64%) ⬇️
augur/__init__.py 31.08% <0.00%> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0db0a41...65ebea1. Read the comment docs.

@tsibley tsibley requested a review from jameshadfield May 12, 2022 22:47
@tsibley tsibley merged commit 6e6d4ce into master May 12, 2022
@tsibley tsibley deleted the trs/schema/missing-auspice-display-defaults branch May 12, 2022 23:43
@victorlin victorlin added this to the Major release 16.0.0 milestone Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Augur export v2 JSON schema validation fails on Auspice config file that uses display_defaults.language
3 participants