Skip to content

Make 'dlm metrics' a subcommand group (M13.3)#14

Merged
mfwolffe merged 5 commits into
trunkfrom
fix/m13-3-metrics-positional
May 3, 2026
Merged

Make 'dlm metrics' a subcommand group (M13.3)#14
mfwolffe merged 5 commits into
trunkfrom
fix/m13-3-metrics-positional

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

Summary

Audit 13 M13.3: `dlm metrics PATH --run-id 1` errored with
"Missing argument 'PATH'" because click's group dispatch couldn't
disambiguate a positional-then-option from a subcommand-then-args
when the group had both a callback positional AND a registered
`watch` subcommand. `dlm metrics --run-id 1 PATH` (option before
positional) was the audit's workaround.

The fix makes `show` an explicit subcommand alongside `watch`. The
ambiguity goes away. Both arg orders now parse cleanly.

Breaking change: `dlm metrics PATH` becomes `dlm metrics show
PATH`. `dlm metrics watch PATH` is unchanged. CHANGELOG entry +
docs/cookbook + README updated.

Test plan

  • 4 new CLI unit tests cover the new shape and both arg orders
  • Pre-existing tests still pass
  • ruff + mypy clean

@mfwolffe mfwolffe merged commit e40b42a into trunk May 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants