Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## victorlin/refine-config #2041 +/- ##
===========================================================
+ Coverage 74.54% 74.56% +0.01%
===========================================================
Files 86 86
Lines 10874 10882 +8
Branches 2123 2123
===========================================================
+ Hits 8106 8114 +8
Misses 2373 2373
Partials 395 395 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
84a4cf1 to
cf04a1a
Compare
cf04a1a to
83f7695
Compare
83f7695 to
3ae0ba4
Compare
3ae0ba4 to
471f841
Compare
4f26088 to
279a49d
Compare
279a49d to
02ba681
Compare
7312956 to
db08e96
Compare
db08e96 to
bade472
Compare
There was a problem hiding this comment.
Looking at the addition of color_by_metadata in nextstrain/measles#148 and this PR, I think the --config option for export really highlights the need for cleaning up + documenting the interactions between the Auspice config JSON and the CLI/YAML options. However, that's a bigger project that I don't want to block this work...
For now, maybe there's a way to add the description from the argument group to the schema (with minor edits to refer to config YAML options):
Lines 912 to 915 in 0d28749
There was a problem hiding this comment.
The auspice-config JSON is (conceptually!) the config YAML we're now introducing elsewhere, and in the long run we could/should probably replace the auspice-config JSON with a --config YAML. Pragmatically, here are the CLI args not currently exposed in the JSON:
Files:
- tree, metadata, output, node-data # part of the typical snakemake pipeline
- description markdown, warning text # should be in auspice-config json:
- colors TSV, auspice-config JSON
Misc:
- minification
- validation mode
- metadata strain column / delimeters
If we put the description markdown & warning text files into the auspice-config JSON, then we're down to a handful of possible options we (the workflow) want to expose as user-config. I think these are feasible to do the old-fashioned way. Which is to say, short term I don't think we need a config YAML at the moment and long term the config YAML can replace the auspice config JSON
There was a problem hiding this comment.
Because the JSON is nested, a full switch from JSON to YAML is not possible with the ConfigArgParse implementation, just like how augur subsample --config must be handled separately. I think we all agree the full switch is the best solution. We have the following short term options:
- Leave
exportas CLI + JSON only, with some CLI options exposed through YAML on the workflow level. - Expose all CLI options through YAML with
--config. JSON is still the only option fordata_provenance, etc.
f9e1672 is (2). It allows for more flexibility, and our workflow config is a half-baked implementation of this (nextstrain/measles#148 baked it a little more). But it is also confusing to have both --config and --auspice-config under augur export v2 --help.
(1) makes export v2 a loner when everything else has been moved over.
Maybe it's reasonable to block the --config work on the full switch from JSON to YAML for export v2.
There was a problem hiding this comment.
Because the JSON is nested, a full switch from JSON to YAML is not possible with the ConfigArgParse implementation, just like how augur subsample --config must be handled separately.
Oh hmm, does this mean we would also remove the CLI options for params that are provided via the YAML?
An alternative to (1) (similar to what James is proposing), is making sure all Auspice configs are available via the JSON. Then in the YAML exclude all display configuration options that are not auspice_config, i.e. disabling CLI overrides in workflows that use --config. In practice, this would probably look like replacing nextstrain/measles#148 with multiple layered JSONs that are provided via auspice_config.
There was a problem hiding this comment.
Oh hmm, does this mean we would also remove the CLI options for params that are provided via the YAML?
We could keep them. It won't be as simple as with ConfigArgParse, but we could apply the overrides in a similar fashion as the existing implementation.
Alternatively, we could implement something like Snakemake's --config to allow generic overrides via CLI, but that would be a new pattern and we'd need another name for the option.
bade472 to
087da7d
Compare
087da7d to
130695c
Compare
130695c to
70a97ed
Compare
Adds the --config option to augur ancestral using patterns from augur refine's --config option. Updated help text to reference both CLI and YAML syntax, now that both are valid options. Added code to handle enums in the schema generating script, since enums are used in ancestral and not refine.
Change the default from False to implicit None, since the option should take a file path not boolean.
The default is already rendered in both CLI help text and docs.
Adds the --config option to augur align using patterns from augur refine's --config option.
Adds the --config option to augur mask using patterns from augur refine's --config option.
Adds the --config option to augur tree using patterns from augur refine's --config option. Updated help text to reference both CLI and YAML syntax, now that both are valid options.
Adds the --config option to augur translate using patterns from augur refine's --config option. Updated help text to reference both CLI and YAML syntax, now that both are valid options.
This keeps the test focused on command-specific functionality rather than parser specifics which change over time.
Adds the --config option to augur traits using patterns from augur refine's --config option.
Adds the --config option to augur frequencies using patterns from augur refine's --config option. The schema generating script was updated to handle the min/max_date options which take either a string or number.
70a97ed to
e2737ae
Compare
Description of proposed changes
Adds the --config option to align, ancestral, frequencies, mask, traits, translate, and tree using patterns from #2040.
Docs preview: https://nextstrain--2041.org.readthedocs.build/projects/augur/en/2041/usage/cli/ancestral.html#configuration
Review threads
get_referenced_filesfunction? yesChecklist