No project description provided
Project description
Clean Py
Overview
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.
Install
Via pip:
pip install clean-py
Or clone directly:
git clone https://github.com/samhardyhey/clean_py
cd clean_py
pip install .
Usage
Clean a single file:
clean_py a_single_notebook.ipynb
clean_py a_single_script.py
Or 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 False
Tests
Simple pytesting via:
pytest
Multi-venv tox testing via:
tox
Dist
- Update version within
setup.py
- Create dist
.whl
and.tar
archives via:
python setup.py sdist bdist_wheel
Push to main pypi repo via:
twine upload dist/*
Project details
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
File details
Details for the file clean_py-0.4.tar.gz
.
File metadata
- Download URL: clean_py-0.4.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 117ad71f2b624f37d1bc83e064e49599585c1e3793f687162dcd2a6fd1ebf752 |
|
MD5 | 8a36af5b0163cf008ee19ccf5562eae1 |
|
BLAKE2b-256 | 9dad1e9d0fa3f32b4324525c9818eecb25cb9e52c71b0cf37b005fa6133a0522 |
File details
Details for the file clean_py-0.4-py3-none-any.whl
.
File metadata
- Download URL: clean_py-0.4-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980222a85939de069d61340254322f4ebbd452b27bdf88931f54b50844deb3df |
|
MD5 | 7152665caf097753f1e6d55eefd40254 |
|
BLAKE2b-256 | d7aff3af461074c6d7a381841fe6d0bf92bc9dea4bb90ba07a8b8b37594bc36e |