Skip to content

CLI: Use raw descriptions#1641

Closed
victorlin wants to merge 4 commits into
victorlin/argparse-register-commandsfrom
victorlin/argparse-use-raw-descriptions
Closed

CLI: Use raw descriptions#1641
victorlin wants to merge 4 commits into
victorlin/argparse-register-commandsfrom
victorlin/argparse-use-raw-descriptions

Conversation

@victorlin

@victorlin victorlin commented Sep 24, 2024

Copy link
Copy Markdown
Member

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
@victorlin

Copy link
Copy Markdown
Member Author

Closing in favor of #1991

@victorlin victorlin closed this May 11, 2026
@victorlin
victorlin deleted the victorlin/argparse-use-raw-descriptions branch May 11, 2026 22:45
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