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

Tidy main command help. #4973

Merged
merged 5 commits into from
Jul 14, 2022
Merged

Tidy main command help. #4973

merged 5 commits into from
Jul 14, 2022

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented Jul 8, 2022

These changes close #4972

cylc help:

  • remove some duplication of example sub-commands
  • make it clearer that listed sub-commands are not exhaustive
  • reorder content by importance (abbreviations are less important than ID)

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Does not need tests (why?).
  • No change log entry required (why? e.g. invisible to users).
  • No documentation update required.

@hjoliver hjoliver self-assigned this Jul 8, 2022
@hjoliver hjoliver added the could be better Not exactly a bug, but not ideal. label Jul 8, 2022
@hjoliver hjoliver added this to the cylc-8.0.0 milestone Jul 8, 2022
@hjoliver
Copy link
Member Author

hjoliver commented Jul 8, 2022

Screenshot from 2022-07-08 13-28-53

Comment on lines 432 to 435
print(
'Selected sub-commands '
'(type "cylc help all" to see ALL sub-commands):'
)
Copy link
Member

Choose a reason for hiding this comment

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

I feel the cylc help all bit was more prominent before when it was at the end of the list?

I.E. User scans down the list, can't find what they're looking for, ah cylc help all.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, you might be right there.

cylc/flow/scripts/cylc.py Outdated Show resolved Hide resolved
Comment on lines 59 to 61
Selected sub-commands are listed below. To view ALL sub-commands:
$ cylc help all

Copy link
Member

Choose a reason for hiding this comment

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

Selected sub-commands are listed below. To view ALL sub-commands:

Seems out of place. Not needed now the Usage: section is gone?

cylc/flow/scripts/cylc.py Outdated Show resolved Hide resolved
cylc/flow/scripts/cylc.py Outdated Show resolved Hide resolved
Comment on lines 56 to 57
Usage:
$ cylc help license # view the Cylc license (GPL-3.0)
$ cylc help all # list all commands
$ cylc validate <workflow> # validate a workflow configuration
$ cylc install <workflow> # install a workflow
$ cylc play <workflow> # run/resume a workflow
$ cylc scan # list all running workflows (by default)
$ cylc tui <workflow> # view/control workflows in the terminal
$ cylc stop <workflow> # stop a running workflow

Command Abbreviation:
# Commands can be abbreviated as long as there is no ambiguity in
# the abbreviated command:
$ cylc trigger WORKFLOW//CYCLE/TASK # trigger TASK in WORKFLOW
$ cylc trig WORKFLOW//CYCLE/TASK # ditto
$ cylc tr WORKFLOW//CYCLE/TASK # ditto
$ cylc t # Error: ambiguous command
$ cylc <sub-command> <OPTS> <ARGS>
Copy link
Member

Choose a reason for hiding this comment

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

I think cylc <sub-command> <OPTS> <ARGS> is a bit too abstract to be useful.

The previous section was good for showing the life-cycle of a workflow but was too long. Perhaps consider a "Quick Usage" or "Quick Start" section.

Quick Start:
  $ cylc install <path>       # install a workflow
  $ cylc play <workflow_id>   # run/resume a workflow
  $ cylc stop <workflow_id>   # stop a workflow
  $ cylc clean <workflow_id>  # delete an installed workflow
  $ cylc help all             # view all Cylc commands

With a shorter list of commands and a more descriptive name the opportunity for confusion should be less (especially if we put cylc help all at the end).

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem with the original, is without careful reading it could (evidently!) be taken as an exhaustive list of commands.

I quite like "Quick Start:" though as it suggests "just the most important commands for basic usage". I'll reformulate...

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps with that, we don' t need the "Selected Commands" list at the bottom, which most duplicated the list at top.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough, the list is shorter now so the need to provide a short-list is less.

@hjoliver hjoliver changed the title Tidy man command help. Tidy main command help. Jul 9, 2022
@hjoliver
Copy link
Member Author

hjoliver commented Jul 9, 2022

("man" command help?!)

hjoliver and others added 4 commits July 9, 2022 14:42
Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
Co-authored-by: Oliver Sanders <oliver.sanders@metoffice.gov.uk>
@hjoliver
Copy link
Member Author

hjoliver commented Jul 9, 2022

Now looks like this:
Screenshot from 2022-07-09 23-12-30

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

Legit

@wxtim wxtim merged commit d4938dd into cylc:master Jul 14, 2022
@hjoliver hjoliver deleted the cylc-help-tweak branch July 15, 2022 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cylc help tweak needed
3 participants