jupyter-cleaner
jupyter-cleaner makes tracking Jupyter lab files in git easy.
This is done by:
- Removing the output of cells
- Formatting the source of cells (using black)
- Reordering imports in the source of cells (using reorder-python-imports)
- Setting the execution count of cells
- pretty printing the JSON array
It is recommended to run jupyter-cleaner before adding the Jupyter lab files to the stage in git. This allows for easier tracking of differences between commits.
CLI
running jupyter-cleaner -h displays:
usage: jupyter-cleaner [-h] [--exclude_files_or_dirs EXCLUDE_FILES_OR_DIRS [EXCLUDE_FILES_OR_DIRS ...]] [--execution_count EXECUTION_COUNT]
[--indent_level INDENT_LEVEL] [--remove_outputs] [--format] [--reorder_imports] [--ignore_pyproject]
files_or_dirs [files_or_dirs ...]
jupyter_cleaner
positional arguments:
files_or_dirs Jupyter lab files to format or directories to search for lab files
options:
-h, --help show this help message and exit
--exclude_files_or_dirs EXCLUDE_FILES_OR_DIRS [EXCLUDE_FILES_OR_DIRS ...]
Jupyter lab files or directories to exclude from formatting and search
--execution_count EXECUTION_COUNT
Number to set for the execution count of every cell. Defaults to 0.
--indent_level INDENT_LEVEL
Integer greater than zero will pretty-print the JSON array with that indent level. An indent level of 0 or negative
will only insert newlines.. Defaults to 4.
--remove_outputs Remove output of cell. Defaults to false.
--format Format code of every cell (uses black). Defaults to false.
--reorder_imports Reorder imports of every cell (uses reorder-python-imports). Defaults to false.
--ignore_pyproject Argparse will over-ride pyproject. Defaults to false.
pyproject.toml
Inputs to jupyter-cleaner can be supplied via pyproject.toml:
[tool.jupyter_cleaner]
execution_count=0
remove_outputs=true
format=true
reorder_imports=true
indent_level=4
Metadata
Release files for jupyter-cleaner 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyter_cleaner-0.3.0.tar.gz | 7.2 kB | Without provenance | Details for jupyter_cleaner-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_cleaner-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for jupyter_cleaner-0.3.0-py3-none-any.whl |
Total release size: 14.9 kB
Release files / jupyter_cleaner-0.3.0.tar.gz
| Download URL | jupyter_cleaner-0.3.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9ecc294b1767e4574c5b76e227e4b12695e6346c103c4a6a1c2a8c20b55a1eb
|
|
BLAKE2b-256 checksum How to use checksums |
7d4b1771f31ae0bdba9580e36737c2efd8bd0e562bc0d2492c6df885f46675eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.4 Windows/10
|
Release files / jupyter_cleaner-0.3.0-py3-none-any.whl
| Download URL | jupyter_cleaner-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55bbbf443dc647953fd0fedd43f8cb099f29754bdae5f711ce155a475c77d522
|
|
BLAKE2b-256 checksum How to use checksums |
ef7aab6e8f83c5c0e392e14f89931c847cd574e55f2f4b32b5b56bd05343cfa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.4 Windows/10
|
Security for jupyter-cleaner 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.