Coverage for pyEDAA/CLITool/__init__.py: 80%
25 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 2017-2025 Patrick Lehmann - Boetzingen, Germany #
15# Copyright 2014-2016 Technische Universitaet Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture #
16# #
17# Licensed under the Apache License, Version 2.0 (the "License"); #
18# you may not use this file except in compliance with the License. #
19# You may obtain a copy of the License at #
20# #
21# http://www.apache.org/licenses/LICENSE-2.0 #
22# #
23# Unless required by applicable law or agreed to in writing, software #
24# distributed under the License is distributed on an "AS IS" BASIS, #
25# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
26# See the License for the specific language governing permissions and #
27# limitations under the License. #
28# #
29# SPDX-License-Identifier: Apache-2.0 #
30# ==================================================================================================================== #
31#
32"""An abstraction layer of EDA CLI tools."""
33__author__ = "Patrick Lehmann"
34__email__ = "Paebbels@gmail.com"
35__copyright__ = "2014-2025, Patrick Lehmann, Unai Martinez-Corral"
36__license__ = "Apache License, Version 2.0"
37__version__ = "0.3.6"
38__keywords__ = ["cli", "abstraction layer", "eda"]
40from pathlib import Path
41from typing import Any, Optional as Nullable
43from pyTooling.Decorators import export
44from pyTooling.Exceptions import ExceptionBase
45from pyTooling.MetaClasses import ExtendedType
48@export
49class CLIToolException(ExceptionBase):
50 """Base-class for all pyEDAA.CLITool specific exceptions."""
53class ToolMixIn(metaclass=ExtendedType, mixin=True):
54 _platform: str
55 _dryrun: bool
56 _binaryDirectoryPath: Path
57 _version: str
58 _logger: Any
60 def __init__(self, platform: str, dryrun: bool, binaryDirectoryPath: Path, version: str, logger: Nullable[Any] =None):
61 self._platform = platform
62 self._dryrun = dryrun
63 self._binaryDirectoryPath = binaryDirectoryPath
64 self._version = version
65 self._logger = logger
66 # self._environment = Environment()