Replies: 1 comment 9 replies
-
But that's the point, it doesn't execute all notebooks, it only executes the ones that have changed. This is stated in the docstring
No that's not the case at all, they are callbacks within which you can implement whatever code you want.
Just add a callback with a higher priority and return extra notebooks you want to be re-executed:
|
Beta Was this translation helpful? Give feedback.
-
Hi! This is mainly a question to @chrisjsewell about the current implementation. Looking at how myst-nb hooks into sphinx, I see:
I'd like to understand better why
update_execution_cache
, which executes all notebooks, is connected to"env-get-outdated"
, which is supposed to only determine which files need work.The docs say "You can return a list of docnames to re-read in addition to these", while we're doing something a lot more mutating: executing the notebooks. The docstring of
update_execution_cache
doesn't really clarify why this processing has to happen at that step.I can imagine a situation where such treatment of the sphinx pipeline will cause undesirable behavior. For example imagine I implement custom logic that determines that some notebooks should be rerun due to a dependency version change, external data being updated, or anything alike. IIUC applying that custom logic after myst-nb has registered itself as an extension would result in an incorrect output since the execution of the notebooks wouldn't be triggered.
Beta Was this translation helpful? Give feedback.
All reactions