4 ms·
What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file. Is there a good cl
by eskaytwo 3y ago
What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file.
Is there a good clean method for storing tbe .ipynb files into git?
It maybe is easier without the cell outputs?
- takd 3y agoI had good experiences with nbdime.
- enriquto 3y agoJupytext seems the best practice. The ipynb files are output artifacts. Why would you want to store them into git? It would be like storing compiled program binaries.
- eskaytwo 3y agoIn the sense of an evolving notebook that’s used eg like for reports. It would be good to be able to version control this. The output doesn’t need to be saved, but the code itself would be valuable - and then can pull from version control and run.
- fluidcruft 3y agoI use a pre-commit setup that strips and formats notebooks. IIRC I use a bunch of the nbqa hooks (to also apply black, isort, ruff, etc) but I'd have to check if I moved to different versions for some reason. My workflow uses papermill so the notebooks I store in git are essentially "parameterized templates that get instantiated with data". https://pre-commit.com/ https://pre-commit.com/ https://github.com/nbQA-dev/nbQA https://github.com/nbQA-dev/nbQA https://papermill.readthedocs.io/en/latest/ https://papermill.readthedocs.io/en/latest/