A small CLI program designed to automatically lint .ipynb and .py source code. Tidy and remove redundant imports (via autoflake), sort imports (via isort), lint and format source code in a standardised way (via black). Additionally, clear all .ipynb cell outputs and execution counts. Forked from KwatMe's orginal repo.
Via pip:
pip install clean-pyOr clone directly:
git clone https://github.com/samhardyhey/clean_py
cd clean_py
pip install .Clean a single file:
clean_py a_single_notebook.ipynb
clean_py a_single_script.pyOr recurse within a input dir:
clean_py <input_dir>Clean with specific features if necessary:
clean_py <input_dir> -py True -isort True -black False -autoflake FalseSimple pytesting via:
pytestMulti-venv tox testing via:
tox- Update version within
setup.py - Create dist
.whland.tararchives via:
python setup.py sdist bdist_wheelPush to main pypi repo via:
twine upload dist/*