Was wondering what’s the best way to:
- run jupyter notebooks during a test suite
- check the output similar to repl output
Would be helpful to have a rosetta stone style answer with tests that are doing string asserts on:
- repl (text i/o)
- jupyter (json)
Was wondering what’s the best way to:
Would be helpful to have a rosetta stone style answer with tests that are doing string asserts on:
I would probably turn to something like Selenium: /documentation/. There are some pre-built Docker images which can help with setup: Docker Hub
Create the notebooks from Literate.jl files or using Weave.jl, so everything is actually just a text file that is easier to handle.
My project CMBLensing.jl might be a useful template to follow, which has documention built entirely from Jupyter notebooks which also double as (extra) tests. Basically:
.md files directly from Jupyterlab completely transparently as if they were notebooks, so that’s how I develop them).nbconvert (here) to execute these notebooks. Should any of the cells error (ok-to-error cells can be marked with a cell tag), the Docker build will fail.Its not quite everything you’re asking for but maybe useful ideas.
unliterate()  is useful for converting notebooks to .jl files. Available at Julia Academy
And then Literate.jl to go in the other direction.
@fredrikekre Have you considered adding an unliterate() to your Literate.jl?