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: niceify command invocvation and help #3899

Merged
merged 21 commits into from
Nov 5, 2020

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Oct 27, 2020

closes #3893
closes #3488
closes #3208
closes #2957
addresses #1249
unblocks #3598

@hjoliver Removed you are reviewer but make sure you are ok with the bullets below:

Highlights:

  • Removes command re-invokation (i.e. ps now shows cylc run not cylc-run) [hence efficiency label]
  • Remove cylc check-software - use standard tools like pipdeptree
  • Reduce to two console_scripts entry points (cylc, clyc) so we only install top level commands.
  • Created a cylc.command entry point and opened the interface to allow extensions to add Cylc sub-commands.
  • Implement hidden aliases for removed commands inline with the rose suite-run proposal.
  • Remove the command category system.
  • Add a simple one line description of each command.
  • Simplify the main cylc help page.
  • Autogenerate the command listing (cylc help all)
  • Remove the cylc help command (all functionalities purposefully removed or replaced)
  • Splash of colour and a little TLC.

Before:

Screenshot 2020-10-27 at 18 43 28

After:

Screenshot 2020-10-29 at 19 01 52

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).
  • Does not need tests (why?).
  • Changelog included.
  • Awaiting docs PR.
  • No dependency changes.

@oliver-sanders oliver-sanders self-assigned this Oct 27, 2020
@oliver-sanders oliver-sanders added this to the cylc-8.0a3 milestone Oct 27, 2020
@hjoliver
Copy link
Member

Nice, well done 🎉

@oliver-sanders oliver-sanders mentioned this pull request Oct 29, 2020
7 tasks
@oliver-sanders oliver-sanders added the efficiency For notable efficiency improvements label Oct 29, 2020
@oliver-sanders oliver-sanders changed the title cli: niceify cylc help cli: niceify command invokation and help Oct 30, 2020
@oliver-sanders oliver-sanders force-pushed the cylc-cli-help branch 4 times, most recently from ff760b7 to 472aa4c Compare November 2, 2020 14:54
@wxtim wxtim changed the title cli: niceify command invokation and help cli: niceify command invocvation and help Nov 3, 2020
@oliver-sanders
Copy link
Member Author

oliver-sanders commented Nov 3, 2020

Test chunk 2/4 is repeatably timing out, currently debugging by:

  • Taking a copy of the prove output from the test run on GH actions > TESTS1
  • CHUNK=2/4 etc/bin/run-functional-tests -dry > TESTS2
  • Diff those files (with a bit of sed) to find out which tests haven't returned.

All tests successful.

! 😠 !

@oliver-sanders
Copy link
Member Author

Rebased.

@oliver-sanders oliver-sanders requested review from wxtim and datamel and removed request for hjoliver November 3, 2020 09:24
@oliver-sanders
Copy link
Member Author

Removed a test which was defining its own cylc run client (incorrectly). Looking back at the test I'm not sure how valid it is, especially since the retry state was removed.

@hjoliver
Copy link
Member

hjoliver commented Nov 3, 2020

@hjoliver Removed you are reviewer but make sure you are ok with the bullets below:

very happy 😁

@hjoliver
Copy link
Member

hjoliver commented Nov 3, 2020

(small conflict now)

* remove cylc-help command (provide help from cylc script)
* autogenerate command list and descriptions
* hide internal commands from command list
* remove command re-invocation (for python subcommands)
* implement command alias list (moved from setup.cfg)
* move subcommands to their own entry point (setup.cfg)
cylc/flow/scheduler_cli.py Outdated Show resolved Hide resolved
@datamel datamel mentioned this pull request Nov 4, 2020
4 tasks
cylc/flow/terminal.py Outdated Show resolved Hide resolved
Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

Changes look great.
I've checked out your branch and run commands. A couple of minor typos spotted while reading code.

@wxtim wxtim merged commit 9030010 into cylc:master Nov 5, 2020
@oliver-sanders oliver-sanders deleted the cylc-cli-help branch November 5, 2020 10:38
This was referenced Nov 5, 2020
@oliver-sanders oliver-sanders mentioned this pull request Nov 10, 2020
7 tasks
@hjoliver hjoliver modified the milestones: cylc-8.0a3, cylc-8.0b0 Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency For notable efficiency improvements small
Projects
None yet
4 participants