Writing RDFLib Documentation¶
These docs are generated with Sphinx.
Sphinx makes it very easy to pull in doc-strings from modules, classes, methods, etc. When writing doc-strings, special reST fields can be used to annotate parameters, return-types, etc. This makes for pretty API docs. See here for the Shinx documentation about these fields.
To build the documentation you can use Sphinx from within the poetry environment. To do this, run the following commands:
# Install poetry venv poetry install # Build the sphinx docs poetry run sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
Docs will be generated in
docs/_build/html and API documentation,
generated from doc-strings, will be placed in
There is also a tox environment for building documentation:
tox -e docs
API Docs are automatically generated with
poetry run sphinx-apidoc -f -d 10 -o docs/apidocs/ rdflib examples
- Note that
rdflib.rstwas manually tweaked so as to not include all
The tables in
plugin_*.rst were generated with