Skip to content

Command Line Interface for nbparameterise #21

@dokempf

Description

@dokempf

I just wanted to let you know that I have played around with a click-based command line interface for nbparameterise. I have published the result under the name nbclick. It allows to modify and run notebooks directly from the command line. E.g. if this code cell is in notebook.ipynb:

num_samples = 1000      # The number of samples to draw
outfile = "output.csv"  # The filename to store the results

Then, nbclick will generate the following CLI that automatically runs the notebook:

Usage: nbclick notebook.ipynb [OPTIONS]

Options:
  --num_samples INTEGER  The number of samples to draw  [default: 1000]
  --outfile TEXT         The filename to store the results  [default:
                         output.csv]
  --help                 Show this message and exit.

If you are interested, the code for nbclick could be incorporated directly into nbparameterise (it is ~50 lines of code). If you prefer to have it separate, it would be cool to link to it from the nbparameterise's README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions