Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/gifmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import glob
import shutil
import nbformat


def gogogo_all(source_dir, dest_dir):
Expand Down Expand Up @@ -32,7 +33,7 @@ def gogogo_gif(notebook_from, notebook_to):
where to put the rendered notebook
"""
with open(notebook_from) as f:
nb = json.load(f)
nb = nbformat.read(f, as_version=nbformat.NO_CONVERT)
for i, cell in enumerate(nb["cells"]):
if "gif" in cell["metadata"]:
gif = cell["metadata"]["gif"]
Expand All @@ -46,4 +47,4 @@ def gogogo_gif(notebook_from, notebook_to):
}
]
with open(notebook_to, "w") as f:
json.dump(nb, f, indent=2)
nbformat.write(nb, f)
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ doc =
jupyter-sphinx
mock
mpl-playback >= 0.1.1
nbformat
nbsphinx
numpydoc
pypandoc
Expand All @@ -73,4 +74,4 @@ dev =
%(doc)s
%(jupyter)s
%(test)s
pre-commit
pre-commit