[notebook] python file and cell toolbar #2975

Closed
satra opened this Issue Feb 24, 2013 · 5 comments

Comments

Projects
None yet
4 participants
Contributor

satra commented Feb 24, 2013

when running notebook with --script or when saving the notebook, the cell toolbar settings do not get encoded in the python file.

Owner

minrk commented Feb 24, 2013

and they shouldn't. There is no intention for export as script to contain complete metadata.

Contributor

satra commented Feb 24, 2013

thanks @minrk - is there a discussion/roadmap as to how much will be supported? or more generally speaking how much of a bidirectional stream the notebook and the exported script (whether now in python or in future with other languages) will be?

this came up because i was saving the notebook to a python file so that one could use other editors (e.g. github's editor) to make changes and we could import the changes back into a notebook - but as a result we lost the cell toolbar settings.

Owner

minrk commented Feb 24, 2013

is there a discussion/roadmap as to how much will be supported?

I don't think so, but there should be.

or more generally speaking how much of a bidirectional stream the notebook and the exported script

The gist is that you should not consider there to be any bidirectional support. We will have basic import and export as appropriate, but we will not guarantee that roundrip to a format is lossless for anything but the code input. That is, we do not dump output, metadata, etc. to Python, only the very basics.

this came up because i was saving the notebook to a python file so that one could use other editors (e.g. github's editor) to make changes and we could import the changes back into a notebook

This is precisely the workflow that we do not intend to support. It's fine to export to a script and then edit the script, but always do so with the full knowledge that you are editing an exported script, and it is no longer the original notebook - it may be importable back into notebook form, but it should never be considered another complete representation of the same document.

Owner

Carreau commented Feb 24, 2013

To add to min response,
There are a lot of data embed into ipynb files.
especially when you display an object, "all" the representation are stored in the files.
exporting everything to a py files would me sometime for one cell
hundreds of lines of base64 encoded data, and in some case much more of unreadable svg.

So when exporting to py we do strip all those data out, so there are no roundtrip possible.

Of course you could come up with a way to keep the link between the cells and text with "markers"

but we will probably not support it.

Matthias

Le 24 févr. 2013 à 06:43, Min RK a écrit :

is there a discussion/roadmap as to how much will be supported?

I don't think so, but there should be.

or more generally speaking how much of a bidirectional stream the notebook and the exported script

The gist is that you should not consider there to be any bidirectional support. We will have basic import and export as appropriate, but we will not guarantee that roundrip to a format is lossless for anything but the code input. That is, we do not dump output, metadata, etc. to Python, only the very basics.

this came up because i was saving the notebook to a python file so that one could use other editors (e.g. github's editor) to make changes and we could import the changes back into a notebook

This is precisely the workflow that we do not intend to support. It's fine to export to a script and then edit the script, but always do so with the full knowledge that you are editing an exported script, and it is no longer the original notebook - it may be importable back into notebook form, but it should never be considered another complete representation of the same document.


Reply to this email directly or view it on GitHub.

Owner

ellisonbg commented Apr 13, 2013

Closing as we are not going to do anything about this.

@ellisonbg ellisonbg closed this Apr 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment