Clean Jupyter notebooks for versioning
Project description
nb-clean cleans Jupyter notebooks of cell execution counts and outputs, preparing them for committing to version control. It provides a Git filter to automatically clean notebooks before they are staged, and can also be used as a standalone tool outside Git or with other version control systems.
Installation
To install the latest release from PyPI, use pip:
pip install nb-clean
nb-clean requires Python 3.6 or later.
Usage
To install a filter in an existing Git repository to automatically clean notebooks before they are staged, run the following from the working tree:
nb-clean configure-git
nb-clean will configure a filter in the Git repository in which it is run, and will not mutate your global or system Git configuration.
Aside from usage from a filter in a Git repository, you can also clean up a Jupyter notebook manually with:
nb-clean clean -i original.ipynb -o clean.ipynb
Copyright
Copyright © 2017 Scott Stevenson.
nb-clean is distributed under the terms of the ISC licence.
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 nb_clean-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060321fd326c6e2540cf7bf9b249ca81d142ff4f5d8db5e2140c5e1ed8fbf471 |
|
MD5 | 5990480db6dad5e9f9cc3af01035492a |
|
BLAKE2b-256 | db0c7d0c0ecb6c5d7953836f14f13fa178d7ee3c76f1fb17edfaff81ca4ce989 |