First notebook

You can write up experiments in notebooks, and they can be generated into Sphinx docs using tox -e docs, and for example set up to run on readthedocs.

See this and this examples.

NOTE:

Getting jupyter to run your code in this package relies on 3 things:

  • You must ensure you start jupyter within the tox environment.
# If not already done.
source .tox/py36/bin/activate

# Then launch jupyter
jupyter notebook
  • Then when you navigate to and run this notebook, select the right kernel (named after your project) from the kernel menu item, in the web browser.
  • Add project folder to system path, as below.
[1]:
# Jupyter notebook sets the cwd to the folder containing the notebook.
# So, you want to add the root of the project to the sys path, so modules load correctly.
import sys
sys.path.append("../../")