get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119481,
    "url": "http://patches.dpdk.org/api/patches/119481/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221104110523.511367-3-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": "<20221104110523.511367-3-juraj.linkes@pantheon.tech>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221104110523.511367-3-juraj.linkes@pantheon.tech",
    "date": "2022-11-04T11:05:16",
    "name": "[v8,2/9] dts: add developer tools",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3f755f83c8c797dc12f274ad9a3c87cdac5e7460",
    "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/20221104110523.511367-3-juraj.linkes@pantheon.tech/mbox/",
    "series": [
        {
            "id": 25575,
            "url": "http://patches.dpdk.org/api/series/25575/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25575",
            "date": "2022-11-04T11:05:14",
            "name": "dts: ssh connection to a node",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/25575/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/119481/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/119481/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 6450DA00C5;\n\tFri,  4 Nov 2022 12:05:49 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1B21842D2A;\n\tFri,  4 Nov 2022 12:05:37 +0100 (CET)",
            "from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20])\n by mails.dpdk.org (Postfix) with ESMTP id 7209A42D23\n for <dev@dpdk.org>; Fri,  4 Nov 2022 12:05:34 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n by lb.pantheon.sk (Postfix) with ESMTP id 86F3E1BA5A5;\n Fri,  4 Nov 2022 12:05:33 +0100 (CET)",
            "from lb.pantheon.sk ([127.0.0.1])\n by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id IFZf3jO2sjbV; Fri,  4 Nov 2022 12:05:31 +0100 (CET)",
            "from entguard.lab.pantheon.local (unknown [46.229.239.141])\n by lb.pantheon.sk (Postfix) with ESMTP id 0170C1BA5A8;\n Fri,  4 Nov 2022 12:05:26 +0100 (CET)"
        ],
        "X-Virus-Scanned": "amavisd-new at siecit.sk",
        "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu,\n lijuan.tu@intel.com, kda@semihalf.com, bruce.richardson@intel.com",
        "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>",
        "Subject": "[PATCH v8 2/9] dts: add developer tools",
        "Date": "Fri,  4 Nov 2022 11:05:16 +0000",
        "Message-Id": "<20221104110523.511367-3-juraj.linkes@pantheon.tech>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221104110523.511367-1-juraj.linkes@pantheon.tech>",
        "References": "<20221103151934.450887-1-juraj.linkes@pantheon.tech>\n <20221104110523.511367-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": "The devtools that check Python code are Black and Isort to format the\ncode and Pylama to do static analysis.\n\nSigned-off-by: Owen Hilyard <ohilyard@iol.unh.edu>\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n devtools/dts-check-format.sh | 87 ++++++++++++++++++++++++++++++++++++\n doc/guides/tools/dts.rst     | 67 +++++++++++++++++++++++++++\n 2 files changed, 154 insertions(+)\n create mode 100755 devtools/dts-check-format.sh",
    "diff": "diff --git a/devtools/dts-check-format.sh b/devtools/dts-check-format.sh\nnew file mode 100755\nindex 0000000000..5a1e495634\n--- /dev/null\n+++ b/devtools/dts-check-format.sh\n@@ -0,0 +1,87 @@\n+#!/bin/sh\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2022 University of New Hampshire\n+\n+usage() {\n+    echo \"Run formatting and linting programs for DTS. Usage:\"\n+\n+    # Get source code comments after getopts arguments and print them both\n+    grep -E '[a-zA-Z]+\\) +#' \"$0\" | tr -d '#'\n+    exit 0\n+}\n+\n+format=true\n+lint=true\n+\n+# Comments after args serve as documentation; must be present\n+while getopts \"hfl\" arg; do\n+    case $arg in\n+    h) # Display this message\n+        usage\n+        ;;\n+    f) # Don't run formatters\n+        format=false\n+        ;;\n+    l) # Don't run linter\n+        lint=false\n+        ;;\n+    *)\n+    esac\n+done\n+\n+\n+errors=0\n+\n+if $format; then\n+    if command -v git > /dev/null; then\n+        if git rev-parse --is-inside-work-tree >&-; then\n+            echo \"Formatting:\"\n+            if command -v black > /dev/null; then\n+                echo \"Formatting code with black:\"\n+                black .\n+            else\n+                echo \"black is not installed, not formatting\"\n+                errors=$((errors + 1))\n+            fi\n+            if command -v isort > /dev/null; then\n+                echo \"Sorting imports with isort:\"\n+                isort .\n+            else\n+                echo \"isort is not installed, not sorting imports\"\n+                errors=$((errors + 1))\n+            fi\n+\n+            git update-index --refresh\n+            retval=$?\n+            if [ $retval -ne 0 ]; then\n+                echo 'The \"needs update\" files have been reformatted.'\n+                echo 'Please update your commit.'\n+            fi\n+            errors=$((errors + retval))\n+        else\n+            echo \".git directory not found, not formatting code\"\n+            errors=$((errors + 1))\n+        fi\n+    else\n+        echo \"git command not found, not formatting code\"\n+        errors=$((errors + 1))\n+    fi\n+fi\n+\n+if $lint; then\n+    if $format; then\n+        echo\n+    fi\n+    echo \"Linting:\"\n+    if command -v pylama > /dev/null; then\n+        pylama .\n+        errors=$((errors + $?))\n+    else\n+        echo \"pylama not found, unable to run linter\"\n+        errors=$((errors + 1))\n+    fi\n+fi\n+\n+echo\n+echo \"Found $errors errors\"\n+exit $errors\ndiff --git a/doc/guides/tools/dts.rst b/doc/guides/tools/dts.rst\nindex 0a88901119..5f67391145 100644\n--- a/doc/guides/tools/dts.rst\n+++ b/doc/guides/tools/dts.rst\n@@ -8,6 +8,44 @@ The DPDK Test Suite, abbreviated DTS, is a Python test framework with test suite\n implementing functional and performance tests used to test DPDK.\n \n \n+DTS Terminology\n+---------------\n+\n+DTS node\n+   A generic description of any host/server DTS connects to.\n+\n+DTS runtime environment\n+   An environment containing Python with packages needed to run DTS.\n+\n+DTS runtime environment node\n+  A node where at least one DTS runtime environment is present.\n+  This is the node where we run DTS and from which DTS connects to other nodes.\n+\n+System under test\n+  An SUT is the combination of DPDK and the hardware we're testing\n+  in conjunction with DPDK (NICs, crypto and other devices).\n+\n+System under test node\n+  A node where at least one SUT is present.\n+\n+Traffic generator\n+  A TG is either software or hardware capable of sending packets.\n+\n+Traffic generator node\n+  A node where at least one TG is present.\n+  In case of hardware traffic generators, the TG and the node are literally the same.\n+\n+\n+In most cases, interchangeably referring to a runtime environment, SUT, TG or the node\n+they're running on (e.g. using SUT and SUT node interchangeably) doesn't cause confusion.\n+There could theoretically be more than of these running on the same node and in that case\n+it's useful to have stricter definitions.\n+An example would be two different traffic generators (such as Trex and Scapy)\n+running on the same node.\n+A different example would be a node containing both a DTS runtime environment\n+and a traffic generator, in which case it's both a DTS runtime environment node and a TG node.\n+\n+\n DTS Environment\n ---------------\n \n@@ -54,3 +92,32 @@ Setting up DTS environment\n \n       poetry install\n       poetry shell\n+\n+\n+DTS Developer Tools\n+-------------------\n+\n+There are three tools used in DTS to help with code checking, style and formatting:\n+\n+* `isort <https://pycqa.github.io/isort/>`_\n+\n+  Alphabetically sorts python imports within blocks.\n+\n+* `black <https://github.com/psf/black>`_\n+\n+  Does most of the actual formatting (whitespaces, comments, line length etc.)\n+  and works similarly to clang-format.\n+\n+* `pylama <https://github.com/klen/pylama>`_\n+\n+  Runs a collection of python linters and aggregates output.\n+  It will run these tools over the repository:\n+\n+  .. literalinclude:: ../../../dts/pyproject.toml\n+     :language: cfg\n+     :start-after: [tool.pylama]\n+     :end-at: linters\n+\n+These three tools are all used in ``devtools/dts-check-format.sh``,\n+the DTS code check and format script.\n+Refer to the script for usage: ``devtools/dts-check-format.sh -h``\n",
    "prefixes": [
        "v8",
        "2/9"
    ]
}