我当前的钩子看起来像这样:
- repo: local
hooks:
- id: jupytext
name: jupytext
entry: jupytext
language: conda
files: '^notebooks/(.*\.py|.*\.ipynb)$'
args: [--sync, --pipe, black]
目录结构是这样的:
.
├── notebooks
│ └── dataset-exploration
│ └── 01-amplitude-exploration
│ └── amplitude_exploration.ipynb
├── [other folders]*
我*.ipynb的.gitignore文件中有,这意味着笔记本被忽略(由于 git 大小问题),但我希望预先提交以在每次提交中自动创建/同步 python 脚本及其配对笔记本。但显然是因为我的钩子没有按预期工作,并且没有*.py从我的文件生成(或同步)*.ipynb文件。