numpy-tutorials icon indicating copy to clipboard operation
numpy-tutorials copied to clipboard

Improve omission of notebooks from nbval test collection

Open rossbar opened this issue 2 years ago • 0 comments

There are some notebooks that we don't necessarily want to test when running nbval, e.g. notebooks from the contributor guide, non-executable articles, etc. Currently this is handled manually in the CI job by simply deleting the notebooks we want to test:

https://github.com/numpy/numpy-tutorials/blob/47fb909bbd7777f85d94a37647db4c4dd84f1bdc/.github/workflows/notebooks.yml#L36-L40

This is inelegant and doesn't translate well to local workflows (i.e. users who want to run pytest-nbval on their own machines). It'd be a nice improvement to do this more cleanly - perhaps via a pytest configuration option to ignore files during collection?

rossbar avatar Jul 16 '22 06:07 rossbar