Skip to content

Skip All Cells Below a Flag Like #| notest_all_below #1511

@jakobhec

Description

@jakobhec

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions