From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Akira Yokosawa <akiyks@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Ignacio Encinas Rubio <ignacio@iencinas.com>,
Marco Elver <elver@google.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Donald Hunter <donald.hunter@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Jan Stancek <jstancek@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
Ruben Wauters <rubenru09@aol.com>,
joel@joelfernandes.org, linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org, lkmm@lists.linux.dev,
netdev@vger.kernel.org, peterz@infradead.org,
stern@rowland.harvard.edu
Subject: Re: [PATCH 4/4] docs: netlink: store generated .rst files at Documentation/output
Date: Thu, 12 Jun 2025 12:22:09 +0200 [thread overview]
Message-ID: <20250612122209.0f48fbda@foz.lan> (raw)
In-Reply-To: <aEmm4bHxn3+l0vDO@gmail.com>
Hi Breno,
Em Wed, 11 Jun 2025 08:55:13 -0700
Breno Leitao <leitao@debian.org> escreveu:
> Hello Mauro,
>
> On Wed, Jun 11, 2025 at 05:45:18PM +0200, Mauro Carvalho Chehab wrote:
> > Em Tue, 10 Jun 2025 08:43:55 -0700
> > Breno Leitao <leitao@debian.org> escreveu:
> >
> > > Hello Mauro,
> > >
> > > On Tue, Jun 10, 2025 at 12:46:07PM +0200, Mauro Carvalho Chehab wrote:
> > > > A better long term solution is to have an extension at
> > > > Documentation/sphinx that parses *.yaml files for netlink files,
> > > > which could internally be calling ynl_gen_rst.py. Yet, some care
> > > > needs to be taken, as yaml extensions are also used inside device
> > > > tree.
> > >
> > > In fact, This is very similar to what I did initially in v1. And I was
> > > creating a sphinx extension to handle the generation, have a look here:
> > >
> > > https://lore.kernel.org/all/20231103135622.250314-1-leitao@debian.org/
> > >
> > > During the review, we agree to move out of the sphinx extension.
> > > the reasons are the stubs/templates that needs to be created and you are
> > > creating here.
> > >
> > > So, if we decide to come back to sphinx extension, we can leverage that
> > > code from v1 ?!
> > >
> > > > -def generate_main_index_rst(output: str) -> None:
> > > > +def generate_main_index_rst(output: str, index_dir: str, ) -> None:
> > >
> > > You probably don't need the last , before ).
> > >
> > > Other than that, LGTM.
> > >
> > > The question is, are we OK with the templates that need to be created
> > > for netlink specs?!
> > >
> > > Thanks for looking at it,
> > > --breno
> >
> > Hi Breno,
> >
> > I did here a test creating a completely new repository using
> > sphinx-quickstart, adding yaml to conf.py with:
> >
> > source_suffix = ['.rst', '.yaml']
> >
> > There, I imported your v1 patch from:
> > https://lore.kernel.org/all/20231103135622.250314-1-leitao@debian.org/
> >
> > While your extension seems to require some work, as it has issues
> > processing the current patch, it *is* creating one html file per each
> > yaml, without needing any template. All it is needed there is to place
> > an yaml file somewhere under source/ directory:
>
> Thanks for the tests. It appears that the sphinx extension can function
> without requiring stubs and templates, right?
>
> Given you have your hands dirty with it, and probably more experience
> than I have with sphinx extensions, would you be willing to take
> ownership of this extension and submit it? I'd be more than happy
> to review it.
Sure. I wrote an extension that will do what it is expected. Yet,
I opted to have a static index.rst file. I tried to do auto-generation,
but, at least when using SPHINXDIRS, it didn't work.
I'm sending the patch series in a few.
Thanks,
Mauro
next prev parent reply other threads:[~2025-06-12 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 10:46 [PATCH 0/4] Don't generate netlink .rst files inside $(srctree) Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 1/4] tools: ynl_gen_rst.py: create a top-level reference Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 2/4] docs: netlink: netlink-raw.rst: use :ref: instead of :doc: Mauro Carvalho Chehab
2025-06-10 10:46 ` [PATCH 3/4] docs: netlink: don't ignore generated rst files Mauro Carvalho Chehab
2025-06-11 10:44 ` Donald Hunter
2025-06-10 10:46 ` [PATCH 4/4] docs: netlink: store generated .rst files at Documentation/output Mauro Carvalho Chehab
2025-06-10 15:43 ` Breno Leitao
2025-06-10 20:59 ` Mauro Carvalho Chehab
2025-06-10 21:07 ` Jakub Kicinski
2025-06-12 14:39 ` Mauro Carvalho Chehab
2025-06-11 15:45 ` Mauro Carvalho Chehab
2025-06-11 15:55 ` Breno Leitao
2025-06-12 10:22 ` Mauro Carvalho Chehab [this message]
2025-06-11 11:36 ` Donald Hunter
2025-06-11 16:10 ` 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=20250612122209.0f48fbda@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=ignacio@iencinas.com \
--cc=joel@joelfernandes.org \
--cc=jstancek@redhat.com \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lkmm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=rubenru09@aol.com \
--cc=skhan@linuxfoundation.org \
--cc=stern@rowland.harvard.edu \
/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).