Skip to content

Conversation

@ghinks
Copy link
Owner

@ghinks ghinks commented Oct 29, 2025

Summary

  • normalize CLI chart metric selections so hyphenated identifiers map to existing snake_case metrics
  • refresh CLI help text, documentation, and tests to reflect the hyphenated flag values

Testing

  • poetry run pytest tests/cli/test_parse_cmd_line.py

https://chatgpt.com/codex/tasks/task_e_69020eb662708330b25ba07b87f5b181

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 287 to 293
parser.add_argument(
"--individual-chart-metric",
choices=sorted(ALLOWED_INDIVIDUAL_METRICS),
choices=sorted(
_format_cli_metric_identifier(metric)
for metric in ALLOWED_INDIVIDUAL_METRICS
),
help="Metric to visualize in individual pie chart",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve snake_case support for individual chart metric CLI flag

The new _format_cli_metric_identifier call wires --individual-chart-metric to an argparse choices list that contains only hyphenated identifiers. Because argparse enforces these choices before your _normalize_metric_identifier code runs, existing commands such as --individual-chart-metric thoroughness_score now terminate with an “invalid choice” error even though snake_case was previously accepted and is still what the rest of the code expects. This is a backwards-incompatible change that breaks existing scripts. Consider allowing both snake_case and hyphenated forms (e.g., generate choices for both) or perform validation after normalization instead of via choices so old inputs keep working.

Useful? React with 👍 / 👎.

@ghinks ghinks merged commit 1b89da3 into main Oct 29, 2025
9 checks passed
@ghinks ghinks deleted the codex/change-cli-arguments-from-underscores-to-dashes branch October 29, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants