Skip All Cells Below a Flag Like #| notest_all_below
In my notebooks, I typically follow a structure where the top portion contains reusable or exportable code, and the bottom portion serves as a playground area for quick experiments and testing.
To prevent nbdev_test from running these cells, I usually add something like #| notest at the top of each playground cell. This works, but it gets a bit cumbersome when the bottom of the notebook contains many such cells. Sometimes, I also forget to add that to a cell, and so testing fails. Then I need to figure out where I forgot to add that flag.
What I’d really like is the ability to set a single flag or marker in a cell—something like # | notest_all_below—that would instruct the tool to ignore all subsequent cells for testing (and/or export). This would make things much cleaner and reduce repetition.
Is there a feature like this already available? Or has anyone found a hacky workaround I could use for now?
Hey @jakobhec, this feature does exist.
Thank you! The documentation for this is here.
It is very similar, but I would like to skip all cells below a specific cell, and not all the cells in a notebook.