demo for mwouts/jupytext#900
to reproduce the bug:
- setup:
- create a virtualenv
- install
requirements.txt
- install pre-commit and run
pre-commit install
(or, you can just runjupytext
on the command line manually)
- reproduce:
- run
jupyter-lab
- open
jupy_test.ipynb
, make a change, and save.- this should auto-update
jupy_test.py
. git diff
should show thatjupyt_test.ipynb
now has ametadata.jupytext
section.
- this should auto-update
- (via pre-commit)
git commit -a -m 'test'
triggersjupytext
. this removes the newly addedmetadata.jupytext
section, causing pre-commit to fail. runninggit commit -a
again succeeds. - (via jupytext manually) run
jupytext --sync jupy_test.ipynb
and note that themetadata.jupytext
section was removed from the notebook
- run