forked from jupyter/nbconvert
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save widget model state to notebook metadata
Currently default values are not removed and binary buffers are not saved. (updated to conform to widget state schema)
- Loading branch information
1 parent
6dd08eb
commit 5599a78
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
nbconvert/preprocessors/tests/files/widget-hello-world.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "c3f75dd69f3e4602989aaa3711d2977d", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/html": [ | ||
"<p>Failed to display Jupyter Widget of type <code>Label</code>.</p>\n", | ||
"<p>\n", | ||
" If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", | ||
" that the widgets JavaScript is still loading. If this message persists, it\n", | ||
" likely means that the widgets JavaScript library is either not installed or\n", | ||
" not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n", | ||
" Widgets Documentation</a> for setup instructions.\n", | ||
"</p>\n", | ||
"<p>\n", | ||
" If you're reading this message in another frontend (for example, a static\n", | ||
" rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n", | ||
" it may mean that your frontend doesn't currently support widgets.\n", | ||
"</p>\n" | ||
], | ||
"text/plain": [ | ||
"Label(value='Hello World')" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"import ipywidgets\n", | ||
"ipywidgets.Label('Hello World')" | ||
] | ||
} | ||
], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters