We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 654378e commit 9b6552eCopy full SHA for 9b6552e
.github/workflows/validate_and_fix_notebook.yml
@@ -4,7 +4,7 @@ on:
4
pull_request:
5
branches:
6
- main
7
-
+
8
permissions:
9
contents: write
10
@@ -36,8 +36,8 @@ jobs:
36
with open(file, 'r') as f:
37
nb = nbformat.read(f, as_version=4)
38
nbformat.validate(nb)
39
- if 'application/vnd.jupyter.widget-state+json' not in nb.metadata:
40
- nb.metadata['application/vnd.jupyter.widget-state+json'] = {'version': '1.0'}
+ if 'application/vnd.jupyter.widget-state+json' not in nb.metadata.get('widgets', {}):
+ nb.metadata['widgets'] = {'application/vnd.jupyter.widget-state+json': {'version': '1.0'}}
41
with open(file, 'w') as f:
42
nbformat.write(nb, f)
43
"
0 commit comments