-
Notifications
You must be signed in to change notification settings - Fork 130
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
Measurements schema #859
Measurements schema #859
Conversation
Codecov Report
@@ Coverage Diff @@
## master #859 +/- ##
==========================================
- Coverage 34.32% 34.31% -0.02%
==========================================
Files 41 41
Lines 5931 5937 +6
Branches 1518 1518
==========================================
+ Hits 2036 2037 +1
- Misses 3813 3818 +5
Partials 82 82
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.
LGTM! Just one typo and a suggested change to avoid unnecessary patternProperties
use.
augur/validate.py
Outdated
@@ -132,6 +139,8 @@ def register_arguments(parser): | |||
subparsers.add_parser("auspice-config-v2", help="validate auspice config intended for `augur export v2`") \ | |||
.add_argument('config_json', metavar='JSON', help="auspice config JSON") | |||
|
|||
subparsers.add_parser("measurements", help="validate measuremens JSON intended for auspice measurements panel") \ |
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.
measuremens → measurements
augur/data/schema-measurements.json
Outdated
"patternProperties": { | ||
"^.*$": { | ||
"description": "Metadata associated with the measurement. Only metadata properties included in the groupings config will be included in the group by dropdown, but all metadata properties will be available as a filter", | ||
"type": ["string", "number", "boolean"] | ||
} | ||
} |
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.
"patternProperties": { | |
"^.*$": { | |
"description": "Metadata associated with the measurement. Only metadata properties included in the groupings config will be included in the group by dropdown, but all metadata properties will be available as a filter", | |
"type": ["string", "number", "boolean"] | |
} | |
} | |
"additionalProperties": { | |
"description": "Metadata associated with the measurement. Only metadata properties included in the groupings config will be included in the group by dropdown, but all metadata properties will be available as a filter", | |
"type": ["string", "number", "boolean"] | |
} |
Based on the data structure that Auspice version 2.34.0 expects for the measurements sidecar JSON.
Validates the provided measurements JSON against the JSON schema `augur/data/schema-measurements.json`
8817c9b
to
bcd36df
Compare
Add measurements JSON schema and add as a subcommand to
augur validate
.Schema file name matches the file name for the redirect in nextstrain/nextstrain.org#481
I'm expecting the new
augur measurements
command to be a bigger change requiring additional discussion and reviews, so I'll leave that for a later PR.