[PATCH v6 4/4] dts: add API doc generation

Thomas Monjalon thomas at monjalon.net
Mon Jun 24 16:25:21 CEST 2024


24/06/2024 15:46, Juraj Linkeš:
> The tool used to generate DTS API docs is Sphinx, which is already in
> use in DPDK. The same configuration is used to preserve style with one
> DTS-specific configuration (so that the DPDK docs are unchanged) that
> modifies how the sidebar displays the content.
> 
> Sphinx generates the documentation from Python docstrings. The docstring
> format is the Google format [0] which requires the sphinx.ext.napoleon
> extension. The other extension, sphinx.ext.intersphinx, enables linking
> to object in external documentations, such as the Python documentation.
> 
> There are two requirements for building DTS docs:
> * The same Python version as DTS or higher, because Sphinx imports the
>   code.
> * Also the same Python packages as DTS, for the same reason.
> 
> [0] https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
> Reviewed-by: Luca Vizzarro <luca.vizzarro at arm.com>
> Reviewed-by: Jeremy Spewock <jspewock at iol.unh.edu>
> Tested-by: Luca Vizzarro <luca.vizzarro at arm.com>
> Tested-by: Nicholas Pratte <npratte at iol.unh.edu>
> ---
>  buildtools/call-sphinx-build.py | 31 ++++++++++++++++++--------
>  doc/api/doxy-api-index.md       |  3 +++
>  doc/api/doxy-api.conf.in        |  2 ++
>  doc/api/meson.build             | 11 +++++++---
>  doc/guides/conf.py              | 39 ++++++++++++++++++++++++++++-----
>  doc/guides/meson.build          |  1 +
>  doc/guides/tools/dts.rst        | 34 +++++++++++++++++++++++++++-
>  dts/doc/meson.build             | 27 +++++++++++++++++++++++
>  dts/meson.build                 | 16 ++++++++++++++
>  meson.build                     |  1 +
>  10 files changed, 147 insertions(+), 18 deletions(-)
>  create mode 100644 dts/doc/meson.build
>  create mode 100644 dts/meson.build

There are unrelated changes in this patch.
Please I would prefer to have existing code changed in a separate patch,
so we have only DTS addition in the last patch.




More information about the dev mailing list