aboutsummaryrefslogtreecommitdiff
path: root/Docs/README.md
blob: 95b9b0ff7a03970ae0f8c9b2dc1e4c59bda1b432 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Overview

This explains how to generate the documentation for Warpx, and contribute to it.

## Generating the documentation

### Installing the requirements

Install the Python requirements for compiling the documentation:
```
pip install sphinx sphinx_rtd_theme
```
In addition, you need to install `pywarpx` (i..e the Python package for WarpX),
so that Sphinx can automatically build the documentation for this package.

### Compiling the documentation

`cd` into this directory and type
```
make html
```

### Cleaning the documentation

In order to remove all of the generated files, use:
```
make clean
```

## Contributing to the documentation

The documentation is built with several tools:

- The overall framework is [Sphinx](http://www.sphinx-doc.org/en/stable/intro.html). Sphinx reads the files that are located in the folder `source`, and which are written in [reStructuredText](http://docutils.sourceforge.net/rst.html) format. These files describe the structure of the documentation, and where to insert automatic code documentation. Please read the [Sphinx documentation](http://www.sphinx-doc.org/en/stable/intro.html) for more information.

- For Python code (e.g. the WarpX Python interface), Sphinx can generate automatic code documentation by itself (it imports the Python package directly, and extracts the docstrings).

- For Latex files, you need to convert them into [reStructuredText](http://docutils.sourceforge.net/rst.html) using [pandoc](http://pandoc.org/), and to commit them in the folder `source`. This is automatically done by the `Makefile`, for the theory section of the WarpX documentation.