Open lucas-bremond opened 8 months ago
Thank you for making this pull request.
Did you know? You can try it on Binder: or .
Also, the version of Jupytext developed in this PR can be installed with pip
:
pip install git+https://github.com/lucas-bremond/jupytext.git@users/lucas/add-unpaired-folders
(this requires nodejs
, see more at Developing Jupytext)
Thank you @lucas-bremond for this PR! Yep it makes sense to fix this. I will have a look when time permits.
For now I have the following remarks:
test_contentsmanager.py
)export
with a jupytext.toml
file like yours? If so we should address that too (I can have a look when time permits too)export
directory, I would rather make sure that there is no pairing / no error if the notebook is moved/created in another directory than notebooks
or source
.
Disclaimer: As I am pretty unfamiliar with the Jupytext codebase, this proposal may come across as poorly implemented. Before spending time devising a better implementation and adding tests, I'd like to explore whether the documented intent even makes sense... or not!
Assuming the following
jupytext.toml
configuration:The scenario I've been attempting to tackle is the following.
I have a Jupyter Notebook (
.ipynb
) stored undernotebooks/hello.ipynb
, which thanks to Jupytext gets automatically synced with its Python counterpart atsource/hello.py
.Now, copying
notebooks/hello.ipynb
over toexport/hello.ipynb
(via the GUI) will fail with the following error:which makes sense, since
export/
isn't part of the directory tree "covered" by Jupytext.In my opinion, an expected behavior in this case could have been to allow the copy to result in an unpaired notebook.
So the proposed approach here is to introduce an
ignored_paths
option, allowing to define folders that aren't subject to Jupytext's notebook pairing.Thoughts?