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

feat!: reorganize CLI commands #44

Merged
merged 1 commit into from
Jun 24, 2024
Merged

feat!: reorganize CLI commands #44

merged 1 commit into from
Jun 24, 2024

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Jun 21, 2024

"info" is no more - it's been split up and moved.

  • Default "info" output has been moved to the default "chart-review" mode without any subcommand.
  • "info --ids" has been moved to a toplevel "ids" subcommand.
  • "info --labels" has been moved to a toplevel "labels" subcommand.

No functional changes here (except maybe some better help output in the "no config file found" case and the reminder about --help in the default output).

This is part 1 of 4. Next will be the addition of a --cvs option to most commands. And part 3-4 will be some new commands (mentions & frequency).

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added

"info" is no more - it's been split up and moved.
- Default "info" output has been moved to the default "chart-review"
  mode without any subcommand.
- "info --ids" has been moved to a toplevel "ids" subcommand.
- "info --labels" has been moved to a toplevel "labels" subcommand.
Comment on lines +8 to +10
def make_subparser(parser: argparse.ArgumentParser) -> None:
cli_utils.add_project_args(parser)
parser.set_defaults(func=print_ids)

Choose a reason for hiding this comment

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

re" this and labels, maybe not now, but as you add in some of the other commands, should this move to a centralized location/base class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My plan was to let each command own its own specific logic, but provide all the shared code via cli_utils.py or other places.

Like you see above with cli_utils.add_project_args, but more of that.

@mikix mikix merged commit 60f38f4 into main Jun 24, 2024
2 checks passed
@mikix mikix deleted the mikix/drop-info branch June 24, 2024 14:06
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