[IPython-dev] Fwd: [SciTech] ActivePapers Python edition

Thomas Kluyver takowl at gmail.com
Tue Dec 3 19:10:05 EST 2013


Hi Konrad,

On 3 December 2013 08:34, Konrad Hinsen <konrad.hinsen at fastmail.net> wrote:

> My idea for integrating IPython notebooks into ActivePapers is to
> store notebooks inside the ActivePapers HDF5 files and treat each cell
> in a notebook like a calclet. Apart from writing all the interface
> code, the main challenge is how and where to store provenance tracking
> information. In ActivePapers, a calclet is an HDF5 dataset (containing
> a string) whose metadata contains the dependency information. One
> approach would eb to keep this representation and thus turn a notebook
> into a sequence of HDF5 datasets. At the other extreme, one could
> store notebooks in their native JSON representation inside an
> ActivePaper and insert the dependency information in the JSON code, or
> in a supplementary HDF5 dataset.
>

Our JSON format does have a concept of cell metadata, where this kind of
information could be stored. But it would also be interesting to see
notebook cells with contents stored in HDF5 datasets. We have considered
the possibility of having cells stored externally to the notebook, so you
could have a cell whose contents were stored in a plain Python file, which
could then be shared between multiple notebooks.

It shouldn't be too hard to work with notebooks stored in a different
format - you'd need to write a custom notebook server which translates to a
JSON structure to load a notebook, and translates back to your own format
when it's saved. That's handled in the FileNotebookManager class:
https://github.com/ipython/ipython/blob/master/IPython/html/services/notebooks/filenbmanager.py#L37

Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131203/5a6f6f8c/attachment.html>


More information about the IPython-dev mailing list