-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial notebook testing framework #480
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## master #480 +/- ##
=======================================
Coverage 82.32% 82.32%
=======================================
Files 76 76
Lines 10316 10316
=======================================
Hits 8493 8493
Misses 1823 1823 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jklaise this looks like a nice setup in terms of the github actions and general approach to testing i.e. weekly batch vs testing when changed etc.
Is the plan going forward to leave this here as a PR until we've figured out how to speed execution up with jupytext
/papermill
?
Also, purely out of curiosity, what sort of checks are you thinking in terms of static checks on jupytext
output?
@ascillitoe my preference would be to merge this (for both libraries) and then start solving issues with the failing notebooks which may involve using other tools such as Purely speculative, but one could run a reduced set of |
@jklaise, got you, makes total sense on both points 👍🏻 |
Testing how we can use either
nbmake
orjupytext
for executing notebooks underpytest
.Working on two new Github Actions workflows:
test_all_notebooks
- "batch" notebook execution, intended to run manually and at regular (e.g. weekly) intervalstest_changed_notebooks
- select notebook execution, intended to be triggered by any changes to existing notebooks or new notebooks.Current version uses
nbmake
with default options (so 300 second timeout which we may want to increase for certain notebooks or re-design the notebooks to take less time). There is also an example script intesting/test_notebooks.py
if we wanted to usejupytext
to execute notebooks ourselves. This could be more flexible in the future as it would allow slightly more configuration as well as applying static checkers onto scripts generated byjupytext
if we wished and/orpapermill
to allow passing parameters to notebooks (e.g. this may be more useful foralibi-detect
to execute bothTrue
andFalse
paths for theload_pretrained_detector
variable).