get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/126684/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 126684,
    "url": "http://patches.dpdk.org/api/patches/126684/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230504123749.1417259-5-juraj.linkes@pantheon.tech/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230504123749.1417259-5-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230504123749.1417259-5-juraj.linkes@pantheon.tech",
    "date": "2023-05-04T12:37:49",
    "name": "[RFC,v2,4/4] dts: format docstrigs to google format",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "70b91891ff107df4d4448534590e8934bc8ee45a",
    "submitter": {
        "id": 1626,
        "url": "http://patches.dpdk.org/api/people/1626/?format=api",
        "name": "Juraj Linkeš",
        "email": "juraj.linkes@pantheon.tech"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230504123749.1417259-5-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 27926,
            "url": "http://patches.dpdk.org/api/series/27926/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27926",
            "date": "2023-05-04T12:37:45",
            "name": "dts: add dts api docs",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/27926/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126684/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/126684/checks/",
    "tags": {},
    "related": [],
    "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8488242A5D;\n\tThu,  4 May 2023 14:38:32 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0F3D242D47;\n\tThu,  4 May 2023 14:38:02 +0200 (CEST)",
            "from mail-ej1-f42.google.com (mail-ej1-f42.google.com\n [209.85.218.42]) by mails.dpdk.org (Postfix) with ESMTP id 63C07410DC\n for <dev@dpdk.org>; Thu,  4 May 2023 14:37:59 +0200 (CEST)",
            "by mail-ej1-f42.google.com with SMTP id\n a640c23a62f3a-94f6c285d92so73639966b.3\n for <dev@dpdk.org>; Thu, 04 May 2023 05:37:59 -0700 (PDT)",
            "from localhost.localdomain (ip-46.34.246.203.o2inet.sk.\n [46.34.246.203]) by smtp.gmail.com with ESMTPSA id\n wz13-20020a170906fe4d00b00959c6b9dac8sm13679157ejb.197.2023.05.04.05.37.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 04 May 2023 05:37:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon-tech.20221208.gappssmtp.com; s=20221208; t=1683203879;\n x=1685795879;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=ItoRxVanKy6D7IaGIQZ4Ryqm65ysDjeB2kD3cnEkZQk=;\n b=uL+dQHvn8YC1ZRaolQNyBEMhP6gIqDUgQ1tZMniXbu9kDC/R3sQ0H7Lt2s/yBBp5YO\n 62Q3r2NeTNT2Yedv69KYIrJjjR0ipZ7pcB69qB/q5Yh/h0ECf/D/dHz6K4BD/nFWBfSF\n 4IcQVsCuVjoZ2Qn7GzyHE3AJA39l6VoU/VhTgP9eh+v7WTtqQL65tLhHC3s7cplqcobz\n /4cz2XVRK04qpj1bWzUReSGWyYZ1/iQRw/UTobRxzbpKS+Y2rstJdOCWvipj3b/A9M71\n JMc//pKH7BRzjo9rtoFn1qsWhur/puLhjzg1z8htFOpsFtwjAUfWrdJ1QXgCx7YCfkJi\n eVbw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1683203879; x=1685795879;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=ItoRxVanKy6D7IaGIQZ4Ryqm65ysDjeB2kD3cnEkZQk=;\n b=E4aC5W9xzUCrtFbuJ3JJNBxcQH1NV+oi7C1EsAHmm9lodlkPWx0VBndOI+lysCxVkl\n SNvQUuJcbZc0EkHasoVF1ZDdAHD4kutjwEZdi8naZK6uLjOEh/N/UI46BrIFYEeoeura\n X16rPsnQVnz9RorYK+JKnnuWwUzAEqgGOfvcsnFU90w2a3H7fI0Wa3ZUdJMkSQ0aVeyU\n dxJVV1iRxX6TK3hHef8UJym7MRRP5NvB67uZ9bHr71nbVT3yByfMW/pp4bwRYiM5nac6\n BAuSdEw645jYfUdY0ze3JWSrxLj8NHtdRravgVi0OR3dBx3Ga2Uo00TclQR8ypT/Kfmm\n n0/A==",
        "X-Gm-Message-State": "AC+VfDyoSC+O6o6yRtFmUGw3GnQVN+YBtEZE4rVyXqdjH3unRs06HCLI\n mX8dfpzJoTZ/h4AstP4llDpaiw==",
        "X-Google-Smtp-Source": "\n ACHHUZ5rciLGIV3+ZzhQq0TEKJn3AhW+bpyjTel5GPye+w991n/OSYWB8tGeBnIBv+m2Ed69NxEnNg==",
        "X-Received": "by 2002:a17:907:9725:b0:933:1134:be1e with SMTP id\n jg37-20020a170907972500b009331134be1emr6642266ejc.53.1683203878943;\n Thu, 04 May 2023 05:37:58 -0700 (PDT)",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, lijuan.tu@intel.com,\n bruce.richardson@intel.com, wathsala.vithanage@arm.com,\n jspewock@iol.unh.edu, probb@iol.unh.edu",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Subject": "[RFC PATCH v2 4/4] dts: format docstrigs to google format",
        "Date": "Thu,  4 May 2023 14:37:49 +0200",
        "Message-Id": "<20230504123749.1417259-5-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230504123749.1417259-1-juraj.linkes@pantheon.tech>",
        "References": "<20230323104040.484708-1-juraj.linkes@pantheon.tech>\n <20230504123749.1417259-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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "WIP: only one module is reformatted to serve as a demonstration.\n\nThe google format is documented here [0].\n\n[0]: https://google.github.io/styleguide/pyguide.html\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/framework/testbed_model/node.py | 152 +++++++++++++++++++---------\n 1 file changed, 103 insertions(+), 49 deletions(-)",
    "diff": "diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py\nindex 90467981c3..ad8ef442af 100644\n--- a/dts/framework/testbed_model/node.py\n+++ b/dts/framework/testbed_model/node.py\n@@ -3,8 +3,13 @@\n # Copyright(c) 2022-2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2022-2023 University of New Hampshire\n \n-\"\"\"\n-A node is a generic host that DTS connects to and manages.\n+\"\"\"Common functionality for node management.\n+\n+There's a base class, Node, that's supposed to be extended by other classes\n+with functionality specific to that node type.\n+The only part that can be used standalone is the Node.skip_setup static method,\n+which is a decorator used to skip method execution\n+if skip_setup is passed by the user on the cmdline or in an env variable.\n \"\"\"\n \n from typing import Any, Callable\n@@ -26,10 +31,25 @@\n \n \n class Node(object):\n-    \"\"\"\n-    Basic class for node management. This class implements methods that\n-    manage a node, such as information gathering (of CPU/PCI/NIC) and\n-    environment setup.\n+    \"\"\"The base class for node management.\n+\n+    It shouldn't be instantiated, but rather extended.\n+    It implements common methods to manage any node:\n+\n+       * connection to the node\n+       * information gathering of CPU\n+       * hugepages setup\n+\n+    Arguments:\n+        node_config: The config from the input configuration file.\n+\n+    Attributes:\n+        main_session: The primary OS-agnostic remote session used\n+            to communicate with the node.\n+        config: The configuration used to create the node.\n+        name: The name of the node.\n+        lcores: The list of logical cores that DTS can use on the node.\n+            It's derived from logical cores present on the node and user configuration.\n     \"\"\"\n \n     main_session: OSSession\n@@ -56,65 +76,89 @@ def __init__(self, node_config: NodeConfiguration):\n         self._logger.info(f\"Created node: {self.name}\")\n \n     def set_up_execution(self, execution_config: ExecutionConfiguration) -> None:\n-        \"\"\"\n-        Perform the execution setup that will be done for each execution\n-        this node is part of.\n+        \"\"\"Execution setup steps.\n+\n+        Configure hugepages and call self._set_up_execution where\n+        the rest of the configuration steps (if any) are implemented.\n+\n+        Args:\n+            execution_config: The execution configuration according to which\n+                the setup steps will be taken.\n         \"\"\"\n         self._setup_hugepages()\n         self._set_up_execution(execution_config)\n \n     def _set_up_execution(self, execution_config: ExecutionConfiguration) -> None:\n-        \"\"\"\n-        This method exists to be optionally overwritten by derived classes and\n-        is not decorated so that the derived class doesn't have to use the decorator.\n+        \"\"\"Optional additional execution setup steps for derived classes.\n+\n+        Derived classes should overwrite this\n+        if they want to add additional execution setup steps.\n         \"\"\"\n \n     def tear_down_execution(self) -> None:\n-        \"\"\"\n-        Perform the execution teardown that will be done after each execution\n-        this node is part of concludes.\n+        \"\"\"Execution teardown steps.\n+\n+        There are currently no common execution teardown steps\n+        common to all DTS node types.\n         \"\"\"\n         self._tear_down_execution()\n \n     def _tear_down_execution(self) -> None:\n-        \"\"\"\n-        This method exists to be optionally overwritten by derived classes and\n-        is not decorated so that the derived class doesn't have to use the decorator.\n+        \"\"\"Optional additional execution teardown steps for derived classes.\n+\n+        Derived classes should overwrite this\n+        if they want to add additional execution teardown steps.\n         \"\"\"\n \n     def set_up_build_target(\n         self, build_target_config: BuildTargetConfiguration\n     ) -> None:\n-        \"\"\"\n-        Perform the build target setup that will be done for each build target\n-        tested on this node.\n+        \"\"\"Build target setup steps.\n+\n+        There are currently no common build target setup steps\n+        common to all DTS node types.\n+\n+        Args:\n+            build_target_config: The build target configuration according to which\n+                the setup steps will be taken.\n         \"\"\"\n         self._set_up_build_target(build_target_config)\n \n     def _set_up_build_target(\n         self, build_target_config: BuildTargetConfiguration\n     ) -> None:\n-        \"\"\"\n-        This method exists to be optionally overwritten by derived classes and\n-        is not decorated so that the derived class doesn't have to use the decorator.\n+        \"\"\"Optional additional build target setup steps for derived classes.\n+\n+        Derived classes should optionally overwrite this\n+        if they want to add additional build target setup steps.\n         \"\"\"\n \n     def tear_down_build_target(self) -> None:\n-        \"\"\"\n-        Perform the build target teardown that will be done after each build target\n-        tested on this node.\n+        \"\"\"Build target teardown steps.\n+\n+        There are currently no common build target teardown steps\n+        common to all DTS node types.\n         \"\"\"\n         self._tear_down_build_target()\n \n     def _tear_down_build_target(self) -> None:\n-        \"\"\"\n-        This method exists to be optionally overwritten by derived classes and\n-        is not decorated so that the derived class doesn't have to use the decorator.\n+        \"\"\"Optional additional build target teardown steps for derived classes.\n+\n+        Derived classes should overwrite this\n+        if they want to add additional build target teardown steps.\n         \"\"\"\n \n     def create_session(self, name: str) -> OSSession:\n-        \"\"\"\n-        Create and return a new OSSession tailored to the remote OS.\n+        \"\"\"Create and return a new OS-agnostic remote session.\n+\n+        The returned session won't be used by the object creating it.\n+        Will be cleaned up automatically.\n+\n+        Args:\n+            name: The name of the session.\n+\n+        Returns:\n+            A new OS-agnostic remote session.\n         \"\"\"\n         session_name = f\"{self.name} {name}\"\n         connection = create_session(\n@@ -130,14 +174,24 @@ def filter_lcores(\n         filter_specifier: LogicalCoreCount | LogicalCoreList,\n         ascending: bool = True,\n     ) -> list[LogicalCore]:\n-        \"\"\"\n-        Filter the LogicalCores found on the Node according to\n-        a LogicalCoreCount or a LogicalCoreList.\n+        \"\"\"Filter the node's logical cores that DTS can use.\n \n-        If ascending is True, use cores with the lowest numerical id first\n-        and continue in ascending order. If False, start with the highest\n-        id and continue in descending order. This ordering affects which\n-        sockets to consider first as well.\n+        Logical cores that DTS can use are ones that are present on the node,\n+        but filtered according to user config.\n+        The filter_specifier will filter cores from those logical cores.\n+\n+        Args:\n+            filter_specifier: Two different filters can be used, one that specifies\n+                the number of logical cores per core, cores per socket and\n+                the number of sockets,\n+                the other that specifies a logical core list.\n+            ascending: If True, use cores with the lowest numerical id first\n+                and continue in ascending order. If False, start with the highest\n+                id and continue in descending order. This ordering affects which\n+                sockets to consider first as well.\n+\n+        Returns:\n+            A list of logical cores.\n         \"\"\"\n         self._logger.debug(f\"Filtering {filter_specifier} from {self.lcores}.\")\n         return lcore_filter(\n@@ -147,17 +201,14 @@ def filter_lcores(\n         ).filter()\n \n     def _get_remote_cpus(self) -> None:\n-        \"\"\"\n-        Scan CPUs in the remote OS and store a list of LogicalCores.\n-        \"\"\"\n+        \"\"\"Scan CPUs in the remote OS and store a list of LogicalCores.\"\"\"\n         self._logger.info(\"Getting CPU information.\")\n         self.lcores = self.main_session.get_remote_cpus(self.config.use_first_core)\n \n     def _setup_hugepages(self):\n-        \"\"\"\n-        Setup hugepages on the Node. Different architectures can supply different\n-        amounts of memory for hugepages and numa-based hugepage allocation may need\n-        to be considered.\n+        \"\"\"Setup hugepages on the Node.\n+\n+        Configure the hugepages only if they're specified in user configuration.\n         \"\"\"\n         if self.config.hugepages:\n             self.main_session.setup_hugepages(\n@@ -165,9 +216,7 @@ def _setup_hugepages(self):\n             )\n \n     def close(self) -> None:\n-        \"\"\"\n-        Close all connections and free other resources.\n-        \"\"\"\n+        \"\"\"Close all connections and free other resources.\"\"\"\n         if self.main_session:\n             self.main_session.close()\n         for session in self._other_sessions:\n@@ -176,6 +225,11 @@ def close(self) -> None:\n \n     @staticmethod\n     def skip_setup(func: Callable[..., Any]) -> Callable[..., Any]:\n+        \"\"\"A decorator that skips the decorated function.\n+\n+        When used, the decorator executes an empty lambda function\n+        instead of the decorated function.\n+        \"\"\"\n         if SETTINGS.skip_setup:\n             return lambda *args: None\n         else:\n",
    "prefixes": [
        "RFC",
        "v2",
        "4/4"
    ]
}