Remove noise from notebooks for cleaner version control diffs
Project description
Squeaky
✨ Make your Jupyter notebooks squeaky clean ✨
Squeaky removes unwanted changes to your notebooks to make your Git diffs cleaner. Tools like nbdime and ReviewNB are awesome, but are one extra program to install and learn. Instead, Squeaky makes notebook diffs more manageable with standard Git tools.
Usage
First, install:
pip install squeaky
Then use Squeaky to clean a notebook:
squeaky path/to/notebook(s).ipynb
To check notebooks without modifying them, use the --check
flag.
squeaky path/to/notebook.ipynb --check
Features
-
Reset metadata
If you're running your notebooks in CI, then you probably don't care about the last environment a notebook was edited in. Squeaky resets notebook metadata to a standard metadata.
-
Minify SVGs
Setting code image outputs to SVGs makes images look great, but comes with horrendous diffs. Squeaky minifies SVG outputs to a single line, which also reduces file size.
Wishlist
- Remove empty cells
- Remove trailing whitespace (from end of lines and empty lines from ends of cells).
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.