Hacker News new | past | comments | ask | show | jobs | submit login

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.

There's some good advice here: http://stackoverflow.com/questions/18734739/using-ipython-no.... Obviously imperfect, but it helps until it's implemented properly

Check out nbdime[0], it might be what you are looking for.


This 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.

This 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-notebook...

Use 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

This 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.

prepending commands with a "!" runs it in the shell, assuming you are using python.

  ! git commit add ./my_file.ipnb

Well you can commit from the UI: https://gab41.lab41.org/commit-and-push-to-github-from-jupyt... you just need to install the extension.

This 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.

So you are asking for https://github.com/takluyver/nbexplode and https://github.com/ipython/ipynb respectively. There just not maintained enough to be in the core :-)

You can create a post save hook to output .py files - http://jupyter-notebook.readthedocs.io/en/latest/extending/s...

(You used to be able to run ipython notebook --script)

I would even settle for an undo/redo (of more than one action)

Jupyter 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?

Not 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.

Smalltalk 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.

IDE here meaning Interactive Development Environment, rather than Integrated Development Environment?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact