Skip to content

Commit 6af2c78

Browse files
committed
version: declutter pathogen workflow outputs
Declutter the version output for pathogen worklfows but still keeping a simple list of pathogen workflow names for discoverability. Based on feedback <#472 (comment)>
1 parent b178fa8 commit 6af2c78

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

nextstrain/cli/command/version.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,11 @@ def run(opts):
6868
print(" " + name)
6969
for version in versions.values():
7070
is_default = version == defaults.get(name)
71-
print(" " + str(version) + (f"={version.url or ''}" if opts.verbose else ""), "(default)" if is_default else "")
71+
compatible_workflows = version.compatible_workflows("nextstrain run")
72+
print(" " + str(version) + (f"={version.url or ''}" if opts.verbose else ""),
73+
"(default)" if is_default else "",
74+
f"{sorted(compatible_workflows)!r}" if compatible_workflows else "")
7275
if opts.verbose:
7376
print(" " + str(version.path))
74-
75-
if compatible_workflows := version.compatible_workflows("nextstrain run"):
76-
print(" " + "`nextstrain run` compatible workflows:")
77-
for workflow in compatible_workflows:
78-
print(" " + workflow)
79-
else:
80-
print(" " + "No workflows listed, please refer to pathogen docs.")
8177
else:
8278
print(" (none)")

0 commit comments

Comments
 (0)