numpy-tutorials
numpy-tutorials copied to clipboard
Improve omission of notebooks from nbval test collection
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?