Closed christian512 closed 2 years ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
This PR also includes a github action to perform the tests automatically on any push. I am not sure if these changes are good enough for a PR, but I think it is a good start for automatic testing of the notebooks. Other notebooks can be added to the tests when they are verified to work with the current version of QuTiP.
@christian512 Sorry it took me so long to look at this PR properly.
I had something a bit more drastic in mind for the full GSoC project (using markdown notebooks, a new repo, adding some actual assertions, running the notebook tests in a less manual way) but this is a great proof of concept.
If you like we can perhaps remove the draft status and actually think about merging this PR. Having some tests here rather than none is a big win.
@hodgestar , thanks for the comments :+1: Sure, for the full GSoC project I would add more infrastructure for the notebooks (which we can discuss before I start working on it).
Regarding the automatic testing: I added a GitHub Action which checks a few notebooks for errors on any push or PR. In which way would you make these tests more automatic?
@christian512 Re: running the tests in a less manual way, I meant using something like nbmake.
Thanks, @christian512. Merging!
Thanks for the feedback, @hodgestar. I will take a look at nbmake :)
I was experimenting around with PyTests and Notebooks to automatically detect errors in the notebooks. This is my initial idea for a layout that can be extended to more Notebooks in the future. I also added small fixes to three notebooks, that I detected with this script.