No project description provided
Project description
enforce-notebook-run-order
A tiny python script to enforce the run order of a Jupyter notebook.
Jupyter notebooks are great for interactive data analysis. However, when they can encourage a bad habit: running cells out of order. This can lead to notebooks being committed to the repository in a state where they don't run from top to bottom, and other collaborators may receive different results when running the notebook from top to bottom.
This script enforces the run order of a notebook by raising an exception if any cells are run out of order.
Usage
This script can be used as a standalone script, or as a pre-commit hook.
Standalone
To use enforce-notebook-run-order
as a standalone script, simply run
it with the path to the notebook you want to check:
enforce-notebook-run-order my_notebook.ipynb
Or point it to a directory to check all notebooks in that directory:
enforce-notebook-run-order my_notebooks/
Pre-commit hook
To use enforce_notebook_run_order
as a pre-commit hook, add the
following to your .pre-commit-config.yaml
:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for enforce_notebook_run_order-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a92e439d990195c5d1ed7c2461dc267de143ed8cee23f3aa1c9de0739722f7b1 |
|
MD5 | df6504055947564088ef45ab08d7aca8 |
|
BLAKE2b-256 | 89304b970a6500c31c7daff3043d5515c2021f8db3932e62a0c89939b2d91a58 |
Hashes for enforce_notebook_run_order-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37405c64492d96185f35c98693bef89a065620de73f81aa3808948bfde72c4e6 |
|
MD5 | 42760e9b245c14a4b8f020626273d0f2 |
|
BLAKE2b-256 | 2feb77a692635fbbaef5c4291dcbc37b392e565583857f3336139af73ffca630 |