-
Notifications
You must be signed in to change notification settings - Fork 65
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
pre-proposal: allow for persistence of user expression result data in the notebook #94
Comments
Yes! This! This! This! 100% This -> "The user case in point being where user expressions are used to implement inline execution of code in Markdown cells, performing string interpolation and/or providing rich views of variable state or even ipywidgets. In such a use case, persisting the results of expression evaluation enables a client to render the Markdown cells correctly without requiring a kernel connection or the notebook code cells to be executed." |
I look forward to the JEP. As it stands this is pretty broad in scope if it's intended to affect markdown. Focusing on just what the storage format is for the JEP will help this pass quickly with folks. |
@rgbkrk indeed - the intention is to focus on the storage of results and provide first class support for those, no matter what the use case if for them -- so will be independent from any specific markdown concerns. |
@MatsWallden if you want to play with some inline execution it's available in this extension in at least one place already. The extension uses the |
This proposal was developed during Jupyter Community Workshop on the Notebook format (Paris, 28 Feb - 2 Mar).
"user expressions" are a well defined mechanism where a jupyter client can send a
dict
of expressions as part of any execute request made to the kernel. These expressions are executed as a side effect of the call, such that if an error occurs during the execution of a user expression if will not interrupt the main execution flow. Expressions are sent along with the request using theuser_expressions
field.There are many possible use cases for user expressions, some of which could benefit from serialization within the notebook itself.
The user case in point being where user expressions are used to implement inline execution of code in Markdown cells, performing string interpolation and/or providing rich views of variable state or even
ipywidgets
. In such a use case, persisting the results of expression evaluation enables a client to render the Markdown cells correctly without requiring a kernel connection or the notebook code cells to be executed.An example of a Jupyter Lab extension that uses user expressions in such a way is jupyterlab/myst which relies of storing these values in cell metadata.
This intent of this proposal is to extend the notebook cell format to include first class support for serialization of the user expression results from any cell execution.
The proposal is still a work in progress, and we hope to be able to submit a draft JEP PR soon. The working document supporting this effort is available here.
Contributors: @fcollonval, @vvnkr, @davidbrochart, @stevejpurves
The text was updated successfully, but these errors were encountered: