My current hook looks like this:
- repo: local
hooks:
- id: jupytext
name: jupytext
entry: jupytext
language: conda
files: '^notebooks/(.*\.py|.*\.ipynb)$'
args: [--sync, --pipe, black]
The directory structure is like this:
.
├── notebooks
│ └── dataset-exploration
│ └── 01-amplitude-exploration
│ └── amplitude_exploration.ipynb
├── [other folders]*
I have *.ipynb
in my .gitignore
file, which means that notebooks are ignored (because of git size issues), but I want pre-commit to automatically create/sync python scripts and their paired notebooks in each commit. But apparently because my hook is not working as intended, and no *.py
file is being generated (or synced) from my *.ipynb
files.