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 BE0D74574E; Tue, 6 Aug 2024 17:19:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8F4440614; Tue, 6 Aug 2024 17:19:42 +0200 (CEST) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mails.dpdk.org (Postfix) with ESMTP id C0E24402F2 for ; Tue, 6 Aug 2024 17:19:39 +0200 (CEST) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5b01af9b0c9so854181a12.3 for ; Tue, 06 Aug 2024 08:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1722957579; x=1723562379; 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=/XlNaLLb5rTeXnLKFQQGrG1z2Ks+mXXlEwo6ze8rus0=; b=n+/s788NuwyC9ar3+nQMf/cflfWXAYdFpSo3zWNKp2we6i6wSahtrdad1U8x0iCLzn /oiKa7GFdEEhbKEtH3twJ+oyxq1lS9bwfDUC0amUuU7aBg2+aFrenIHmQcSxRmfG6O5l lL8/EhEWuRECZxRwk9MEvbMAA7QSe4oemmyrGgyQV5PF2xqQq+e+c/t0z4nVUgNUAInr inb4KiSvziUwsyvYR2gGNMiBGrGgvAEpHWTuR6FG3kLsJXTBett7ZpoouOJ28Rix52fq w8oC/5Pj9OZcHvZfnfzjzsQ5qtzxjISKyMFTmgTuE3kdUDMQ5CNa0yt65Kpd/9ftvhoW ZYpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722957579; x=1723562379; 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=/XlNaLLb5rTeXnLKFQQGrG1z2Ks+mXXlEwo6ze8rus0=; b=l6O5KBwhkrYvjjmx/DkoxIQowg8lNQiW2iP+HuDm6CZYAGsZZzcVCwF1vox7BYbLyu pOMy0ecFAxhSnufJiAaaK0bEBOqMj0OiVn5zzPDb5GDeTXTlLCf7yI3HFm0sRb7LiZxi LM5jjNJcRLETs/3d/AoqBLCftHaz5JRQr8/iKj8KxPnjW6/11iK9+BJ5Jr3JAs28He0D Fo7Nnbr6gwYDFNMbWkkIm5ohs9qskwmumiJrQJ8yzHnSMfzh9YfGbQLpeKnscoNth2m3 GIsS+C0tAuqoeyOI4L3U4lnfq/24Fp9MQcktr+g2KIUccweWP2x0jb0A5jB1OZgjzWJd GsXw== X-Gm-Message-State: AOJu0Yx+m4TAifaExt26VhjpseXG2wIuJHwjj2wqUkRtaGF044jnaFhE GB3eqo6mIHphTPa/DHSus9cdlLM0zv85z6Xg3uL9tEWMggYXG27BeurnT1fYFRE= X-Google-Smtp-Source: AGHT+IEs5CmQ68s+BU6Sf1mTAjJNLUUf+lS2HTLx0q2YGS7YsTla1W/ipFHn1fNHTCOCVo8+XYOzKQ== X-Received: by 2002:a05:6402:337:b0:5a8:2f2b:d2d3 with SMTP id 4fb4d7f45d1cf-5b7f5ebb9d9mr9808984a12.37.1722957579268; Tue, 06 Aug 2024 08:19:39 -0700 (PDT) Received: from jlinkes-PT-Latitude-5530.pantheon.local ([84.245.121.236]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b83bf3b916sm6094702a12.90.2024.08.06.08.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 08:19:39 -0700 (PDT) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= 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=20Linke=C5=A1?= Subject: [PATCH v15 0/5] API docs generation Date: Tue, 6 Aug 2024 17:19:32 +0200 Message-Id: <20240806151937.391917-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 -Denable_docs=true ninja -C The above will do a full DPDK build with docs. To build just docs: meson setup ninja -C 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' v14: Fixed install error: ERROR: File 'dts/doc/html' could not be found This required me to put the built docs into dts/doc which is outside the DPDK API doc dir, resulting in linking between DPDK and DTS api docs not working properly. I addressed this by adding a symlink to the build dir. This way the link works after installing the docs and the symlink is just one extra file in the build dir. v15: Moved DTS API sources to doc/api/dts. This simplifies a lot of things in the build, but mainly makes a lot of sense. Now the source, build and install paths are the same so there isn't any need for any symlinks or other workarounds. Also added a symlink to the custom.css file so that it works with call-sphinx-build.py without any modifications. Juraj Linkeš (5): 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 dts: add API doc generation buildtools/call-sphinx-build.py | 2 + 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/dts/conf_yaml_schema.json | 1 + doc/api/dts/custom.css | 1 + doc/api/dts/framework.config.rst | 12 + doc/api/dts/framework.config.types.rst | 6 + doc/api/dts/framework.exception.rst | 6 + doc/api/dts/framework.logger.rst | 6 + doc/api/dts/framework.params.eal.rst | 6 + doc/api/dts/framework.params.rst | 14 + doc/api/dts/framework.params.testpmd.rst | 6 + doc/api/dts/framework.params.types.rst | 6 + doc/api/dts/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 + doc/api/dts/framework.remote_session.rst | 18 + .../framework.remote_session.ssh_session.rst | 6 + ...framework.remote_session.testpmd_shell.rst | 6 + doc/api/dts/framework.runner.rst | 6 + doc/api/dts/framework.settings.rst | 6 + doc/api/dts/framework.test_result.rst | 6 + doc/api/dts/framework.test_suite.rst | 6 + doc/api/dts/framework.testbed_model.cpu.rst | 6 + .../framework.testbed_model.linux_session.rst | 6 + doc/api/dts/framework.testbed_model.node.rst | 6 + .../framework.testbed_model.os_session.rst | 6 + doc/api/dts/framework.testbed_model.port.rst | 6 + .../framework.testbed_model.posix_session.rst | 6 + doc/api/dts/framework.testbed_model.rst | 26 + .../dts/framework.testbed_model.sut_node.rst | 6 + .../dts/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 + doc/api/dts/framework.utils.rst | 6 + doc/api/dts/index.rst | 43 ++ doc/api/dts/meson.build | 29 + doc/api/meson.build | 13 + doc/guides/conf.py | 41 +- doc/guides/contributing/documentation.rst | 2 + doc/guides/contributing/patches.rst | 4 + doc/guides/tools/dts.rst | 39 +- doc/meson.build | 1 + 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/poetry.lock | 521 +++++++++++++++++- dts/pyproject.toml | 8 + 58 files changed, 1058 insertions(+), 22 deletions(-) create mode 100755 buildtools/get-dts-deps.py create mode 120000 doc/api/dts/conf_yaml_schema.json create mode 120000 doc/api/dts/custom.css create mode 100644 doc/api/dts/framework.config.rst create mode 100644 doc/api/dts/framework.config.types.rst create mode 100644 doc/api/dts/framework.exception.rst create mode 100644 doc/api/dts/framework.logger.rst create mode 100644 doc/api/dts/framework.params.eal.rst create mode 100644 doc/api/dts/framework.params.rst create mode 100644 doc/api/dts/framework.params.testpmd.rst create mode 100644 doc/api/dts/framework.params.types.rst create mode 100644 doc/api/dts/framework.parser.rst create mode 100644 doc/api/dts/framework.remote_session.dpdk_shell.rst create mode 100644 doc/api/dts/framework.remote_session.interactive_remote_session.rst create mode 100644 doc/api/dts/framework.remote_session.interactive_shell.rst create mode 100644 doc/api/dts/framework.remote_session.python_shell.rst create mode 100644 doc/api/dts/framework.remote_session.remote_session.rst create mode 100644 doc/api/dts/framework.remote_session.rst create mode 100644 doc/api/dts/framework.remote_session.ssh_session.rst create mode 100644 doc/api/dts/framework.remote_session.testpmd_shell.rst create mode 100644 doc/api/dts/framework.runner.rst create mode 100644 doc/api/dts/framework.settings.rst create mode 100644 doc/api/dts/framework.test_result.rst create mode 100644 doc/api/dts/framework.test_suite.rst create mode 100644 doc/api/dts/framework.testbed_model.cpu.rst create mode 100644 doc/api/dts/framework.testbed_model.linux_session.rst create mode 100644 doc/api/dts/framework.testbed_model.node.rst create mode 100644 doc/api/dts/framework.testbed_model.os_session.rst create mode 100644 doc/api/dts/framework.testbed_model.port.rst create mode 100644 doc/api/dts/framework.testbed_model.posix_session.rst create mode 100644 doc/api/dts/framework.testbed_model.rst create mode 100644 doc/api/dts/framework.testbed_model.sut_node.rst create mode 100644 doc/api/dts/framework.testbed_model.tg_node.rst create mode 100644 doc/api/dts/framework.testbed_model.traffic_generator.capturing_traffic_generator.rst create mode 100644 doc/api/dts/framework.testbed_model.traffic_generator.rst create mode 100644 doc/api/dts/framework.testbed_model.traffic_generator.scapy.rst create mode 100644 doc/api/dts/framework.testbed_model.traffic_generator.traffic_generator.rst create mode 100644 doc/api/dts/framework.testbed_model.virtual_device.rst create mode 100644 doc/api/dts/framework.utils.rst create mode 100644 doc/api/dts/index.rst create mode 100644 doc/api/dts/meson.build -- 2.34.1