nbsphinx icon indicating copy to clipboard operation
nbsphinx copied to clipboard

Explicitly Disabling Notebook Execution for one cell

Open joamatab opened this issue 3 years ago • 1 comments

How can nbsphinx ignore one specific cell?

ideally we would add something like

NBSPHINX SKIP
print('this code should never run')

https://github.com/gdsfactory/gdsfactory/issues/335

joamatab avatar Aug 10 '22 14:08 joamatab

nbsphinx uses nbconvert for executing notebooks (which in turn uses nbclient).

Is it possible to ignore one cell in nbconvert?

If yes, I can try to enable that in nbsphinx.

Alternatively, you can try https://github.com/executablebooks/MyST-NB, maybe it is possible with that?

mgeier avatar Aug 26 '22 17:08 mgeier