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

Restructure CLI #20

Merged
merged 6 commits into from
Mar 1, 2020
Merged

Restructure CLI #20

merged 6 commits into from
Mar 1, 2020

Conversation

chrisjsewell
Copy link
Member

Rebase of #18

The PR relates to discussion in #16.

Read the REAMDE.md for details on the full CLI change. But basically commands have been renamed and moved into separate top-level groups:

$ jcache
Usage: jcache [OPTIONS] COMMAND [ARGS]...

  The command line interface of jupyter-cache.

Options:
  -v, --version       Show the version and exit.
  -p, --cache-path    Print the current cache path and exit.
  -a, --autocomplete  Print the autocompletion command and exit.
  -h, --help          Show this message and exit.

Commands:
  cache    Commands for adding to and inspecting the cache.
  clear    Clear the cache completely.
  config   Commands for configuring the cache.
  execute  Execute staged notebooks that are outdated.
  stage    Commands for staging notebooks to be executed.
$ jcache cache
Usage: jcache cache [OPTIONS] COMMAND [ARGS]...

  Commands for adding to and inspecting the cache.

Options:
  -h, --help  Show this message and exit.

Commands:
  add-many      Cache notebook(s) that have already been executed.
  add-one       Cache a notebook, with possible artefact files.
  cat-artifact  Print the contents of a cached artefact.
  diff-nb       Print a diff of a notebook to one stored in the cache.
  list          List cached notebook records in the cache.
  remove        Remove notebooks stored in the cache.
  show          Show details of a cached notebook in the cache.
$ jcache stage 
Usage: jcache stage [OPTIONS] COMMAND [ARGS]...

  Commands for staging notebooks to be executed.

Options:
  -h, --help  Show this message and exit.

Commands:
  add-many     Stage notebook(s) for execution.
  add-one      Stage a notebook, with possible asset files.
  list         List notebooks staged for possible execution.
  remove-ids   Un-stage notebook(s), by ID.
  remove-uris  Un-stage notebook(s), by URI.
  show         Show details of a staged notebook.

Also I have added click-completions as a dependency, which can be activated in the terminal by executing eval "$(_JCACHE_COMPLETE=source jcache)".

@chrisjsewell
Copy link
Member Author

@choldgraf will you have time to review this, or shall I merge so that others trying out the CLI will be able to use it?

@choldgraf
Copy link
Member

I'll sit down and have another go at the CLI tomorrow. But, if you wanna give this a merge I am happy to just look at master tomorrow

@chrisjsewell chrisjsewell merged commit 66912e3 into master Mar 1, 2020
@bsipocz bsipocz deleted the rsetructure-click-rebase branch September 13, 2024 16:51
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.

2 participants