Message ID | 20240806084622.232327-1-juraj.linkes@pantheon.tech (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2BD945748; Tue, 6 Aug 2024 10:46:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7135740E4F; Tue, 6 Aug 2024 10:46:25 +0200 (CEST) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mails.dpdk.org (Postfix) with ESMTP id DE941406B7 for <dev@dpdk.org>; Tue, 6 Aug 2024 10:46:23 +0200 (CEST) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a7de4364ca8so43467466b.2 for <dev@dpdk.org>; Tue, 06 Aug 2024 01:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1722933983; x=1723538783; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zVuI8z9MJszkOoyKbYBO4CT1Flot0Ns0zRVg5/5aEsY=; b=qALsZSvS/CKnspI6hqNHYjDvWLTGsm6ksUPNPE+GMJD3GkTyVpQ2tWnhUJyAYpqXBg t+xao1NeNUSqZWRo1Cg3avNq5LV9eXFVzdsdNbqZpkB1L9PktSMUtCWM+r6WVFno5SYD Knq6f8qK6b0RWBx3puB0VwqmsSTNNFSVnwVgs+o+LQRPqm0/pdVNUgrBqskTbiSGE79R QNwfhPQFTaaQCPvDjcikoptmuaGTPuN2x60VmnbURRJ3v1o6mfCptyhhu7Nn9DtnfA88 nhO3kujJlYQuFQ6OTU5CcKkZ21c7EXFU86mqZqpvyg7skkqr+wSRPiEm3Lan4o7mEx+3 z8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722933983; x=1723538783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zVuI8z9MJszkOoyKbYBO4CT1Flot0Ns0zRVg5/5aEsY=; b=aht70MuATVozQHGuYvMTdYgaO6J96S/uOSXz6Qq2PK10RpG0ZJ5fzrtFHsc02F1vKw Q9owGa1h/7qBsnkEIHHdBHkNHXl0RsCWYVdjbdiltsjrxzWYm1aylSlu6Hb2vck3f8th 172BLTDhd+bFo/rSB1LPR4C86f7nyMtVNUKN4spOx7MfN6AukRooa4DKy7bQnVphZCVQ Lvjhk0dS/QrsDL2Touq8QLlNlxKFMY/dIgC9wQzhjLos+T5MXZ2bHsv7bHQ1QIYmwBR6 A/81LB7ffUnmKYtImpifPXZQ55s1fUV/BUhmuepfTkV+NVV9ApmM5Be4qGep0CzP1MwG RE9Q== X-Gm-Message-State: AOJu0Yxzbnv9AdBvbj4FPGAi14UfgR2kKsQVjB3lbamkDb+aqMoRXjx8 TTml6t9QzijNGwzkpski7ASFJt7j47USuGFwoWaKPf3TmtkVFOrO2h4ltnIZBHI= X-Google-Smtp-Source: AGHT+IH6vMB1IRQrfeX0ycIcPrd+SlqL0aJ28+qFiyUryDiFqGz7Etc0xB/CgnbP3evRb/nLxPq6pA== X-Received: by 2002:a17:907:25c3:b0:a77:cca9:b212 with SMTP id a640c23a62f3a-a7dc50a5765mr1261593766b.45.1722933983316; Tue, 06 Aug 2024 01:46:23 -0700 (PDT) Received: from jlinkes-PT-Latitude-5530.pantheon.local (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9ec350fsm526058866b.189.2024.08.06.01.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 01:46:23 -0700 (PDT) From: =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech> To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, bruce.richardson@intel.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech> Subject: [PATCH v13 0/6] API docs generation Date: Tue, 6 Aug 2024 10:46:16 +0200 Message-Id: <20240806084622.232327-1-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115133606.42081-1-juraj.linkes@pantheon.tech> References: <20231115133606.42081-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
API docs generation
|
|
Message
Juraj Linkeš
Aug. 6, 2024, 8:46 a.m. UTC
The generation is done with Sphinx, which DPDK already uses, with slightly modified configuration of the sidebar present in an if block. DTS dependencies do not need to be installed, but there is the option to install doc build dependencies with Poetry: poetry install --with docs The build itself may be run with: meson setup <meson_build_dir> -Denable_docs=true ninja -C <meson_build_dir> The above will do a full DPDK build with docs. To build just docs: meson setup <meson_build_dir> ninja -C <meson_build_dir> dts-doc Python3.10 is required to build the DTS API docs. The patchset contains the .rst sources which Sphinx uses to generate the html pages. These were first generated with the sphinx-apidoc utility and modified to provide a better look. The documentation just doesn't look that good without the modifications and there isn't enough configuration options to achieve that without manual changes to the .rst files. This introduces extra maintenance which involves adding new .rst files when a new Python module is added or changing the .rst structure if the Python directory/file structure is changed (moved, renamed files). This small maintenance burden is outweighed by the flexibility afforded by the ability to make manual changes to the .rst files. v10: Fix dts doc generation issue: Only copy the custom rss file if it exists. v11: Added the config option autodoc_mock_imports, which eliminates the need for DTS dependencies. Added a script that find out which imports need to be added to autodoc_mock_imports. The script also check the required Python version for building DTS docs. Removed tags from the two affected patches which will need to be reviewed again. v12: Added paramiko to the required dependencies of get-dts-deps.py. v13: Fixed build error: TypeError: unsupported operand type(s) for |: 'NoneType' and 'Transport' Juraj Linkeš (6): dts: update params and parser docstrings dts: replace the or operator in third party types dts: add doc generation dependencies dts: add API doc sources doc: meson doc API build dir variable dts: add API doc generation buildtools/call-sphinx-build.py | 10 +- buildtools/get-dts-deps.py | 78 +++ buildtools/meson.build | 1 + doc/api/doxy-api-index.md | 3 + doc/api/doxy-api.conf.in | 2 + doc/api/meson.build | 8 +- doc/guides/conf.py | 41 +- doc/guides/contributing/documentation.rst | 2 + doc/guides/contributing/patches.rst | 4 + doc/guides/meson.build | 1 + doc/guides/tools/dts.rst | 39 +- dts/doc/conf_yaml_schema.json | 1 + dts/doc/framework.config.rst | 12 + dts/doc/framework.config.types.rst | 6 + dts/doc/framework.exception.rst | 6 + dts/doc/framework.logger.rst | 6 + dts/doc/framework.params.eal.rst | 6 + dts/doc/framework.params.rst | 14 + dts/doc/framework.params.testpmd.rst | 6 + dts/doc/framework.params.types.rst | 6 + dts/doc/framework.parser.rst | 6 + .../framework.remote_session.dpdk_shell.rst | 6 + ...ote_session.interactive_remote_session.rst | 6 + ...ework.remote_session.interactive_shell.rst | 6 + .../framework.remote_session.python_shell.rst | 6 + ...ramework.remote_session.remote_session.rst | 6 + dts/doc/framework.remote_session.rst | 18 + .../framework.remote_session.ssh_session.rst | 6 + ...framework.remote_session.testpmd_shell.rst | 6 + dts/doc/framework.runner.rst | 6 + dts/doc/framework.settings.rst | 6 + dts/doc/framework.test_result.rst | 6 + dts/doc/framework.test_suite.rst | 6 + dts/doc/framework.testbed_model.cpu.rst | 6 + .../framework.testbed_model.linux_session.rst | 6 + dts/doc/framework.testbed_model.node.rst | 6 + .../framework.testbed_model.os_session.rst | 6 + dts/doc/framework.testbed_model.port.rst | 6 + .../framework.testbed_model.posix_session.rst | 6 + dts/doc/framework.testbed_model.rst | 26 + dts/doc/framework.testbed_model.sut_node.rst | 6 + dts/doc/framework.testbed_model.tg_node.rst | 6 + ..._generator.capturing_traffic_generator.rst | 6 + ...mework.testbed_model.traffic_generator.rst | 14 + ....testbed_model.traffic_generator.scapy.rst | 6 + ...el.traffic_generator.traffic_generator.rst | 6 + ...framework.testbed_model.virtual_device.rst | 6 + dts/doc/framework.utils.rst | 6 + dts/doc/index.rst | 43 ++ dts/doc/meson.build | 30 + dts/framework/params/__init__.py | 4 +- dts/framework/params/eal.py | 7 +- dts/framework/params/types.py | 3 +- dts/framework/parser.py | 4 +- .../interactive_remote_session.py | 3 +- dts/meson.build | 15 + dts/poetry.lock | 521 +++++++++++++++++- dts/pyproject.toml | 8 + meson.build | 1 + 59 files changed, 1073 insertions(+), 26 deletions(-) create mode 100755 buildtools/get-dts-deps.py create mode 120000 dts/doc/conf_yaml_schema.json create mode 100644 dts/doc/framework.config.rst create mode 100644 dts/doc/framework.config.types.rst create mode 100644 dts/doc/framework.exception.rst create mode 100644 dts/doc/framework.logger.rst create mode 100644 dts/doc/framework.params.eal.rst create mode 100644 dts/doc/framework.params.rst create mode 100644 dts/doc/framework.params.testpmd.rst create mode 100644 dts/doc/framework.params.types.rst create mode 100644 dts/doc/framework.parser.rst create mode 100644 dts/doc/framework.remote_session.dpdk_shell.rst create mode 100644 dts/doc/framework.remote_session.interactive_remote_session.rst create mode 100644 dts/doc/framework.remote_session.interactive_shell.rst create mode 100644 dts/doc/framework.remote_session.python_shell.rst create mode 100644 dts/doc/framework.remote_session.remote_session.rst create mode 100644 dts/doc/framework.remote_session.rst create mode 100644 dts/doc/framework.remote_session.ssh_session.rst create mode 100644 dts/doc/framework.remote_session.testpmd_shell.rst create mode 100644 dts/doc/framework.runner.rst create mode 100644 dts/doc/framework.settings.rst create mode 100644 dts/doc/framework.test_result.rst create mode 100644 dts/doc/framework.test_suite.rst create mode 100644 dts/doc/framework.testbed_model.cpu.rst create mode 100644 dts/doc/framework.testbed_model.linux_session.rst create mode 100644 dts/doc/framework.testbed_model.node.rst create mode 100644 dts/doc/framework.testbed_model.os_session.rst create mode 100644 dts/doc/framework.testbed_model.port.rst create mode 100644 dts/doc/framework.testbed_model.posix_session.rst create mode 100644 dts/doc/framework.testbed_model.rst create mode 100644 dts/doc/framework.testbed_model.sut_node.rst create mode 100644 dts/doc/framework.testbed_model.tg_node.rst create mode 100644 dts/doc/framework.testbed_model.traffic_generator.capturing_traffic_generator.rst create mode 100644 dts/doc/framework.testbed_model.traffic_generator.rst create mode 100644 dts/doc/framework.testbed_model.traffic_generator.scapy.rst create mode 100644 dts/doc/framework.testbed_model.traffic_generator.traffic_generator.rst create mode 100644 dts/doc/framework.testbed_model.virtual_device.rst create mode 100644 dts/doc/framework.utils.rst create mode 100644 dts/doc/index.rst create mode 100644 dts/doc/meson.build create mode 100644 dts/meson.build