Skip to content

fix: move --update-<importer> args into their service option groups - #165

Open
Sanjays2402 wants to merge 1 commit into
apache:masterfrom
Sanjays2402:fix/update-args-service-groups
Open

fix: move --update-<importer> args into their service option groups#165
Sanjays2402 wants to merge 1 commit into
apache:masterfrom
Sanjays2402:fix/update-args-service-groups

Conversation

@Sanjays2402

Copy link
Copy Markdown

Closes #120

--update-grafana, --update-postgres and --update-bigquery are added directly to the analyze subparser, so argparse lists them under the generic options: section instead of next to the service options they configure.

The subparser already inherits the Grafana/PostgreSQL/BigQuery groups from the shared parent parser, so this adds a small config.argument_group() helper that looks up an existing group by title and registers each flag on the matching group. Parsing behaviour is unchanged — only the help layout differs. The golden help assertions in tests/cli_help_test.py are updated accordingly and fail without the fix.

The --update-grafana, --update-postgres and --update-bigquery options were
added directly to the analyze subparser, so argparse placed them in the
generic 'options:' section of 'otava analyze --help' rather than alongside
the service options they belong to.

The subparser already inherits the Grafana/PostgreSQL/BigQuery option groups
from the shared parent parser, so this adds a small config.argument_group()
helper that looks up an existing group by title, and registers each
--update-<importer> flag on its corresponding service group.

Parsing behaviour is unchanged; only the help output grouping differs.
The existing golden help-output assertions in tests/cli_help_test.py are
updated to the new placement and fail without this change.
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.

Move --update-<importer> args under their corresponding sections in help output

1 participant