Jupytext: Jupyter notebooks as Python scripts
github.com
github.com
You can now develop in your favorite editor, and changes are automatically reloaded.
More detail here: https://blog.godatadriven.com/write-less-terrible-notebook-c...
Personally, I totally want that functionality but don't want to mess with running jupyter kernels or using my browser to work in my notebook. So where is my markdown with embedded code WYSIWYG editor that saves into plain text files? ;-)
Right now, ipython notebook is stored as json, where code is list of json strings (so that you have it line by line).
Additionally, the "WYSIWYG Interface" is horrible in comparison to vim, emacs, idea, pycharm or whatever you are using. What I like about notebooks is being able to present things as experiment: this is the code, and there are the outputs. "WYSIWYG Interface" is good if you want to tweak few things, or if you are starting out.
But maybe I am missing some other features than the interface that the ipython kernel provides? I haven't used it much myself, since I found the setup and usage rather complicated, though to be fair, I don't really use python and its ecosystem much.
It's here: https://github.com/gregsexton/ob-ipython
This is going to be a bit pedantic, but for anyone that doesn't realize. Pycharm can already open ipynb files, and it will connect to a running notebook. I don't do it very often, usually just to quickly find my way around some library code.
This project looks great though. I will likely use it, as I tend to use Jupyter to work out code before copying it over to my main project.
I wrote a little python pip module to help me convert between .ipynb and .py.
https://github.com/nojvek/vscode-ipynb-py-converter
Made a world of difference.
Even as a relatively experienced developer, I've found it hard to reason about what exactly it is that Jupyter is doing under the hood; basically things will break in weird ways, and rerunning everything will mysteriously fix it, or I have to use hacks to force it to re-import certain modules in order to get things the way I expect.
Basically, it ends up being easier to just manage this myself, like doing the processing and pickling the result, then using other, standalone notebooks to load and render the pickle. But this shouldn't be necessary.
After seeing that post I had a look around for something a little like this and found Pweave http://mpastell.com/pweave/ which seems to approach the problem from the inverse direction direction, but I think I'd rather have something like this where the code is marked up and runnable as normal code but transformable into formatted documentation.
This seems like a reasonable match, but it looks like it's explicitly tied to notebooks and I'm not completely sold on the overloading of plain comments for markup purposes. Still, probably a good step.
Now, they just need to adapt jupyter itself so that it reads the python files directly, dispensing with the need of the silly ipynb!