/prepapermill

pre-commit hooks for papermill (https://github.com/nteract/papermill)

Primary LanguagePythonMIT LicenseMIT

GitHub Workflow CI Status GitHub Workflow Code Style Status

prepapermill

pre-commit hooks for papermill (https://github.com/nteract/papermill)

Usage

$ prepapermill --help
Usage: prepapermill [OPTIONS] [FILENAMES]...

Options:
--kernel-name TEXT     Name of kernel to run
--parameter-file TEXT  [default: prepapermill.yaml]
--help                 Show this message and exit.

Example

$ prepapermill --parameter-file prepapermill.yaml notebooks/example.ipynb
Executing: 100%|██████████████████████████████| 4/4 [00:02<00:00,  1.92cell/s]
Executing: 100%|██████████████████████████████| 4/4 [00:02<00:00,  1.97cell/s]
$ tree -L 3 notebooks/                                      (sandbox) 11:23:46
notebooks/
├── example.ipynb
└── output
    ├── example_alpha_1000_ratio_400.ipynb
    └── example_alpha_1_ratio_2.ipynb

1 directory, 3 files

Development

For a development install, do the following in the repository directory:

conda env update -f ci/environment.yml
conda activate prepapermill-dev
python -m pip install -e .

Also, please install pre-commit hooks from the root directory of the created project by running:

python -m pip install pre-commit
pre-commit install

These code style pre-commit hooks (black, isort, flake8, ...) will run every time you are about to commit code.