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

backport nbformat v4 to 2.x #6778

Merged
merged 5 commits into from Nov 9, 2014
Merged

backport nbformat v4 to 2.x #6778

merged 5 commits into from Nov 9, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Oct 22, 2014

Check out nbformat v4 for 2.x

still to do:

  • basic tests for opening a v4 notebook
  • keep up to date with v4 API, if it changes

@takluyver takluyver added this to the 2.4 milestone Oct 25, 2014
@takluyver
Copy link
Member

I think it also needs to be added to the dict of versions in IPython.nbformat.reader.versions.

@minrk
Copy link
Member Author

minrk commented Nov 3, 2014

Yup, I'm working on this now. A few shims need to be added, and I'm including some basic tests.

@minrk minrk force-pushed the 2.x-nbformat-4 branch 3 times, most recently from c951181 to eb4dd70 Compare November 3, 2014 19:51
@minrk
Copy link
Member Author

minrk commented Nov 3, 2014

reading v4 notebooks in 2.x appears to be working fine now

@takluyver
Copy link
Member

👍

with self.fopen(u'test4.ipynb', u'r') as f:
nb = read(f, u'json')

# Check that the notebook was upgraded to the latest version automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is misleading - it's downgrading from the latest format to the current version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, missed that in copy/paste. Fixed.

@minrk minrk changed the title [WIP] backport nbformat v4 to 2.x backport nbformat v4 to 2.x Nov 4, 2014
@minrk
Copy link
Member Author

minrk commented Nov 5, 2014

The first commit should have no changes to individual files, just git checkout master IPython/nbformat/v4 and one or two other files. So the more relevant diff to review is since that first commit:

minrk/ipython@c03b6e0...2.x-nbformat-4

- add v4 to reader
- validation is not backported
- update some tests to reflect this
- test opening v4 notebooks
in notebook.js dialogs, which can now be triggered
by nbformat 4 from the future.
minrk added a commit that referenced this pull request Nov 9, 2014
@minrk minrk merged commit 346674d into ipython:2.x Nov 9, 2014
@minrk minrk deleted the 2.x-nbformat-4 branch November 9, 2014 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants