jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 64 forks source link

Allow execution of specific notebooks to be skipped #1619

Open choldgraf opened 3 weeks ago

choldgraf commented 3 weeks ago

Currently it's possible to tag specific cells for skipping execution (with skip-execution) but there's not a way to do this for entire notebooks. It would be useful if this were possible either in page metadata, or in a list of exclude glob patterns in myst.yml.

This is useful when you have:

  1. A notebook that you know is broken, and so you don't want to clog up your build with broken execution
  2. A notebook that takes a lot of resources to build, and you want to run it once and embed the outputs inside without re-executing
agoose77 commented 3 weeks ago

In JB1 there's support for per-notebook execution (c.f. https://jupyterbook.org/en/stable/content/execute.html#exclude-files-from-execution). We should allow opt-out on a per-notebook basis, in addition to a broader solution regarding execution strategies!