Coverage for pyEDAA/CLITool/__init__.py: 78%

23 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-07-20 21:06 +0000

1# ==================================================================================================================== # 

2# _____ ____ _ _ ____ _ ___ _____ _ # 

3# _ __ _ _| ____| _ \ / \ / \ / ___| | |_ _|_ _|__ ___ | | # 

4# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | |/ _ \ / _ \| | # 

5# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |___| |___ | | | | (_) | (_) | | # 

6# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)____|_____|___| |_|\___/ \___/|_| # 

7# |_| |___/ # 

8# ==================================================================================================================== # 

9# Authors: # 

10# Patrick Lehmann # 

11# # 

12# License: # 

13# ==================================================================================================================== # 

14# Copyright 2017-2026 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-2026, Patrick Lehmann, Unai Martinez-Corral" 

36__license__ = "Apache License, Version 2.0" 

37__version__ = "0.4.4" 

38__keywords__ = ["cli", "abstraction layer", "eda"] 

39__project_url__ = "https://github.com/edaa-org/pyEDAA.CLITool" 

40__documentation_url__ = "https://edaa-org.github.io/pyEDAA.CLITool" 

41__issue_tracker_url__ = "https://GitHub.com/edaa-org/pyEDAA.CLITool/issues" 

42 

43from pathlib import Path 

44from typing import Any, Optional as Nullable 

45 

46from pyTooling.Decorators import export 

47from pyTooling.Exceptions import ExceptionBase 

48from pyTooling.MetaClasses import ExtendedType 

49 

50 

51@export 

52class CLIToolException(ExceptionBase): 

53 """Base-class for all pyEDAA.CLITool specific exceptions.""" 

54 

55 

56class ToolMixIn(metaclass=ExtendedType, mixin=True): 

57 _platform: str 

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()