From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F168C42A6E; Fri, 5 May 2023 12:42:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8917D41144; Fri, 5 May 2023 12:42:03 +0200 (CEST) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by mails.dpdk.org (Postfix) with ESMTP id 054FC410EA for ; Fri, 5 May 2023 12:42:01 +0200 (CEST) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-965ab8ed1c0so256412566b.2 for ; Fri, 05 May 2023 03:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon-tech.20221208.gappssmtp.com; s=20221208; t=1683283321; x=1685875321; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xlzpyab/gQDL42XeDSqsxRnmH3olKFAifajCKne4n48=; b=fwvlsT7zIn1O8r95I1LpYMXN7zafQX9gbOsoNHbu4fT7oc5Bov0laLWaMC5C7Ix0+M SvsgCF9if9siV4F38IfrFtFLx2ColWmzaqwZtdF371TuHdrCrUETS3xSlmgj1lbNUphu 8Qv/etzOYBtT1fYBIwRQvQ8voaDW1cVM4rYEt0uktlov9gVuOel9qR+QtIfwfllMnFwd tRsqqRK2qQ1tmMS89XuXfREgoKuEjAxjibI2Q0hVYOkbcrmtqwN1DNvhpY6eRG9lqvKe 0uAlfE+t/2x8Vbq7k6REd5JnDAkJCyeBWzII8qUsG7YMw9HNgRqjcX5deB4oxTahlxGk 93ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683283321; x=1685875321; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xlzpyab/gQDL42XeDSqsxRnmH3olKFAifajCKne4n48=; b=jU0FGVFyWtldYMgmfwk8iJwT+9l1r5mf/y8Gm0K2sKHI6mIRg1IDwlYwz9NAcDhvRC M/3I/DWdkmbuURMz+gF0G+Dm0jMvtmeKqnb/aKHEieZcHu4HhjVZ/5liElC4ay4SM58o S6vGMmRezUdJyQwbkXObTjl8C12BEb31TsQqEsHv7hqZ+IKov5ugPESg7XDC0OMQ8DHx ipUjy/ziAWDdVC5As9oJYZgMXxr08XzkKWGOOcAdOhih6Ek0NZftjU4hP3VapOuRuHRR 4NCLonGDXlf33JRmrfKHvdbngMRqytji1ExhqT5kyEXhjw2KyDs/+XuG+7utyXwp3G6W khaA== X-Gm-Message-State: AC+VfDwPzbeSNjxmt4lTZNpCg52i5TshjFikmBjI9P4BS9xuF2YKQo7V y7eh0WR1YyT3bWo4SRGcWg5VeQAJ9jVNTPINNwNxDQ== X-Google-Smtp-Source: ACHHUZ7WPrD+RLgsGMq4+l7ORF9IDDuDdYHKxKhlmMWI6aN81JhETJiKV7ZSKpPbks+4tzfkCOgC7RhE3IxO7jIBF5E= X-Received: by 2002:a17:906:fe45:b0:92f:33ca:c9a3 with SMTP id wz5-20020a170906fe4500b0092f33cac9a3mr687274ejb.71.1683283321594; Fri, 05 May 2023 03:42:01 -0700 (PDT) MIME-Version: 1.0 References: <20230323104040.484708-1-juraj.linkes@pantheon.tech> <20230504123749.1417259-1-juraj.linkes@pantheon.tech> <20230504123749.1417259-4-juraj.linkes@pantheon.tech> In-Reply-To: From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Fri, 5 May 2023 12:41:50 +0200 Message-ID: Subject: Re: [RFC PATCH v2 3/4] dts: add doc generation To: Bruce Richardson Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, lijuan.tu@intel.com, wathsala.vithanage@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, May 5, 2023 at 12:24=E2=80=AFPM Bruce Richardson wrote: > > On Fri, May 05, 2023 at 09:53:50AM +0200, Juraj Linke=C5=A1 wrote: > > On Thu, May 4, 2023 at 2:45=E2=80=AFPM Bruce Richardson > > wrote: > > > > > > On Thu, May 04, 2023 at 02:37:48PM +0200, Juraj Linke=C5=A1 wrote: > > > > The tool used to generate developer docs is sphinx, which is alread= y > > > > used in DPDK. The configuration is kept the same to preserve the st= yle. > > > > > > > > Sphinx generates the documentation from Python docstrings. The docs= tring > > > > format most suitable for DTS seems to be the Google format [0] whic= h > > > > requires the sphinx.ext.napoleon extension. > > > > > > > > There are two requirements for building DTS docs: > > > > * The same Python version as DTS or higher, because Sphinx import t= he > > > > code. > > > > * Also the same Python packages as DTS, for the same reason. > > > > > > > > [0] https://google.github.io/styleguide/pyguide.html#38-comments-an= d-docstrings > > > > > > > > Signed-off-by: Juraj Linke=C5=A1 > > > > --- > > > > doc/api/meson.build | 1 + > > > > doc/guides/conf.py | 22 ++++++++++++++---- > > > > doc/guides/meson.build | 1 + > > > > doc/guides/tools/dts.rst | 29 +++++++++++++++++++++++ > > > > dts/doc/doc-index.rst | 20 ++++++++++++++++ > > > > dts/doc/meson.build | 50 ++++++++++++++++++++++++++++++++++++= ++++ > > > > dts/meson.build | 16 +++++++++++++ > > > > meson.build | 1 + > > > > meson_options.txt | 2 ++ > > > > 9 files changed, 137 insertions(+), 5 deletions(-) > > > > create mode 100644 dts/doc/doc-index.rst > > > > create mode 100644 dts/doc/meson.build > > > > create mode 100644 dts/meson.build > > > > > > > > > > > > > > > > > diff --git a/dts/doc/meson.build b/dts/doc/meson.build > > > > new file mode 100644 > > > > index 0000000000..db2bb0bed9 > > > > --- /dev/null > > > > +++ b/dts/doc/meson.build > > > > @@ -0,0 +1,50 @@ > > > > +# SPDX-License-Identifier: BSD-3-Clause > > > > +# Copyright(c) 2023 PANTHEON.tech s.r.o. > > > > + > > > > +sphinx =3D find_program('sphinx-build', required: get_option('enab= le_dts_docs')) > > > > +sphinx_apidoc =3D find_program('sphinx-apidoc', required: get_opti= on('enable_dts_docs')) > > > > + > > > > +if sphinx.found() and sphinx_apidoc.found() > > > > +endif > > > > + > > > > +dts_api_framework_dir =3D join_paths(dts_dir, 'framework') > > > > +dts_api_build_dir =3D join_paths(doc_api_build_dir, 'dts') > > > > +dts_api_src =3D custom_target('dts_api_src', > > > > + output: 'modules.rst', > > > > + command: ['SPHINX_APIDOC_OPTIONS=3Dmembers,show-inheritanc= e', > > > > + sphinx_apidoc, '--append-syspath', '--force', > > > > + '--module-first', '--separate', > > > > + '--doc-project', 'DTS', '-V', meson.project_version(), > > > > + '-o', dts_api_build_dir, > > > > + dts_api_framework_dir], > > > > + build_by_default: get_option('enable_dts_docs')) > > > > +doc_targets +=3D dts_api_src > > > > +doc_target_names +=3D 'DTS_API_sphinx_sources' > > > > + > > > > +cp =3D find_program('cp', required: get_option('enable_docs')) > > > > > > This should probably be "enable_dts_docs" > > > > > > > Right, I overlooked that. > > What do you think of the implementation in general? > > I need to download and apply the patches to test out before I comment on > that. I only gave them a quick scan thus far. I'll try and test them toda= y > if I can. > Great, thanks. Juraj > /Bruce