Skip to content

Commit 0f89bf3

Browse files
committed
utils: libtuning: parsers: Add yaml parser
Add a parser to libtuning for parsing configuration files in yaml format. At the moment it doesn't parse anything and simply returns an empty config. This is fine for the time being, as the only user of it is the rkisp1 tuning script, which only has an LSC module which doesn't consume anything from the configuration file. When a module comes around that requires the yaml parser, it can be implemented then. Signed-off-by: Paul Elder <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
1 parent b44ee5c commit 0f89bf3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

utils/tuning/libtuning/parsers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# Copyright (C) 2022, Paul Elder <[email protected]>
44

55
from libtuning.parsers.raspberrypi_parser import RaspberryPiParser
6+
from libtuning.parsers.yaml_parser import YamlParser
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# Copyright (C) 2022, Paul Elder <[email protected]>
4+
#
5+
# yaml_parser.py - Parser for YAML format config file
6+
7+
from .parser import Parser
8+
9+
10+
class YamlParser(Parser):
11+
def __init__(self):
12+
super().__init__()
13+
14+
# \todo Implement this (it's fine for now as we don't need a config for
15+
# rkisp1 LSC, which is the only user of this so far)
16+
def parse(self, config_file: str, modules: list) -> (dict, list):
17+
return {}, []

0 commit comments

Comments
 (0)