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

Remove gerunds and redundant prefixes from CLI command help text #13788

Merged

Conversation

djsauble
Copy link
Contributor

@djsauble djsauble commented Jun 4, 2024

The default help output from the CLI has a lot of visual noise in the form of redundant "Commands for…" prefixes and gerunds.

image

We can make the help text easier to read by removing this verbiage.

We could take this even further by rewording the help text to do a better job of defining the concept itself instead of just mirroring the command in the help text (e.g. describing the "work-pool" command as "Commands for working with work pools" isn't very helpful, and we could make the help text more useful with a rewrite). That said, I'm not going to attempt this until I get more familiar with Prefect. :-)

Example

For example:

artifact Commands for starting and interacting with artifacts.

…becomes…

artifact Start and interact with artifacts.

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • This pull request includes redirect settings in mint.json for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • This pull request includes helpful docstrings.
  • If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in docs/mint.json navigation.

Copy link
Contributor

@billpalombi billpalombi left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

I've proposed a few changes that go a bit further to standardize some of the terminology:

  • Wherever there are two or fewer commands, just say those commands (e.g. "Serve and watch shell commands")
  • Remove "Work with" entirely since its vague
  • Reserve "Interact with" for things that are running (e.g. server, flow runs)
  • Standardize on "Manage" for persistent objects (e.g. blocks, deployments, etc.)

src/prefect/cli/deployment.py Outdated Show resolved Hide resolved
src/prefect/cli/profile.py Outdated Show resolved Hide resolved
src/prefect/cli/task_run.py Outdated Show resolved Hide resolved
src/prefect/cli/variable.py Outdated Show resolved Hide resolved
src/prefect/cli/events.py Outdated Show resolved Hide resolved
src/prefect/cli/block.py Outdated Show resolved Hide resolved
src/prefect/cli/flow.py Outdated Show resolved Hide resolved
src/prefect/cli/server.py Outdated Show resolved Hide resolved
src/prefect/cli/shell.py Outdated Show resolved Hide resolved
Co-authored-by: Bill Palombi <bill@prefect.io>
@djsauble djsauble added the docs label Jun 5, 2024
@djsauble djsauble requested a review from billpalombi June 5, 2024 17:37
@billpalombi
Copy link
Contributor

Looking great! We should standardize on including periods everywhere or nowhere. I don't have a strong preference. I defer to you @djsauble

Copy link
Contributor

@billpalombi billpalombi left a comment

Choose a reason for hiding this comment

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

After discussing, lgtm - let's get this merged!

@chrisguidry chrisguidry merged commit 578665e into main Jun 6, 2024
25 of 26 checks passed
@chrisguidry chrisguidry deleted the rid_cli_commands_of_redundant_help_text_and_gerunds branch June 6, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants