3 ms·
Is there a way to run notebooks automatically, so you could regenerate notebooks like this after some library code changes or dependency upgrades and check that
by fulafel 8y ago
Is there a way to run notebooks automatically, so you could regenerate notebooks like this after some library code changes or dependency upgrades and check that everything stillw orks?
- teej 8y agoYep, Jupyter notebooks have an execution API, you can find more of it here - https://nbconvert.readthedocs.io/en/latest/execute_api.html https://nbconvert.readthedocs.io/en/latest/execute_api.html. Hosted notebooks as a service is a growing area of investment and those services presumably use this API.
- goerz 8y agoThere's the nbval plugin for pytest. https://nbval.readthedocs.io/en/latest/ https://nbval.readthedocs.io/en/latest/ I've used that in one of my packages (https://github.com/qucontrol/krotov https://github.com/qucontrol/krotov) to verify example notebooks on every push, on Travis CI
- bayesian_horse 8y agoAt the very least you can use the command line tool to run/export them.
- amirathi 8y agoI built ReviewNB [1] to see visual diff for Jupyter Notebook changes & do a code review on it (by writing comments on cell changes etc.). One of the next feature for ReviewNB is a CI pipeline for Jupyter Notebooks on GitHub. The idea is to make it easy for users to specify notebook "tests"/"checks" that can then be run on every change. Given the nature of Notebooks, it's a bit hard to design CI for it in a clean way, but I appreciate any inputs or use cases that you might want to see fulfilled. [1] https://www.reviewnb.com/ https://www.reviewnb.com/