Skip to content

Improve or add oe.* library docstrings

Antonin Godard openembedded-core 1 version In review

Get series with b4
b4 am [email protected] change-id 20261103-oe-lib-docstrings-355ea9d439b5

Versions newest first

  1. v1 Latest13 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13lib/oe/path: rename "metadata" parameter to "d"meta/lib/oe/path.py+2 -20 replies
2/13oe/path: simplify replace_absolute_symlinks() signaturemeta/classes/relative_symlinks.bbclass meta/lib/oe/path.py+2 -20 replies
3/13lib/oe/utils: simplify str_filter*() signaturesmeta/lib/oe/utils.py+2 -20 replies
4/13lib/oe/utils: drop all_multilib_tune_listmeta/lib/oe/utils.py+0 -190 replies
5/13lib/oe: move oe.types.{is_x86,qemu_use_kvm} to oe.qemumeta/classes-recipe/testimage.bbclass meta/lib/oe/qemu.py meta/lib/oe/types.py +4 more+29 -283 replies
6/13lib/oe/data: improve docstring for typed_valuemeta/lib/oe/data.py+26 -20 replies
7/13lib/oe/go: detail map_arch() parametermeta/lib/oe/go.py+5 -20 replies
8/13lib/oe/kernel: convert comments to docstrings and improvemeta/lib/oe/kernel.py+16 -60 replies
9/13lib/oe/lsb: improve docstringsmeta/lib/oe/lsb.py+15 -30 replies
10/13lib/oe/path: improve docstringsmeta/lib/oe/path.py+112 -360 replies
11/13lib/oe/purl: improve docstringsmeta/lib/oe/purl.py+5 -40 replies
12/13lib/oe/utils: improve docstringsmeta/lib/oe/utils.py+190 -450 replies
13/13lib/oe/types: improve docstringsmeta/lib/oe/types.py+127 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/13] Improve or add oe.* library docstrings

Improve the docstrings of useful oe library modules and format them for inclusion with the sphinx.ext.autodoc extension. This allows presenting the documentation like in [1].

The series is divided in two parts:

- Patch 01 to 05 are code fixups, they do not contains documentation changes, but are relevant to provide a meaningful and consistent documentation.

Some are breaking changes and scould be debated, but I believe for most it does make sense to make the change, especially for understanding how the function works in documentation.

- Patch 06 to the last patch are only docstrings changes, one patch per oe module to make reviewing easier.

This work will be integrated to the yocto-docs documentation in separate series, sent after this one.

Note: compared to [1], I deliberately stopped following the "Parameters:" and "Returns ..." pattern as it sometimes proved to be challenging to describe the function's behavior in a natural way. Instead, I took inspiration from how the Python library documents its own modules, using imperative tense and simple paragraphs (most of the time).

Note 2: for now, only certain modules are covered, especially those that I think are useful for end-users. Some functions in those modules are not documented and were left as-is because I also felt it wasn't useful to document them.

[1]: https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-library-functions.html

---
Antonin Godard (13):
lib/oe/path: rename "metadata" parameter to "d" oe/path: simplify replace_absolute_symlinks() signature lib/oe/utils: simplify str_filter*() signatures lib/oe/utils: drop all_multilib_tune_list lib/oe: move oe.types.{is_x86,qemu_use_kvm} to oe.qemu lib/oe/data: improve docstring for typed_value lib/oe/go: detail map_arch() parameter lib/oe/kernel: convert comments to docstrings and improve lib/oe/lsb: improve docstrings
lib/oe/path: improve docstrings
lib/oe/purl: improve docstrings
lib/oe/utils: improve docstrings
lib/oe/types: improve docstrings

 meta/classes-recipe/testimage.bbclass            |   2 +-
 meta/classes/relative_symlinks.bbclass           |   2 +-
 meta/lib/oe/data.py                              |  28 ++-
 meta/lib/oe/go.py                                |   7 +-
 meta/lib/oe/kernel.py                            |  22 +-
 meta/lib/oe/lsb.py                               |  18 +-
 meta/lib/oe/path.py                              | 154 ++++++++++----
 meta/lib/oe/purl.py                              |   9 +-
 meta/lib/oe/qemu.py                              |  24 +++
 meta/lib/oe/types.py                             | 166 +++++++++++----
 meta/lib/oe/utils.py                             | 254 +++++++++++++++++------
 meta/lib/oeqa/selftest/cases/efibootpartition.py |   2 +-
 meta/lib/oeqa/selftest/cases/runqemu.py          |   2 +-
 meta/lib/oeqa/selftest/cases/uki.py              |   2 +-
 meta/lib/oeqa/targetcontrol.py                   |   2 +-
 15 files changed, 529 insertions(+), 165 deletions(-)

---
base-commit: f32bced7b431f39a956c3e0d42e3c756ab784c49
change-id: 20261103-oe-lib-docstrings-355ea9d439b5