mwouts / jupytext

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

feature request: automatic creation of missing notebooks for use after git clone #1207

Closed itcarroll closed 3 months ago

itcarroll commented 8 months ago

The README section Collaborating on notebooks with Git nicely describes how to create the .ipynb files for .py notebooks under version control. Thank you for that documentation. The actual process is a little tedious if you have several notebooks and the .py notebook files are somewhat buried.

For projects with configuration files that shows where .ipynb notebooks should be, would it be reasonable to have a shortcut to generate any that are missing? One possibility: execute jupytext --sync with no additional arguments in a project with a jupytext configuration file.

itcarroll commented 3 months ago

Realized that jupytext --sync path/to/*/*.py works for this.

mwouts commented 3 months ago

Thanks @itcarroll for documenting this. Sorry I did not comment earlier. You might also want to use the globstar ** operator for accessing multiple depths at once, see here. Cheers