Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the --report option #95

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

Pennycook
Copy link
Contributor

This commit brings --report in line with --platform, such that:

  • Each instance of --report accepts only a single argument.
  • --report can be specified multiple times.

This is a breaking change, but --report accepting multiple values was deprecated in 1.2.0.

Related issues

Part of the fix for #87.

Proposed changes

  • Switch --report from expecting a list of args (nargs="+") to a single argument.
  • Append all --report arguments to a list of report options.
  • Default to the equivalent of --report all for backwards compatibility.

Note that setting a default of ["all"] for argparse would then cause the list to always contain "all". Rather than writing a custom action for this, it seemed simpler to handle the default elsewhere and add a comment explaining the reasoning.

This commit brings --report in line with --platform, such that:
- Each instance of --report accepts only a single argument.
- --report can be specified multiple times.

This is a breaking change, but --report accepting multiple values was
deprecated in 1.2.0.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook added the enhancement New feature or request label Apr 3, 2024
@Pennycook Pennycook added this to the 2.0.0 milestone Apr 3, 2024
Copy link
Contributor

@laserkelvin laserkelvin left a comment

Choose a reason for hiding this comment

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

More a comment than a change request

bin/codebasin Show resolved Hide resolved
Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook merged commit 0c6037b into intel:main Apr 4, 2024
3 checks passed
@Pennycook Pennycook deleted the simplify-report-option branch April 4, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants