From 66d24b1b5806a3d8976674f9ad27991733911117 Mon Sep 17 00:00:00 2001 From: Damian Krolik Date: Tue, 9 Apr 2024 11:25:03 +0200 Subject: [PATCH] zap-gui command --- scripts/setup/nrfconnect/west-commands.yml | 5 +++ scripts/setup/nrfconnect/zap_common.py | 11 +++++++ scripts/setup/nrfconnect/zap_gui.py | 37 ++++++++++++++++++++++ west.yml | 3 -- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 scripts/setup/nrfconnect/zap_common.py create mode 100644 scripts/setup/nrfconnect/zap_gui.py delete mode 100644 west.yml diff --git a/scripts/setup/nrfconnect/west-commands.yml b/scripts/setup/nrfconnect/west-commands.yml index d989ebe1ce..cb3d920363 100644 --- a/scripts/setup/nrfconnect/west-commands.yml +++ b/scripts/setup/nrfconnect/west-commands.yml @@ -5,3 +5,8 @@ west-commands: - name: zap-generate class: ZapGenerate help: Generate ZAP code + - file: scripts/setup/nrfconnect/zap_gui.py + commands: + - name: zap-gui + class: ZapGui + help: Run Matter ZCL Advanced Platform (ZAP) GUI diff --git a/scripts/setup/nrfconnect/zap_common.py b/scripts/setup/nrfconnect/zap_common.py new file mode 100644 index 0000000000..4a1cebc6fc --- /dev/null +++ b/scripts/setup/nrfconnect/zap_common.py @@ -0,0 +1,11 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +from pathlib import Path + +class ZapFinder: + pass + +class ZapInstaller: + INSTALL_DIR = Path('.zap-install') \ No newline at end of file diff --git a/scripts/setup/nrfconnect/zap_gui.py b/scripts/setup/nrfconnect/zap_gui.py new file mode 100644 index 0000000000..b06130bc42 --- /dev/null +++ b/scripts/setup/nrfconnect/zap_gui.py @@ -0,0 +1,37 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +import argparse + +from pathlib import Path +from textwrap import dedent + +from west.commands import WestCommand + +class ZapGui(WestCommand): + + def __init__(self): + super().__init__( + 'zap-gui', + 'Run Matter ZCL Advanced Platform (ZAP) GUI', + dedent(''' + Run Matter ZCL Advanced Platform (ZAP) GUI. + + The ZAP GUI in a node.js tool for configuring the data model + of a Matter application, which defines which clusters, commands, + attributes and events are enabled for the given application.''')) + + def do_add_parser(self, parser_adder): + parser = parser_adder.add_parser( + self.name, help=self.help, + formatter_class=argparse.RawDescriptionHelpFormatter, + description=self.description) + parser.add_argument('-z', '--zap-file', type=Path, + help='Path to data model configuration file (*.zap)') + parser.add_argument('-j', '--zcl-json', type=Path, + help='Path to data model definition file (zcl.json)') + return parser + + def do_run(self, args: argparse.Namespace, unknown_args: list[str]): + pass diff --git a/west.yml b/west.yml deleted file mode 100644 index 8e9926bd83..0000000000 --- a/west.yml +++ /dev/null @@ -1,3 +0,0 @@ -manifest: - self: - west-commands: asdfscripts/setup/nrfconnect/west-commands.yml