Show a patch.

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

{
    "id": 20912,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20912/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20912/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20240814094134.73333-3-stefan.klug@ideasonboard.com>",
    "date": "2024-08-14T09:41:31",
    "name": "[v2,2/2] utils: tuning: Change Tuner.add() to accept a list of modules",
    "commit_ref": "53108b6ff1c5ea93bee9f8c5329c840e24f24a8d",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a6052bda45cd60ae3637dd749646bf3ca2b6d0f1",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20912/mbox/",
    "series": [
        {
            "id": 4519,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4519/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4519",
            "date": "2024-08-14T09:41:29",
            "name": "Two small tuning script cleanups",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4519/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20912/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20912/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0A6A9BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Aug 2024 09:41:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0C94633C0;\n\tWed, 14 Aug 2024 11:41:46 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C0A6661946\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Aug 2024 11:41:43 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:8a6:aa2:ebee:5ae5])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 246E783D;\n\tWed, 14 Aug 2024 11:40:46 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"HqNoJMvB\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723628446;\n\tbh=28iV49HVIUdybCC32NHQSu7GlpNR66Dk9Oedz9JmgOM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HqNoJMvBKHDRmu2s16GypBlg6NOvlFEVVIydlkFSUtir9yDzNotYnsxL9x6ImKCiF\n\tvi7XI3iudu0TxUk/qE4PTJQM2k3PuD9AdQ+Oj73etWTL0zAWpvBpjWueQU/Eebp+YQ\n\tm6/h8aVy9S4LAdKTjxqjv3EOWeApOlbYKHGkxJ8k=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v2 2/2] utils: tuning: Change Tuner.add() to accept a list of\n\tmodules",
        "Date": "Wed, 14 Aug 2024 11:41:31 +0200",
        "Message-ID": "<20240814094134.73333-3-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240814094134.73333-1-stefan.klug@ideasonboard.com>",
        "References": "<20240814094134.73333-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Change the first parameter of Tuner.add() to accept either a list of\nmodules or a single module. This allows more compact code and is in sync\nwith Tuner.set_output_order().\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n utils/tuning/libtuning/libtuning.py |  5 ++++-\n utils/tuning/rkisp1.py              | 10 +---------\n 2 files changed, 5 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/utils/tuning/libtuning/libtuning.py b/utils/tuning/libtuning/libtuning.py\nindex e7c63535fefd..bac573235040 100644\n--- a/utils/tuning/libtuning/libtuning.py\n+++ b/utils/tuning/libtuning/libtuning.py\n@@ -95,7 +95,10 @@ class Tuner(object):\n         self.output = {}\n \n     def add(self, module):\n-        self.modules.append(module)\n+        if isinstance(module, list):\n+            self.modules.extend(module)\n+        else:\n+            self.modules.append(module)\n \n     def set_input_parser(self, parser):\n         self.parser = parser\ndiff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py\nindex 5d7a69fc4a13..f5c42a61d15e 100755\n--- a/utils/tuning/rkisp1.py\n+++ b/utils/tuning/rkisp1.py\n@@ -45,15 +45,7 @@ lsc = LSCRkISP1(debug=[lt.Debug.Plot],\n                 smoothing_function=lt.smoothing.MedianBlur(3),)\n \n tuner = lt.Tuner('RkISP1')\n-tuner.add(agc)\n-tuner.add(awb)\n-tuner.add(blc)\n-tuner.add(ccm)\n-tuner.add(color_processing)\n-tuner.add(filter)\n-tuner.add(gamma_out)\n-tuner.add(lsc)\n-\n+tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc])\n tuner.set_input_parser(YamlParser())\n tuner.set_output_formatter(YamlOutput())\n tuner.set_output_order([agc, awb, blc, ccm, color_processing,\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}