From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 0/1] Add a script to allow inlined test documentation
Date: Thu, 9 Feb 2023 12:57:11 +0100 [thread overview]
Message-ID: <20230209115712.3240666-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Keeping documentation updated is hard, as text documents gets outdated
when code changes. The best practices are to keep documentation as close
as possible to the code.
This script allows adding documentation inside special tags at the
C files, and validate if the documentation actually meets the code.
It is meant to be used by the new Intel Xe driver, in the process of
being upstreamed. It can be used also for other drivers, as well.
This is a version of my previous script, that got translated to Python.
It supports three modes of operation:
1) Output documentation in ReST format (default if no arg provided):
$ scripts/igt-doc.py --files tests/xe/*.c --rest
2) Output a list of tests that are documented
$ scripts/igt-doc.py --files tests/xe/*.c --show-subtests
3) Compare the documented testlists with IGT runner testlist:
$ scripts/igt-doc.py --files tests/xe/*.c --check-testlist
The idea is to add automation to generate the ReST files at the
Xe meson.build file. Once all documentation for Xe is placed inline,
the CI for it can also use this script to discover documentation
gaps.
v2:
- use a class for the testlist;
- remove some code duplication related to subtest expansion;
- cosmetic changes to make pylint happy.
Mauro Carvalho Chehab (1):
scripts:igt-doc.py: add a parser to document tests inlined
scripts/igt_doc.py | 487 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 487 insertions(+)
create mode 100755 scripts/igt_doc.py
--
2.39.0
next reply other threads:[~2023-02-09 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 11:57 Mauro Carvalho Chehab [this message]
2023-02-09 11:57 ` [igt-dev] [PATCH i-g-t v2 1/1] scripts:igt-doc.py: add a parser to document tests inlined Mauro Carvalho Chehab
[not found] ` <20230213085217.br2yosw3con23ht4@zkempczy-mobl2>
2023-02-14 12:23 ` Mauro Carvalho Chehab
[not found] ` <20230213161538.b5f7hvawc7hbx3ub@kamilkon-desk1>
2023-02-14 12:25 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230209115712.3240666-1-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox