Add tooling that tests Jupyter notebooks.
See original GitHub issueWe tried doing it here: https://github.com/quantumlib/Cirq/pull/1934, but it’s clear that this should be a separate issue on it’s own.
There are two options i can think of right now:
- Test the same way we do our
.md
(snippet tests) - Bake tests into the notebooks: https://github.com/akaihola/ipython_pytest for example
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Test Jupyter Notebooks with Pytest and Nbmake
This tutorial describes how you can use the nbmake, a pytest plugin, to automate end-to-end testing of notebooks. jupyter notebook ...
Read more >4 Tools for Reproducible Jupyter Notebooks
Jupyter notebooks have a somewhat poor reputation in the wider ... A linting tool scans your code and checks for common styling errors....
Read more >Jupyter Development Tools for Code Linting, Debugging ...
Treon: This collects both Python unit.tests and doc tests within the notebook and runs them. It also executes your notebook, cell by cell...
Read more >Unit testing Python code in Jupyter notebooks - wrighters.io
It is possible to unit test Python code that lives in a Jupyter notebook. This article looks at three reasonable choices.
Read more >How to Test Jupyter Notebooks | Python in Plain English
This loads (and executes) the notebook and makes it available for all the tests in the class. Note that in the call to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Given the crazy amount of notebooks coming and going now with QPolish, this is a must. I raised a PR for a version that runs the pip installs in isolated envs.
@bt3gl Thanks for doing this. Don’t forget https://github.com/quantumlib/Cirq/pull/2713#issuecomment-583175086 too.