4 ms·
> Are there any guides on best practices for bridging from notebooks to applications? The main point of friction is that the "default" format for storing noteb
by enriquto 5y ago
> Are there any guides on best practices for bridging from notebooks to applications?
The main point of friction is that the "default" format for storing notebooks is not valid, human readable python code, but an unreadable json mess. The situation would be much better if a notebook was stored as a python file, with code cells verbatim, and markdown cells inside python comments with appropriate line breaking. That way, you could run and edit notebooks from outside the browser, and let git track them easily. Ah, what a nice world would that be.
But this is exactly the world we already live in, thanks to jupytext!
https://github.com/mwouts/jupytext https://github.com/mwouts/jupytext
- DonHopkins 5y agoIt'll make your trees green! https://www.youtube.com/watch?v=VqhCQZaH4Vs https://www.youtube.com/watch?v=VqhCQZaH4Vs
- deleted 5y ago[deleted]
- tpoacher 5y agoOr you could do what I do, and write the report as specially marked comments in the actual code, which can be grepped out later to create a valid markdown document. Pipe into pandoc, prepend some css, optionally a mathjax header, done. Beautiful reports. Honestly I've yet to be convinced there's good reason for anything more than this.
- enriquto 5y agoYes, I use a very similar setup with a three-line makefile to test and build. But the OP wanted to use the in-browser notebook interface, and this is srill possible via jupytext (while allowing collaboration with out-of-browser users).
- rahen 5y agoThere's also org mode in emacs. https://github.com/nnicandro/emacs-jupyter https://github.com/nnicandro/emacs-jupyter I'm not a great fan of notebooks though, I keep using the REPL with X forwarding for matplotlib, sided with a code editor.