6 ms·
The only thing I want from Jupyter notebook is easy version control workflow - not sure what's the best option is right now but last time I checked it was 'dele
by FiReaNG3L 10y ago
The only thing I want from Jupyter notebook is easy version control workflow - not sure what's the best option is right now but last time I checked it was 'delete all outputs before commit' which is great in many cases.
- RobinL 10y agoThere's some good advice here: http://stackoverflow.com/questions/18734739/using-ipython-notebooks-under-version-control http://stackoverflow.com/questions/18734739/using-ipython-no.... Obviously imperfect, but it helps until it's implemented properly
- Y_Y 10y agoUse nbstripout[0] as a git filter. Then you have seamless git control of notebooks. There's talk of automatically saving code only separate versions in future releases. [0] https://github.com/kynan/nbstripout https://github.com/kynan/nbstripout
- lancefisher 10y agoThis looks pretty good for handling diffing/merging of notebooks. I'm just getting started with jupyter, but it seems like somewhat of a pain to have to ssh into a server to manage versioning with git while I work on the code in the browser. I'd prefer if I could do all of my jupyter work directly in a notebook, and commit from the notebook webpage. I'm not sure how others work with this stack, so there is likely tooling I don't know about. I'd love to hear suggestions.
- carreau 10y agoWell you can commit from the UI: https://gab41.lab41.org/commit-and-push-to-github-from-jupyter-notebooks-579f5743a50b https://gab41.lab41.org/commit-and-push-to-github-from-jupyt... you just need to install the extension.
- coconutrandom 10y agoprepending commands with a "!" runs it in the shell, assuming you are using python. ! git commit add ./my_file.ipnb http://ipython.readthedocs.io/en/stable/interactive/python-ipython-diff.html?highlight=exclamation#shell-assignment http://ipython.readthedocs.io/en/stable/interactive/python-i...
- deleted 10y ago[deleted]
- spott 10y agoCheck out nbdime[0], it might be what you are looking for. [0]https://nbdime.readthedocs.io/en/latest/vcs.html https://nbdime.readthedocs.io/en/latest/vcs.html
- spott 10y agoThis probably needs more explanation: From the docs: "nbdime provides tools for diffing and merging Jupyter notebooks." It includes both graphical diff and merge tools, command line diff and merge tools, VCS integration for git (so git uses the nbdime diff and merge for notebooks), etc. Might be worth looking into if that is what you are looking for.
- goerz 10y agoI would even settle for an undo/redo (of more than one action)
- roystonvassey 10y agoJupyter will become like the Google of software development then ;) To be fair, wasn't Jupyter designed to be an IDE - experiment with code, make tweaks and get the final version out in a text editor - rather than a repository of production-ready code?
- carreau 10y agoNot really, you rarely have IDE designed to be around live-code. IDE are more meant to develop full-featured software. We are moving in this direction (as many users request it), but we still want to stay focus on Data Exploration.
- goatlover 10y agoSmalltalk people have thought otherwise since the 70s. The live code part is a big reason to use Jupyter. It makes me think the ST (and Lisp) people were on to something.
- Sean1708 10y agoIDE here meaning Interactive Development Environment, rather than Integrated Development Environment?
- m_mueller 10y agoThis very much. I'd like for Jupyter to have an option to keep the cell code in individual python files in th backend, so you can just check in those to VCS. It would furthermore allow outside python code to import code from notebooks if jupyter would just provide a simple __init__.py file together with the cell files.
- carreau 10y agoSo you are asking for https://github.com/takluyver/nbexplode https://github.com/takluyver/nbexplode and https://github.com/ipython/ipynb https://github.com/ipython/ipynb respectively. There just not maintained enough to be in the core :-)
- mctx 10y agoYou can create a post save hook to output .py files - http://jupyter-notebook.readthedocs.io/en/latest/extending/savehooks.html http://jupyter-notebook.readthedocs.io/en/latest/extending/s... (You used to be able to run ipython notebook --script)
- TimSAstro 10y agoThis is something I've been giving some thought to recently. I came to the conclusion that the best way to go currently is git-clean filters built using jq. It's still a bit hacky though. Gentle write-up here: http://timstaley.co.uk/posts/making-git-and-jupyter-notebooks-play-nice/ http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...