feat: Add category option for task grouping in help output#354
Open
brolewis wants to merge 2 commits intonat-n:mainfrom
Open
feat: Add category option for task grouping in help output#354brolewis wants to merge 2 commits intonat-n:mainfrom
brolewis wants to merge 2 commits intonat-n:mainfrom
Conversation
Adds support for an optional category option for tasks. If the category
is included, it is used for grouping help output and the categories are
ordered alphabetically. Added tests and docs as well.
A quick example I created from the user guide example:
```
$ poe --help
Poe the Poet (version 0.40.0)
Usage:
poe [global options] task [task arguments]
Global options:
-h [TASK], --help [TASK]
Show this help page and exit, optionally supply a task.
--version Print the version and exit
-v, --verbose Increase output (repeatable)
-q, --quiet Decrease output (repeatable)
-d, --dry-run Print the task contents but don't actually run it
-C PATH, --directory PATH
Specify where to find the pyproject.toml
-e EXECUTOR, --executor EXECUTOR
Override the default task executor
-X KEY[=VALUE], --executor-opt KEY[=VALUE]
Set executor configuration for this run.
--ansi Force enable ANSI output
--no-ansi Force disable ANSI output
Configured tasks:
test Run the test suite
dev
serve Run the app in debug mode
tunnel Create an SSH tunnel to the production server
--prod_host Hostname of the production server [default: myapp.com]
```
Fixes nat-n#352
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Adds support for an optional category option for tasks. If the category is included, it is used for grouping help output and the categories are ordered alphabetically. Added tests and docs as well.
A quick example I created from the user guide example:
Fixes #352
Pre-merge Checklist
poe checkexecuted successfully