From patchwork Wed Nov 15 13:09:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 406 Return-Path: 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 5C38243339; Wed, 15 Nov 2023 14:10:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0901740294; Wed, 15 Nov 2023 14:10:38 +0100 (CET) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mails.dpdk.org (Postfix) with ESMTP id CAAD740285 for ; Wed, 15 Nov 2023 14:10:36 +0100 (CET) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5441305cbd1so10334843a12.2 for ; Wed, 15 Nov 2023 05:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1700053836; x=1700658636; 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=eJix6DbRCn7zanFinPlYHLCqQMHPGgGWAKhOH55vojI=; b=XwjUFFg2l8YGtjlbHv+DpS0r/In1a9HOV/bKWKii7q6byDNjJqZ8oHBhLxdoNIslW3 mFMbqL/qDhDWPWS0nY3x1JliSf78B85Mt8sdHUzcvDDwMsHrvH5ZzwiJvuAmjfuCAQua 5cq3kqJvn0CWwiQtT0ii5ADoWcpJcbMXye5fu7AKLEuPVvxdkJ9m9J/ZApsqUPuafwMu OqDJK+N4Vm1Ckqphq9T+juk5681BYfBNloG9Pr6+D/w9fuLJl0UcvrThB0j3jJxwpdvO KoOkn8UDERfKSy06Wwn9eGa8KFICCAjgGbfmBEj40J/08Br805z5yq5HkE4D5m2b4XIh jYFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700053836; x=1700658636; 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=eJix6DbRCn7zanFinPlYHLCqQMHPGgGWAKhOH55vojI=; b=SlX2ULw5uOek84MAH+5PFNZ5i/gjwE/NI4yhf68+IIyCQKECE2VRzYryP+0xIEVtXh ggGxNtAL8GCXokALFzcjG377w/13T79eQAUKnDKCDRCW2h5ZOUPfyfn9bl2wwFZsEVVi yuvAntj8bKIVuaJs79WjKEFKdFhwFleJcvuGG5NxqJw0QJC2y7xgI9UALyxDPLnaioYZ 91HhZknxh51qu0BhCvUPtk4e4qx43AoUWJn6s8G9KFS6arwoi+Uj3iG4qSYSx/Lgwn+7 wU2DTwiJ5TzkqTjWro+zqBmqQYU6BUkxdWAbxL0dJ8ySvEGxG1agpEcmFVa8PX00Bg3C wT5g== X-Gm-Message-State: AOJu0YwBSMl+7/6+Wkgjvch1g+hljXer8X974KBAyBFN+7ajYBbO5MU6 IUfdEi2n5Ib44KTC07czFiEJTw== X-Google-Smtp-Source: AGHT+IHzc9NPhnMC9kyMYXWGB09cu9wkO6P6S2bc8TjJeT7I+H2THpN8FhJiShMKR185v15TAwenaQ== X-Received: by 2002:a17:906:c011:b0:9e5:e7da:8cfd with SMTP id e17-20020a170906c01100b009e5e7da8cfdmr9560456ejz.11.1700053836445; Wed, 15 Nov 2023 05:10:36 -0800 (PST) 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 tb16-20020a1709078b9000b009f2b7282387sm1011914ejc.46.2023.11.15.05.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:10:20 -0800 (PST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com Cc: dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= Subject: [PATCH v7 00/21] dts: docstrings update Date: Wed, 15 Nov 2023 14:09:38 +0100 Message-Id: <20231115130959.39420-1-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231108125324.191005-23-juraj.linkes@pantheon.tech> References: <20231108125324.191005-23-juraj.linkes@pantheon.tech> MIME-Version: 1.0 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 first commit makes changes to the code. These code changes mainly change the structure of the code so that the actual API docs generation works. There are also some code changes which get reflected in the documentation, such as making functions/methods/attributes private or public. The rest of the commits deal with the actual docstring documentation (from which the API docs are generated). The format of the docstrings is the Google format [0] with PEP257 [1] and some guidelines captured in the last commit of this group covering what the Google format doesn't. The docstring updates are split into many commits to make review possible. When accepted, they may be squashed. The docstrings have been composed in anticipation of [2], adhering to maximum line length of 100. We don't have a tool for automatic docstring formatting, hence the usage of 100 right away to save time. NOTE: The logger.py module is not fully documented, as it's being refactored and the refactor will be submitted in the near future. Documenting it now seems unnecessary. [0] https://google.github.io/styleguide/pyguide.html#s3.8.4-comments-in-classes [1] https://peps.python.org/pep-0257/ [2] https://patches.dpdk.org/project/dpdk/list/?series=29844 v7: Split the series into docstrings and api docs generation and addressed comments. Juraj Linkeš (21): dts: code adjustments for doc generation dts: add docstring checker dts: add basic developer docs dts: exceptions docstring update dts: settings docstring update dts: logger and utils docstring update dts: dts runner and main docstring update dts: test suite docstring update dts: test result docstring update dts: config docstring update dts: remote session docstring update dts: interactive remote session docstring update dts: port and virtual device docstring update dts: cpu docstring update dts: os session docstring update dts: posix and linux sessions docstring update dts: node docstring update dts: sut and tg nodes docstring update dts: base traffic generators docstring update dts: scapy tg docstring update dts: test suites docstring update doc/guides/tools/dts.rst | 73 +++ dts/framework/__init__.py | 12 +- dts/framework/config/__init__.py | 379 +++++++++++++--- dts/framework/config/types.py | 132 ++++++ dts/framework/dts.py | 161 +++++-- dts/framework/exception.py | 156 ++++--- dts/framework/logger.py | 72 ++- dts/framework/remote_session/__init__.py | 80 ++-- .../interactive_remote_session.py | 36 +- .../remote_session/interactive_shell.py | 152 +++++++ dts/framework/remote_session/os_session.py | 284 ------------ dts/framework/remote_session/python_shell.py | 32 ++ .../remote_session/remote/__init__.py | 27 -- .../remote/interactive_shell.py | 133 ------ .../remote_session/remote/python_shell.py | 12 - .../remote_session/remote/remote_session.py | 172 ------- .../remote_session/remote/testpmd_shell.py | 49 -- .../remote_session/remote_session.py | 232 ++++++++++ .../{remote => }/ssh_session.py | 28 +- dts/framework/remote_session/testpmd_shell.py | 86 ++++ dts/framework/settings.py | 190 ++++++-- dts/framework/test_result.py | 296 +++++++++--- dts/framework/test_suite.py | 230 +++++++--- dts/framework/testbed_model/__init__.py | 28 +- dts/framework/testbed_model/{hw => }/cpu.py | 209 ++++++--- dts/framework/testbed_model/hw/__init__.py | 27 -- dts/framework/testbed_model/hw/port.py | 60 --- .../testbed_model/hw/virtual_device.py | 16 - .../linux_session.py | 69 ++- dts/framework/testbed_model/node.py | 216 ++++++--- dts/framework/testbed_model/os_session.py | 425 ++++++++++++++++++ dts/framework/testbed_model/port.py | 93 ++++ .../posix_session.py | 85 +++- dts/framework/testbed_model/sut_node.py | 232 ++++++---- dts/framework/testbed_model/tg_node.py | 70 ++- .../testbed_model/traffic_generator.py | 72 --- .../traffic_generator/__init__.py | 44 ++ .../capturing_traffic_generator.py | 52 ++- .../{ => traffic_generator}/scapy.py | 114 ++--- .../traffic_generator/traffic_generator.py | 87 ++++ dts/framework/testbed_model/virtual_device.py | 29 ++ dts/framework/utils.py | 128 +++--- dts/main.py | 17 +- dts/poetry.lock | 12 +- dts/pyproject.toml | 6 +- dts/tests/TestSuite_hello_world.py | 16 +- dts/tests/TestSuite_os_udp.py | 19 +- dts/tests/TestSuite_smoke_tests.py | 53 ++- 48 files changed, 3511 insertions(+), 1692 deletions(-) create mode 100644 dts/framework/config/types.py rename dts/framework/remote_session/{remote => }/interactive_remote_session.py (76%) create mode 100644 dts/framework/remote_session/interactive_shell.py delete mode 100644 dts/framework/remote_session/os_session.py create mode 100644 dts/framework/remote_session/python_shell.py delete mode 100644 dts/framework/remote_session/remote/__init__.py delete mode 100644 dts/framework/remote_session/remote/interactive_shell.py delete mode 100644 dts/framework/remote_session/remote/python_shell.py delete mode 100644 dts/framework/remote_session/remote/remote_session.py delete mode 100644 dts/framework/remote_session/remote/testpmd_shell.py create mode 100644 dts/framework/remote_session/remote_session.py rename dts/framework/remote_session/{remote => }/ssh_session.py (83%) create mode 100644 dts/framework/remote_session/testpmd_shell.py rename dts/framework/testbed_model/{hw => }/cpu.py (50%) delete mode 100644 dts/framework/testbed_model/hw/__init__.py delete mode 100644 dts/framework/testbed_model/hw/port.py delete mode 100644 dts/framework/testbed_model/hw/virtual_device.py rename dts/framework/{remote_session => testbed_model}/linux_session.py (79%) create mode 100644 dts/framework/testbed_model/os_session.py create mode 100644 dts/framework/testbed_model/port.py rename dts/framework/{remote_session => testbed_model}/posix_session.py (74%) delete mode 100644 dts/framework/testbed_model/traffic_generator.py create mode 100644 dts/framework/testbed_model/traffic_generator/__init__.py rename dts/framework/testbed_model/{ => traffic_generator}/capturing_traffic_generator.py (66%) rename dts/framework/testbed_model/{ => traffic_generator}/scapy.py (71%) create mode 100644 dts/framework/testbed_model/traffic_generator/traffic_generator.py create mode 100644 dts/framework/testbed_model/virtual_device.py