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

Improve help output for augur curate subcommands #1521

Open
Tracked by #1642
joverlee521 opened this issue Jul 2, 2024 · 0 comments
Open
Tracked by #1642

Improve help output for augur curate subcommands #1521

joverlee521 opened this issue Jul 2, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@joverlee521
Copy link
Contributor

Paraphrasing @jameshadfield from #1506 (comment)

If we run augur curate titlecase --help we get

usage: augur curate titlecase [-h] ...

Applies titlecase to string fields in a metadata record

options:
  -h, --help            show this help message and exit

INPUTS: 
  Input options ... 

OUTPUTS:
  Output options ...

REQUIRED:
  --titlecase-fields ...

OPTIONAL:
  --articles [ARTICLES ...] ...

It seems nicer to surface the subcommand arguments first then the shared I/O options.
So the desired help output would be:

usage: augur curate titlecase [-h] ...

Applies titlecase to string fields in a metadata record

options:
  -h, --help            show this help message and exit

REQUIRED:
  --titlecase-fields ...

OPTIONAL:
  --articles [ARTICLES ...] ...

INPUTS: 
  Input options ... 

OUTPUTS:
  Output options ...

Possible solutions

From brief look on StackOverflow, seems like we would need to change the order of parser._action_groups for each subcommand's parser.

@joverlee521 joverlee521 added the documentation Improvements or additions to documentation label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant