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 #18

Closed
wants to merge 8 commits into from
Closed

Restructure CLI #18

wants to merge 8 commits into from

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Feb 29, 2020

This PR requires #17 to be merged first.

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)".

This was referenced Feb 29, 2020
@chrisjsewell
Copy link
Member Author

Rebased in #20

@chrisjsewell chrisjsewell deleted the restructure-click branch March 1, 2020 20:29
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.

1 participant