__init__.py
Summary
- Lines:
18 of 23 covered (78.3%)
- Coverage:
78.3%
- Directory:
- Missed lines:
64-68
Source
pyEDAA/CLITool/__init__.pycoveredpartialuncoveredexcludednot executable
1# ==================================================================================================================== #
2# _____ ____ _ _ ____ _ ___ _____ _ #
3# _ __ _ _| ____| _ \ / \ / \ / ___| | |_ _|_ _|__ ___ | | #
4# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | |/ _ \ / _ \| | #
5# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |___| |___ | | | | (_) | (_) | | #
6# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)____|_____|___| |_|\___/ \___/|_| #
7# |_| |___/ #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2021-2026 Electronic Design Automation Abstraction (EDA²) #
15# Copyright 2017-2020 Patrick Lehmann - Boetzingen, Germany #
16# Copyright 2014-2016 Technische Universitaet Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture #
17# #
18# Licensed under the Apache License, Version 2.0 (the "License"); #
19# you may not use this file except in compliance with the License. #
20# You may obtain a copy of the License at #
21# #
22# http://www.apache.org/licenses/LICENSE-2.0 #
23# #
24# Unless required by applicable law or agreed to in writing, software #
25# distributed under the License is distributed on an "AS IS" BASIS, #
26# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
27# See the License for the specific language governing permissions and #
28# limitations under the License. #
29# #
30# SPDX-License-Identifier: Apache-2.0 #
31# ==================================================================================================================== #
32#
33"""An abstraction layer of EDA CLI tools."""
34__author__ = "Patrick Lehmann"
35__email__ = "Paebbels@gmail.com"
36__copyright__ = "2021-2026, Electronic Design Automation Abstraction (EDA²)"
37__license__ = "Apache License, Version 2.0"
38__version__ = "0.5.0"
39__keywords__ = ["cli", "abstraction layer", "eda"]
40__project_url__ = "https://github.com/edaa-org/pyEDAA.CLITool"
41__documentation_url__ = "https://edaa-org.github.io/pyEDAA.CLITool"
42__issue_tracker_url__ = "https://GitHub.com/edaa-org/pyEDAA.CLITool/issues"
43
44from pathlib import Path
45from typing import Any, Optional as Nullable
46
47from pyTooling.Decorators import export
48from pyTooling.Exceptions import ExceptionBase
49from pyTooling.MetaClasses import ExtendedType
50
51
52@export
53class CLIToolException(ExceptionBase):
54 """Base-class for all pyEDAA.CLITool specific exceptions."""
55
56
57class ToolMixIn(metaclass=ExtendedType, mixin=True, expects=("_platform",)):
58 _dryrun: bool
59 _binaryDirectoryPath: Path
60 _version: str
61 _logger: Any
62
63 def __init__(self, platform: str, dryrun: bool, binaryDirectoryPath: Path, version: str, logger: Nullable[Any] =None) -> None:
64 self._platform = platform
65 self._dryrun = dryrun
66 self._binaryDirectoryPath = binaryDirectoryPath
67 self._version = version
68 self._logger = logger
69 # self._environment = Environment()