Building the Sphinx documentation

To build a local version of sw2d’s HTML documentation, you first need to install sphinx and the RTD theme.

Installing requirement

Install in your conda environment

To install sphinx inside a conda environment, eg. named sw2d, open a shell prompt and type:

$ source activate sw2d
$ conda install sphinx sphinx_rtd_theme

Install with pip

To install sphinx system-wide with pip, open a shell prompt and type:

$ pip install -U Sphinx sphinx_rtd_theme

Note

This also works inside an activated conda environment!

Generating the HTML documentation

Once sphinx is installed, you can generate the documentation. To do so, go to the sw2d/doc/ folder and type:

$ make html

This will build HTML docs in the build directory you chose. To view the generated documentation, open the file: sw2d/doc/build/html/index.html

Warning

This will also generate the various figures included in this documentation! This may take some time and resources.