5 ms·
jupytext will solve the git problems for you. Pair with a percent script, ignore the ipynb files.
by leksak 3y ago
jupytext will solve the git problems for you. Pair with a percent script, ignore the ipynb files.
- kzrdude 3y agojupytext is great. It even allows you to use only .py files directly as notebooks, but I recommend "pair with ipynb" and version controlling the .py file. The ipynb acts like a cache of the cell outputs between invocations of jupyterlab, which is handy too.
- slt2021 3y agoI always wanted a Jupyter like environment, but the one that would natively support and output .py files jupyter notebook as IDE, but with .py files instead of .ipynb
- enriquto 3y agoThis is exactly what jupytext gives you. The "pairing" is optional (and sometimed confusing). You can just work with .py files as notebooks and never ever see a .ipynb on your disk again. The notebook .py files are just regular python files with comments that can be edited at hand wih any text editor. Thus you can easily collaborate with your local graybeards that will dislike editing text on their web browsers.
- kzrdude 3y agoWhat I miss is a notebook launcher button that creates a .py notebook. Don't understand why we don't have that (i could not myself find a way to configure and add it.) I'm not sure why you think it's viable to collaborate with others who don't use jupyter? I mean on any software project, if we don't agree how to compile or run a project, then we usually can't collaborate IMO. Changes become nonsensical (breaking the one or other mode that is not tested by the author of the change.)
- slt2021 3y agoI think collaborating with .py files is easier over git. I could not find a way how to check-in .ipynb file and let reviewer review code only, and ignore the metadata part if jupytext will allow me to work in jupyter, check in file to git and create MR and let other people easily see, review and comment my code that would be great
- kzrdude 3y agoGreat, then I'd recommend using jupyterlab 3.6 with jupytext right now