It looks like it should be possible to generate sphinx documentation from jupyter notebooks, e.g.:
https://ogden.eu/write-docs-in-jupyter-notebooks-with-sphinx
https://nbsphinx.readthedocs.io/en/0.8.6/
https://blog.jupyter.org/integrating-output-in-documentation-with-jupyter-sphinx-ecf569ddab85
https://jupyter-sphinx.readthedocs.io/en/latest/
This would mean that whenever I update RAW I can simply test that the documentation examples still work by running the notebooks, rather than copying code to a python file and running it there.
I don't know how this interacts with the need for external data, so it will take some investigation.