linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <mchehab+huawei@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: [PATCH RFCv2 0/5]Implement kernel-doc in Python
Date: Thu, 13 Feb 2025 13:06:13 +0100	[thread overview]
Message-ID: <cover.1739447912.git.mchehab+huawei@kernel.org> (raw)

Hi Jon,

That's the second version of the Python kernel-doc tool.

As the previous version, I tried to stay as close as possible of the original
Perl implementation, as it helps to double check if each function was 
properly translated to Python.  This have been helpful debugging troubles
that happened during the conversion.

On this version, the ReST output for the files included under Documentation
is identical to the perl version, except for:

 - blank lines;
 - white spaces;
 - this version suppresses return (and description) sections on a few places
   where this is left in blank.

This version also replaces the old script by the new one for doc generation,
to make easier to test its results.

It should be noticed that  there are some sutile nuances on the way Perl 
and Python handle  regular expressions. In particular, Perl compiled 
expressions with qr{}  behaves as non-capturing groups, sometimes optional
ones. I documented it on one place, but I had to use non-capturing groups
on other parts of the logic to achieve the desired results.

This version is on a minimal integration scenario: it just replaces the
exec file to use the new one and gets rid of an obsolete parameter
as on this version I didn't implement support for Sphinx < 3.1.

On other words, it assumes that the patch requiring Sphinx >= 3.4
will be merged.

I also didn't remove on this series the old kernel-doc script, as this makes
easier to test both variations, e. g. using:

	make cleandocs && make KERNELDOC=scripts/kernel-doc htmldocs

will make it use the original Perl version.

Comments?

Mauro Carvalho Chehab (5):
  include/asm-generic/io.h: fix kerneldoc markup
  scripts/kernel-doc: remove an obscure logic from kernel-doc
  scripts/kernel-doc: don't add not needed new lines
  scripts/kernel-doc.py: add a Python parser
  docs: use kernel-doc.py script for kerneldoc output

 Documentation/Makefile            |    2 +-
 Documentation/conf.py             |    2 +-
 Documentation/sphinx/kerneldoc.py |    5 -
 include/asm-generic/io.h          |    6 +-
 scripts/kernel-doc                |   23 +-
 scripts/kernel-doc.py             | 2752 +++++++++++++++++++++++++++++
 6 files changed, 2762 insertions(+), 28 deletions(-)
 create mode 100755 scripts/kernel-doc.py

-- 
2.48.1



             reply	other threads:[~2025-02-13 12:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 12:06 Mauro Carvalho Chehab [this message]
2025-02-13 12:06 ` [PATCH RFCv2 1/5] include/asm-generic/io.h: fix kerneldoc markup Mauro Carvalho Chehab
2025-02-13 12:16   ` Arnd Bergmann
2025-02-13 12:06 ` [PATCH RFCv2 2/5] scripts/kernel-doc: remove an obscure logic from kernel-doc Mauro Carvalho Chehab
2025-02-13 12:06 ` [PATCH RFCv2 3/5] scripts/kernel-doc: don't add not needed new lines Mauro Carvalho Chehab
2025-02-13 12:06 ` [PATCH RFCv2 4/5] scripts/kernel-doc.py: add a Python parser Mauro Carvalho Chehab
2025-02-13 16:04   ` Mauro Carvalho Chehab
2025-02-13 12:06 ` [PATCH RFCv2 5/5] docs: use kernel-doc.py script for kerneldoc output Mauro Carvalho Chehab
2025-02-14  3:15 ` [PATCH RFCv2 0/5]Implement kernel-doc in Python Randy Dunlap
2025-02-14  8:02   ` 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=cover.1739447912.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).