-
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
Validation regex pattern for branch_label
display default values in Auspice config JSON is too strict
#1661
Comments
Use subclade as default branch label in private builds, since Augur's validation of the Auspice config JSON doesn't allow default branch labels to have spaces, underscores, or hyphens [1]. [1] nextstrain/augur#1661
The "^(none|[a-zA-Z0-9]+)$" # current display_default.branch_label
"^[a-zA-Z0-9]+$": { # currently allowed keys for labels as set on node.branch_attrs which was the intention described in the commit message which updated the display default. (The addition of However these regexes are overly restrictive - Auspice can (I think) display any string as label names/values: Although the URL query may need some attention -- the above is So I think the issue here requires a few things:
|
I'd vote for at least hyphen, underscore, and spaces to be added to what's supported now. Is there any reason not to allow anything besides |
☝️ |
Current Behavior
For seasonal flu builds, we need to annotate alternate clade labels including one called
proposed_subclade
. We want to show these proposed subclades by default in some analyses, so we need to set thebranch_label
key in the Auspice config JSON'sdisplay_defaults
to theproposed_subclade
field.When I do this,
augur export v2
fails during validation of the Auspice config JSON with the following error:Expected behavior
Validation should allow hyphens, underscores, and spaces in the branch label. For example,
proposed_subclade
,proposed-subclade
, andProposed subclade
are all valid branch labels for the final Auspice JSON, but they are only disallowed when selected as display defaults.Possible solution
Update the regex in the Auspice config JSON schema to be:
^(none|[-_ a-zA-Z0-9]+)$
.The text was updated successfully, but these errors were encountered: