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

Current notebook format version #138

Closed
jasongrout opened this issue Mar 26, 2019 · 10 comments · Fixed by #139
Closed

Current notebook format version #138

jasongrout opened this issue Mar 26, 2019 · 10 comments · Fixed by #139
Milestone

Comments

@jasongrout
Copy link
Member

jasongrout commented Mar 26, 2019

There seems to be some discrepancy between places where the current notebook format version is defined

Given that there have been schema changes between package version 4.3.0 and 4.4.0, I think the json schema should be updated to reflect it being notebook format 4.4, changing both the comment and the minor version specified.

I also think we should have in the schema definition directory schema files for the notebook format 4.0, 4.1, 4.2, and 4.3 to help people with different formats.

@willingc
Copy link
Member

@jasongrout So now I'm confused...

The released version of nbformat is: 4.4

The front ends (jupyterlab, notebook, nteract) are all using 4.2??

jasongrout added a commit to jasongrout/nbformat that referenced this issue Mar 26, 2019
@jasongrout
Copy link
Member Author

Apparently we are confused as well. I'm right now implementing several fields from version 4.4 in jlab, but apparently we are saying in the jlab codebase that we only understand 4.2. I'm trying to untangle this now.

@jasongrout
Copy link
Member Author

jasongrout commented Mar 26, 2019

My current updates to jlab are in commit jupyterlab/jupyterlab@97bf7ba in jupyterlab/jupyterlab#5968

@captainsafia
Copy link
Member

Thanks for opening this, @jasongrout.

Following from the conversation on nteract/nteract#4290, should we conclude that each of the front-ends should update to support 4.4 as the latest default format.

It looks like you've got a handle on that for JLab and I can make the necessary changes in nteract. Perhaps we should open an in issue in notebook (if there isn't already one) to track this?

@blois
Copy link

blois commented Mar 26, 2019

The schema additions between 4.2 and 4.4 are cell.metadata.jupyter.source_hidden and cell.metadata.jupyter.cell_hidden: 4.2.0...jupyter:4.4.0

If those fields are written then yes, I do think that frontends should use 4.4 to indicate that the fields will be conforming to the schema (primarily, they will have the correct type).

Typically for file formats, tools are written to support reading older versions but reject versions higher than what is known to be supported. Because of this it seems safer to default to writing the lowest version which is required.

We removed the minor version constraint in Colab, but the scope of the allowed changes did raise some discussions about whether newer versions could truly be considered supported in advance.

@jasongrout
Copy link
Member Author

See also the PR fixing this issue: #139

@jasongrout
Copy link
Member Author

The schema additions between 4.2 and 4.4 are cell.metadata.jupyter.source_hidden and cell.metadata.jupyter.cell_hidden

jupyter.source_hidden and jupyter.outputs_hidden. See also #137, where I think jupyter.outputs_hidden is ambiguous (or redundant?) with the top-level collapsed metadata.

@jasongrout
Copy link
Member Author

@captainsafia - @MSeal pointed out that jupyter/notebook#534 is the notebook issue.

I still think we need to clarify the difference between collapsed and jupyter.outputs_hidden for notebook format 4.4, and which takes precedence when they conflict. That's the subject of #137.

@minrk
Copy link
Member

minrk commented Aug 7, 2019

the nbformat package version and the nbformat schema version do not describe the same thing, and shouldn't be assumed to have the same value. It's mostly a confusing coincidence that they happen to be close to the same value at the moment.

For example, an nbformat package release that dropped Python 3 support and/or changed Python API without changing the spec would be version 5.0 while keeping the spec at 4.x with no change.

@willingc
Copy link
Member

willingc commented Aug 7, 2019

Let's add a note with @minrk's clarification to the docs to reduce any future confusion.

@MSeal MSeal mentioned this issue Dec 30, 2019
@MSeal MSeal added this to the 5.0 milestone Jan 3, 2020
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.

6 participants