-
Notifications
You must be signed in to change notification settings - Fork 61
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
myst build --execute
doesn't re-evaluate Markdown cells with {eval} directive
#1494
Comments
Thanks for this reproducer @srprca. What's happening here is technically not a bug, rather a confusion with how execution works. This doesn't mean that we shouldn't change something in JupyterLab's MyST extension has to store user-expression results in the cell metadata in order to persist them. When you use So, when you write There are bigger questions about whether the execution cache should be configurable and/or more standardised, and I think this UX question ties into it. |
Hey @agoose77 👋🏻 I actually have run into this as well. I do understand there are more significant questions associated with it!! BUT from a user perspective, it's unexpected and appears to the user as a bug. Even if, technically, it's not a bug in terms of how Jupyter works! I am not sure what the solution is, but could mystmd "rerender" markdown cells too when you run execute, or is there some command that would do that for the user? I have had to continually "run" markdown cells. I could be confused here too. just noting it's a pain point for a user while appreciating the complexity on the dev side of things. |
@lwasser could you clarify your point regarding rerunning markdown cells? |
@lwasser, I believe the main conclusion from @agoose77's explanation is that unless you pass @agoose77, I wonder if it would be possible to document this somewhat counter-intuitive behaviour? I believe a typical user will have an expectation that |
It's true that we don't document this nuance strongly enough, but it looks to me as though we might need to change the behavior altogether. This is clearly an unintuitive UX given that two people have encountered it. A nice feature of MyST's execution cache is that it's always clear whether the cached state is up-to-date. Whereas, an That said, it feels the execution pipeline being one-way (not writing the cache back to the notebook) is the right move, so I'm not sure what the next step will be here besides improvement of our documentation in the near term. |
Description
When running
myst build --execute
, Markdown cells with{eval}
directives are not re-evaluated which leads to out-of-date output.Versions
As installed from conda-forge conda channel:
Reproduction
mkdir myst_repro
cd myst_repro
myst init
, answern
to the suggestion to runmyst start
jupyter lab
a = 3
a
is rendered as a regular code block (see bugeval
role not working as expected jupyterlab-myst#175)3
is rendereda = 5
, evaluate itmyst build --execute
, observe the line starting with "Executing notebook..." in the outputmyst start
, open the URL printed in the output with your browsera = 5
, but the Markdown cell is rendered as3
5
The text was updated successfully, but these errors were encountered: