Open miranov25 opened 1 year ago
pip install pre-commit has to be added to the requirement
it is not done by default
git config --global filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'
git precommit hook did not work as it used hardwired path the the precommit software to be removed
filter writes it to the $HOME/.gitconfig [filter "strip-notebook-output"] clean = jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR
lsf in combination with filter makes files impossible to remove
To fix the problem I had to git clean -fdx
Jupyter as an precommit: https://zhauniarovich.com/post/2020/2020-06-clearing-jupyter-output/
Steps:
pip install pre-commit
git commit .pre-commit-config.yaml -m "#30 - adding automatic precommit"