Documentation

This section explains how to use and develop the LTP documentation. The current documentation format is written using reStructedText and it’s built on top of Sphinx.

Building documentation

First of all, to build the documentation we must be sure that all dependencies have been installed (please check doc/requirements.txt file). Sometimes the Linux distros are providing them, but the best way is to use virtualenv command as following:

cd doc

# prepare virtual environment
python3 -m virtualenv .venv
. .venv/bin/activate

pip install sphinx # usually packaged in distros
pip install -r requirements.txt

# build documentation
make

Once the procedure has been completed, documentation will be visible at doc/html/index.html.

Warning

The current .readthedocs.yml workflow is using Python 3.6 because older Python versions were causing issues. No other version has been tested, but it should work anyway.

Validating spelling

To check documentation words spelling, we provide support for aspell, so make sure that it’s installed. The documentation can be tested via make spelling command. Output will be visible in the doc/build folder and, if any error will be found, a warning message will be shown.

C API documentation

The C API documentation is generated from headers using kernel-doc syntax which is supported by Sphinx via linuxdoc extension.