{"id":17875,"url":"https://patchwork.libcamera.org/api/1.1/patches/17875/?format=json","web_url":"https://patchwork.libcamera.org/patch/17875/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221124113550.2182342-10-paul.elder@ideasonboard.com>","date":"2022-11-24T11:35:47","name":"[libcamera-devel,v4,09/12] utils: libtuning: parsers: Add yaml parser","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"5cc5b32110a50dda6f7825c260138f03b028d06e","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17875/mbox/","series":[{"id":3636,"url":"https://patchwork.libcamera.org/api/1.1/series/3636/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3636","date":"2022-11-24T11:35:38","name":"utils: tuning: Add a new tuning infrastructure","version":4,"mbox":"https://patchwork.libcamera.org/series/3636/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17875/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17875/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 68957BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Nov 2022 11:36:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3749D6331C;\n\tThu, 24 Nov 2022 12:36:20 +0100 (CET)","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 9B61D6331B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 12:36:18 +0100 (CET)","from pyrite.tail37cf.ts.net (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1765D496;\n\tThu, 24 Nov 2022 12:36:16 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669289780;\n\tbh=G750lojvZ6bd8ltrUOeCxvAIGwzQyDxBta4MuReVT6w=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=cH0eMQtG0o9jlp3/tSiDWrs/wwwFpkuIhKFN4mIG5reHtOQTu8Q3p6h+BIJT1UFKs\n\t3/7LSx8Ai4SgI1Fr8kvsdTnodIMpkoGsmcmJLfcvdOFVowibMaqi3HOZ0UJW3WQj4j\n\tJgP5cBfNjUcBIrFVDsCpmuNLTYS6bdhlNdSPXA3XnvKg/DA/EFpuPgj2u7iBOm/v4b\n\tBqN1jAuTfLy62WxmGfcrgnwkDkzF9HO0IV4oyNySynijN0kxXpBjfHAXWprBSKYxyA\n\tw/+XLQCFxlVlijiyFHLvEDvFLRLzpo7iToPe0Lqp/KnxzHGGJsGoCbs2lOF6/usbG8\n\tG3V8tXEJporZw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1669289778;\n\tbh=G750lojvZ6bd8ltrUOeCxvAIGwzQyDxBta4MuReVT6w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=KXUIfB53RfrsLWgkFKpFZEohaZEyfICK1s4MitgCoI3cXyqL7bumRbHnpoMLTcSRr\n\tAzgsnLOOgl6Mervo9N4yH1FwMWFqxsibYDak0JhM0hD3IdbiIWRSaHFppvRHCyw7j7\n\tmI0wfMKddJBs8Wlw2dnNf/XPpmQWBg0j/RiImVuU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KXUIfB53\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 24 Nov 2022 20:35:47 +0900","Message-Id":"<20221124113550.2182342-10-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20221124113550.2182342-1-paul.elder@ideasonboard.com>","References":"<20221124113550.2182342-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 09/12] utils: libtuning: parsers: Add\n\tyaml parser","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>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a parser to libtuning for parsing configuration files in yaml\nformat.\n\nAt the moment it doesn't parse anything and simply returns an empty\nconfig. This is fine for the time being, as the only user of it is the\nrkisp1 tuning script, which only has an LSC module which doesn't consume\nanything from the configuration file. When a module comes around that\nrequires the yaml parser, it can be implemented then.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v3:\n- add file description\n- remove indirection from fake polymorphism\n- update commit message to reflect the fact that it doesn't actually do\n  anything at the moment\n---\n utils/tuning/libtuning/parsers/__init__.py    |  1 +\n utils/tuning/libtuning/parsers/yaml_parser.py | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+)\n create mode 100644 utils/tuning/libtuning/parsers/yaml_parser.py","diff":"diff --git a/utils/tuning/libtuning/parsers/__init__.py b/utils/tuning/libtuning/parsers/__init__.py\nindex 9d20d2fc..022c1e5d 100644\n--- a/utils/tuning/libtuning/parsers/__init__.py\n+++ b/utils/tuning/libtuning/parsers/__init__.py\n@@ -3,3 +3,4 @@\n # Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com>\n \n from libtuning.parsers.raspberrypi_parser import RaspberryPiParser\n+from libtuning.parsers.yaml_parser import YamlParser\ndiff --git a/utils/tuning/libtuning/parsers/yaml_parser.py b/utils/tuning/libtuning/parsers/yaml_parser.py\nnew file mode 100644\nindex 00000000..5c1673a5\n--- /dev/null\n+++ b/utils/tuning/libtuning/parsers/yaml_parser.py\n@@ -0,0 +1,17 @@\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+#\n+# Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com>\n+#\n+# yaml_parser.py - Parser for YAML format config file\n+\n+from .parser import Parser\n+\n+\n+class YamlParser(Parser):\n+    def __init__(self):\n+        super().__init__()\n+\n+    # \\todo Implement this (it's fine for now as we don't need a config for\n+    # rkisp1 LSC, which is the only user of this so far)\n+    def parse(self, config_file: str, modules: list) -> (dict, list):\n+        return {}, []\n","prefixes":["libcamera-devel","v4","09/12"]}