Write job-specific subsampling config files - #91
Conversation
60da2c3 to
5ea23e9
Compare
e751070 to
8c07397
Compare
5ea23e9 to
be0930b
Compare
be0930b to
e62cea2
Compare
2e547d7 to
e3a2110
Compare
e62cea2 to
6015973
Compare
joverlee521
left a comment
There was a problem hiding this comment.
Overall changes LGTM, small comment about invalid build errors.
e3a2110 to
de3e323
Compare
6015973 to
75a08a2
Compare
| print(dedent(f"""\ | ||
| ERROR: The following names in 'builds' are not valid: | ||
|
|
||
| {indented_list(invalid_builds, " ")} | ||
|
|
||
| Valid builds are: | ||
|
|
||
| {indented_list(VALID_BUILDS, " ")} | ||
| """), file=sys.stderr) | ||
| exit(1) |
There was a problem hiding this comment.
non-blocking nit
Should we start standardizing the use of InvalidConfigError that is included in the vendored config.smk?
| print(dedent(f"""\ | |
| ERROR: The following names in 'builds' are not valid: | |
| {indented_list(invalid_builds, " ")} | |
| Valid builds are: | |
| {indented_list(VALID_BUILDS, " ")} | |
| """), file=sys.stderr) | |
| exit(1) | |
| raise InvalidConfigError(dedent(f"""\ | |
| The following names in 'builds' are not valid: | |
| {indented_list(invalid_builds, " ")} | |
| Valid builds are: | |
| {indented_list(VALID_BUILDS, " ")} | |
| """)) |
Changes output to
$ nextstrain build phylogenetic/ --config builds='["foo"]'
InvalidConfigError in file "/nextstrain/build/phylogenetic/rules/config.smk", line 30:
The following names in 'builds' are not valid:
foo
Valid builds are:
genome
N450
File "/nextstrain/build/phylogenetic/rules/config.smk", line 54, in <module>
File "/nextstrain/build/phylogenetic/rules/config.smk", line 15, in main
File "/nextstrain/build/phylogenetic/rules/config.smk", line 30, in validate_configThere was a problem hiding this comment.
+1 for standardizing, but I prefer the simpler error without stack trace at the bottom. How about catching InvalidConfigError from main()? I've done this in force-push.
75a08a2 to
7a5c779
Compare
7a5c779 to
c4ecba6
Compare
de3e323 to
a062d7d
Compare
|
GitHub did something weird here. I wanted to swap the order of #90 and #91 since it makes more sense, so I rebased locally and force-pushed. It looks like GitHub detected this as #91 being "merged" into #90, so I'll just roll with it... it aligns more with nextstrain/WNV#116 anyways. |
Note
These changes are now part of #90 (efe1483...c4ecba6) – see #91 (comment)
Description of proposed changes
This prevents unrelated config changes from triggering a re-run of augur subsample.
Related issue(s)
Checklist