[IPython-dev] Adding attributes to .ipynb files

MinRK benjaminrk at gmail.com
Fri Jun 15 16:31:39 EDT 2012


On Fri, Jun 15, 2012 at 1:30 PM, Jonathan Taylor <
jonathan.taylor at stanford.edu> wrote:

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


Yes, finishing the review on this one is one of the last things to do
before cutting the beta.


>
>
> On Thu, Jun 14, 2012 at 5:09 PM, MinRK <benjaminrk at gmail.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 <dlsun at stanford.edu> 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.
>>>
>>> Thanks,
>>> Dennis
>>>
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>
>
> --
> Jonathan Taylor
> Dept. of Statistics
> Sequoia Hall, 137
> 390 Serra Mall
> Stanford, CA 94305
> Tel:   650.723.9230
> Fax:   650.725.8977
> Web: http://www-stat.stanford.edu/~jtaylo
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120615/cbcdd65a/attachment.html>


More information about the IPython-dev mailing list