Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cell-level metadata #1915

Closed
minrk opened this issue Jun 11, 2012 · 4 comments · Fixed by #1934
Closed

add cell-level metadata #1915

minrk opened this issue Jun 11, 2012 · 4 comments · Fixed by #1934

Comments

@minrk
Copy link
Member

minrk commented Jun 11, 2012

We have had various proposals of ideas for features that require cell-level metadata. We should make sure we iron out a mechanism by which these can be added prior to 0.13 release, so we reduce the likelihood of needing to rev the nbformat for 0.14. I imagine simply attaching a simple black-box metadata dict to each cell (and probably worksheet) like is already on the notebook as a whole would be sufficient. They can obviously start out as empty since we don't have any content yet.

Related: I believe the recent js merge removed 'collapsed' from the saved data (It's started disappearing when I re-save notebooks). If we do want to keep storing collapsed, it probably belongs in this md dict.

@fperez
Copy link
Member

fperez commented Jun 11, 2012

If we do this, we should also add a metadata dict to each worksheet as well. Right now worsheets are just kept in a list, and I imagine once we have UI for them (even if it doesn't happen for 0.13), people will immediately want to, at the very list, name them. And I can immediately think of other things to do with sheet-level metadata.

It would also give us consistently metadata support at the various levels of our hierarchy: notebook, worksheet, cell. It seems that would lead to a nice, uniform model.

@minrk
Copy link
Member Author

minrk commented Jun 11, 2012

Yes, absolutely - I thought I had typed that. I definitely thought it.

@fperez
Copy link
Member

fperez commented Jun 11, 2012

We're all really needing telepathic email/composition, I'm telling you ;)

@takluyver
Copy link
Member

@fperez : I expect we're all thinking that ;-)

@fperez fperez closed this as completed in ca7d2a9 Jun 18, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Cell/Worksheet metadata

* metadata dicts are attached to cells and worksheets
* restores collapsed flag to the nbformat - this change happened in the refactor, and was undocumented, and possibly accidental.  But we should either document it or fix it, and this includes a fix.
* adds a new field, `nbformat_minor`, used to denote minor bumps of the notebook format that expose new capabilities but don't prevent loading by older clients.
* Add a warning in Javascript if loading a multiworksheet notebook (which will exist in the future) as current JS code will only save the first.


closes ipython#1915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants