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
Right now the ipynb parser is the only thing that knows how to deal with outputs of running a cell. However, we could replicate similar behavior if we used machinery from jupyter-sphinx to run code and display outputs. I'm not 100% sure how this should happen, but this issue is to track the topic.
I think it'd be even better if jupyter-sphinx itself defined the CellOutputToNode object, and then Myst-NB could reuse that for both its markdown and ipynb uses. Maybe @akhmerov has thoughts on that
ping @rossbar who I think was interested in this issue
note: this is separate from the "two-way conversion between ipynb and myst nb markdown...in this case, the markdown will be directly read into Sphinx without being converted to an ipynb file first.
another note: we should consider a future where a jupyter-cache exists as well, as at some point we'l want to leverage that cache to avoid having to run all the code each time if it is in a markdown cell
The text was updated successfully, but these errors were encountered:
I fully support the idea of incorporating this in jupyter-sphinx.
Sorry for lack of activity on my side: my bandwidth will stay saturated for a few weeks. However I'm happy to review/merge/mint a release for jupyter-sphinx.
Right now the
ipynb
parser is the only thing that knows how to deal with outputs of running a cell. However, we could replicate similar behavior if we used machinery fromjupyter-sphinx
to run code and display outputs. I'm not 100% sure how this should happen, but this issue is to track the topic.In particular,
if we could have code that did the same execution code that jupyter-sphinx uses (https://github.com/jupyter/jupyter-sphinx/blob/master/jupyter_sphinx/execute.py#L76)
but instead of directly inserting outputs we used the same
OutputBundleNode
thatMyST-NB
uses: https://github.com/ExecutableBookProject/MyST-NB/blob/master/myst_nb/parser.py#L136then we could use the same
CellOutputToNode
transform that we use here: https://github.com/ExecutableBookProject/MyST-NB/blob/master/myst_nb/transform.py#L31I think it'd be even better if
jupyter-sphinx
itself defined theCellOutputToNode
object, and then Myst-NB could reuse that for both its markdown and ipynb uses. Maybe @akhmerov has thoughts on thatping @rossbar who I think was interested in this issue
note: this is separate from the "two-way conversion between
ipynb
and myst nb markdown...in this case, the markdown will be directly read into Sphinx without being converted to anipynb
file first.another note: we should consider a future where a
jupyter-cache
exists as well, as at some point we'l want to leverage that cache to avoid having to run all the code each time if it is in a markdown cellThe text was updated successfully, but these errors were encountered: