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

CLI: Use raw descriptions #1641

Draft
wants to merge 4 commits into
base: victorlin/argparse-register-commands
Choose a base branch
from

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Sep 24, 2024

Description of proposed changes

This is useful for commands such as augur distance which have descriptions written in rST. The rST syntax is preserved and could be removed with a custom formatter class (as done in Nextstrain CLI), but simply using the built-in RawDescriptionHelpFormatter is an improvement over the default behavior.

Note that this only applies to descriptions, not help text for options.

Related issue(s)

Checklist

This is necessary to register subparsers recursively.
@victorlin victorlin force-pushed the victorlin/argparse-register-commands branch from 3127384 to 51f7dca Compare September 25, 2024 23:08
Keeps consistent with Nextstrain CLI.
@victorlin victorlin force-pushed the victorlin/argparse-register-commands branch from 51f7dca to 710f804 Compare September 25, 2024 23:11
This is useful for commands such as `augur distance` which have
descriptions written in rST. The rST syntax is preserved and could be
removed with a custom formatter class (as done in Nextstrain CLI¹), but
simply using the built-in RawDescriptionHelpFormatter is an improvement
over the default behavior.

Note that this only applies to descriptions, not help text for options.

¹ https://github.com/nextstrain/cli/blob/d4a419626eb5dc64e6de08566e51c5b48814727d/nextstrain/cli/argparse.py#L53
@victorlin victorlin force-pushed the victorlin/argparse-use-raw-descriptions branch from 7966c30 to dacddeb Compare September 25, 2024 23:31
@victorlin victorlin force-pushed the victorlin/argparse-register-commands branch from 710f804 to f5e9472 Compare October 31, 2024 23:59
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.

1 participant