Regarding nbdev projects with computationally intensive contents

An issue I’ve encountered with nbdev is that (in the language of 2.0) nbdev_test attempts to run all of the notebooks in your repository: however, I’m developing a library that facilitates (somewhat) computationally intensive tasks, such that some of my notebooks which exhibit example uses take many, many hours to run. This effectively means nbdev_test is unusable for me, unless I’m neglecting some what that I can exempt certain files from being run by nbdev_test?

There’s a few ways to handle this. Perhaps the easiest is to pop the NBs you don’t want tested into a separate folder, and create a file called .notest in that folder. The presence of that file will stop nbdev from running tests in that directory.


Do you really need file-wise exclusion? Have you seen that you can control it on a cell-basis using skip_flags? nbdev - test

1 Like

Does anyone know of any other way to handle this before I resort to restructuring the folders?
nbdev had the #all_slow flag but it doesn’t work on nbdev2

For my case, yes. I have some notebooks that operate on an internal dataset that won’t be available to github actions server. Manually tagging the cells will result in almost the whole notebook tagged and the ones left will fail because they depend on the non-tested cells.

@jimmiemunyi from nbdev - nbdev1 migration


Thank you. :pray: