Tag to skip cell execution
See original GitHub issueIs your feature request related to a problem? Please describe.
There are some cells I’d like run during development, but not during the book build step. The example I’m working with now are magic calls.
Describe the solution you’d like
I would like a tag that I can add to a cell, not to only hide the cell input/output (as here–it appears that even remove-cell
still executes the contents), but a tag that ensure the entire code cell isn’t run during build.
Describe alternatives you’ve considered I’ve tried commenting the cells out when I’m doing making interactive changes, and uncommenting them if I have to do some interactive work.
Additional context n/a
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:30 (21 by maintainers)
Top Results From Across the Web
Is there a cell tag convention to *skip* execution? - Notebook
There is a pending feature to add the ability to skip certain cells based on tag for papermill, in which the offending cells...
Read more >How to (intermittently) skip certain cells when running IPython ...
As a work-around, put %%cache folder/unique_identifier to the beginning of the cell. The code will be executed only once and no variables will ......
Read more >Removing cells, inputs, or outputs - nbconvert
The most straightforward way to control which pieces of cells are removed is to use cell tags. These are single-string snippets of metadata...
Read more >Skip cells when running Jupyter Notebook scripts
The simple solution is to place the cursor into the cell that you want to silence, then press Esc + r . The...
Read more >Essential notebook commands - ArcGIS Enterprise
The Tags option can be used when you are preparing a notebook to be scheduled or remotely executed. This provides the option to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI on this, https://github.com/jupyter/nbclient/pull/151 is now merged, so once a new version of nblient is out, you will be able to use the
skip-execution
tag 😄This is now available from
nbcient>=0.5.5
(https://github.com/jupyter/nbclient/compare/0.5.4...0.5.5) I believe this is installable with latest jupyter-book (it should be only jupyter-cache pinning nbclient: https://github.com/executablebooks/jupyter-cache/blob/7917c680f97af055ac60fca345822d092f1d3d6e/setup.cfg#L32) So closing this issue then should just be a matter of adding some documentation on it (around here: https://jupyterbook.org/content/execute.html#dealing-with-code-that-raises-errors, and also mirrored here: https://myst-nb.readthedocs.io/en/latest/use/execute.html#raise-errors-in-code-cells)