Coverage for pyEDAA/CLITool/Docker.py: 100%
29 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-16 22:22 +0000
« prev ^ index » next coverage.py v7.8.0, created at 2025-05-16 22:22 +0000
1# ==================================================================================================================== #
2# _____ ____ _ _ ____ _ ___ _____ _ #
3# _ __ _ _| ____| _ \ / \ / \ / ___| | |_ _|_ _|__ ___ | | #
4# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | |/ _ \ / _ \| | #
5# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |___| |___ | | | | (_) | (_) | | #
6# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)____|_____|___| |_|\___/ \___/|_| #
7# |_| |___/ #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2021-2025 Patrick Lehmann - Boetzingen, Germany #
15# #
16# Licensed under the Apache License, Version 2.0 (the "License"); #
17# you may not use this file except in compliance with the License. #
18# You may obtain a copy of the License at #
19# #
20# http://www.apache.org/licenses/LICENSE-2.0 #
21# #
22# Unless required by applicable law or agreed to in writing, software #
23# distributed under the License is distributed on an "AS IS" BASIS, #
24# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
25# See the License for the specific language governing permissions and #
26# limitations under the License. #
27# #
28# SPDX-License-Identifier: Apache-2.0 #
29# ==================================================================================================================== #
30#
31"""This module contains the CLI abstraction layer for `GHDL <https://github.com/ghdl/ghdl>`__."""
32from pyTooling.Decorators import export
34from pyTooling.CLIAbstraction import CLIArgument, Executable
35from pyTooling.CLIAbstraction.Argument import ExecutableArgument, StringArgument
36from pyTooling.CLIAbstraction.Command import CommandArgument
37from pyTooling.CLIAbstraction.Flag import LongFlag
38from pyTooling.CLIAbstraction.ValuedTupleFlag import LongTupleFlag
41@export
42class Docker(Executable):
43 _executableNames = {
44 "Darwin": "docker",
45 "FreeBSD": "docker",
46 "Linux": "docker",
47 "Windows": "docker.exe"
48 }
50 # 'version' sub commands and options
51 @CLIArgument()
52 class CommandVersion(CommandArgument, name="version"): ...
54 # 'container' sub commands and options
55 @CLIArgument()
56 class CommandContainer(CommandArgument, name="container"): ...
58 @CLIArgument()
59 class CommandRun(CommandArgument, name="run"): ...
61 @CLIArgument()
62 class FlagContainerName(LongTupleFlag, name="name"): ...
64 @CLIArgument()
65 class FlagRemoveContainer(LongFlag, name="rm"): ...
67 @CLIArgument()
68 class FlagMount(LongTupleFlag, name="mount"): ...
70 @CLIArgument()
71 class FlagVolume(LongTupleFlag, name="volume"): ...
73 @CLIArgument()
74 class ValueImageName(StringArgument): ...
76 @CLIArgument()
77 class ValueCommand(StringArgument): ...
79 @CLIArgument()
80 class Executable(ExecutableArgument): ... # XXX: no argument here