mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Create directory structure on rename #1058

Closed lucas-bremond closed 1 year ago

lucas-bremond commented 1 year ago

Using a global configuration like this one:

formats = "notebooks///ipynb,scripts///py:percent"

and moving a notebook stored under ./notebook/my_notebook.ipynb to a newly created ./notebook/subdir directory (so that the destination would be ./notebook/subdir/my_notebook.ipynb) fails when subdir is not already present under ./scripts/.

The proposed change makes the process transparent to the user, by lazily creating the necessary "folder tree" in the mirrored destination.

Issue: https://github.com/mwouts/jupytext/issues/1059

mwouts commented 1 year ago

This should be solved by #1082 . Thanks anyway for submitting this PR!