You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was unable to find a method that could apply minor version updates on existing notebooks without downgrading first (ping @willingc who was on call trying to help me find a method.) writes and reads appear to concern themselves only with major versions, and upgrade_cell is specifically stated to only work with v3 cells and will break v4 cells if provided.
If there is no method to do minor version migrations, then my proposal would be that this block of code should look something like this:
if from_minor == nbformat_minor:
return
# other versions migration code e.g.
# if from_minor < 3:
# if from_minor < 4:
if from_minor < 5:
for cell in nb.cells:
cell.id = random_cell_id()
nb.metadata.orig_nbformat_minor = from_minor
nb.nbformat_minor = nbformat_minor
By doing this, upgrade would be able to apply minor-version patches step-by-step for notebooks within the same major-version.
The text was updated successfully, but these errors were encountered:
I had though this had been addressed, causing me to release 5.1.0 -- we should add this fix and do a 5.1.1 release to improve the upgrade to care about minor 4.x versions.
Summary:
jupyter/nbformat#196 does not affect this test, since it just
maintains version behavior for existing notebooks, rather than instantiating new cells. This
diff just changes the assertion check, by explicitly setting the minor version to 5, and by
using a regex to handle the newly inserted random ids.
Test Plan: ran test
Reviewers: yuhan, max
Reviewed By: yuhan
Differential Revision: https://dagster.phacility.com/D5997
I ran into this problem while trying to use #189.
Right now,
upgrade
doesn't actually apply minor version changes to the given notebook (ref: https://github.com/jupyter/nbformat/blob/master/nbformat/v4/convert.py#L67).I was unable to find a method that could apply minor version updates on existing notebooks without downgrading first (ping @willingc who was on call trying to help me find a method.)
writes
andreads
appear to concern themselves only with major versions, andupgrade_cell
is specifically stated to only work with v3 cells and will break v4 cells if provided.If there is no method to do minor version migrations, then my proposal would be that this block of code should look something like this:
By doing this,
upgrade
would be able to apply minor-version patches step-by-step for notebooks within the same major-version.The text was updated successfully, but these errors were encountered: