Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roy-ht/pre-commit-jupyter
Clean up cell outputs of jupyter notebook
https://github.com/roy-ht/pre-commit-jupyter
ipynb jupyter jupyter-notebook pre-commit-hook
Last synced: about 1 month ago
JSON representation
Clean up cell outputs of jupyter notebook
- Host: GitHub
- URL: https://github.com/roy-ht/pre-commit-jupyter
- Owner: roy-ht
- License: mit
- Created: 2019-11-14T07:37:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-02T12:24:07.000Z (over 2 years ago)
- Last Synced: 2024-09-27T23:41:05.824Z (about 2 months ago)
- Topics: ipynb, jupyter, jupyter-notebook, pre-commit-hook
- Language: Jupyter Notebook
- Size: 26.4 KB
- Stars: 22
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pre-commit hook to remove cell output of .ipynb notebook and some metadata for better security.
Sample config:
```
repos:
- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
hooks:
- id: jupyter-notebook-cleanup
args:
# - --remove-kernel-metadata
- --pin-patterns
- "[pin];[donotremove]"
```If you have "pin patterns", You can keep cell outputs like that:
```
# [pin]
some_function()
print("some info")
``````
# [donotremove]
some_function()
print("some info")
```