[IPython-dev] Adding attributes to .ipynb files
Fri Jun 15 15:30:00 CDT 2012
Yes, that sounds exactly like what we want. As always, the ipython team is
one step ahead. I guess this PR will happen sometime soon as there don't
seem to be many issues on github?
On Thu, Jun 14, 2012 at 5:09 PM, MinRK <email@example.com> wrote:
> You mean something like this<https://github.com/ipython/ipython/pull/1934>
> Adding your own (jsonable) data into those metadata dicts should be safe.
> I would recommend using your own prefix or subdict to avoid potential
> collisions down the road.
> On Thu, Jun 14, 2012 at 4:13 PM, Dennis Sun <firstname.lastname@example.org> wrote:
>> Hi all,
>> We're working on a project where we need notebook files that have some
>> extra data attached to each cell. Because we would like to make sure that
>> the files are still compatible with the iPython Notebook, what we're doing
>> right now is including this metadata in the "json" attribute of the output
>> of each cell and then "promoting" these attributes to the cell level at
>> runtime. Thus, the notebook file is still a valid .ipynb file, but the
>> metadata doesn't show up when the user loads the page.
>> However, it seems right now that we can get away with adding the metadata
>> directly at the cell level in the .ipynb file, since iPython Notebook
>> simply passes over any keys that it doesn't know to look for. We would like
>> to do this instead, since it is conceptually much cleaner, but we are
>> worried about compatibility with future versions of iPython, which might
>> enforce .ipynb files to follow a certain format.
>> We were hoping that someone more knowledgeable about the state of iPython
>> development could advise on whether or not it's safe to add our own
>> attributes directly to the .ipynb files. It seems that this shouldn't be a
>> problem as long as .ipynb remains a JSON key-value store, but we wanted to
>> check with the community to make sure.
>> IPython-dev mailing list
> IPython-dev mailing list
Dept. of Statistics
Sequoia Hall, 137
390 Serra Mall
Stanford, CA 94305
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev