From fcbdfbc631df3d38c6f0cea4119abd30c31bb240 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 18 Feb 2023 22:59:44 +0100 Subject: Bumped dependencies. (cherry picked from commit 3df7680eef2d9efd97857c55a268c3bf98350b0e) --- pyGHDL/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pyGHDL/py.typed diff --git a/pyGHDL/py.typed b/pyGHDL/py.typed new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3 From 789ae58275063c15b75c94e5746246ea5c37dba5 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 15 Mar 2023 08:03:41 +0100 Subject: Bumped dependencies. (cherry picked from commit 8a01be0a33f6c72adac11d6090fad8ab511956f6) --- pyGHDL/cli/requirements.txt | 2 +- pyGHDL/libghdl/requirements.txt | 2 +- pyproject.toml | 2 +- setup.py | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyGHDL/cli/requirements.txt b/pyGHDL/cli/requirements.txt index f24fd4e1c..e07402a28 100644 --- a/pyGHDL/cli/requirements.txt +++ b/pyGHDL/cli/requirements.txt @@ -1,5 +1,5 @@ -r ../dom/requirements.txt -pyTooling>=2.13.0, <3.0 +pyTooling>=3.0.0, <4.0 pyTooling.TerminalUI>=1.5.9 pyAttributes>=2.3.2 diff --git a/pyGHDL/libghdl/requirements.txt b/pyGHDL/libghdl/requirements.txt index a061bb3f4..31f770b15 100644 --- a/pyGHDL/libghdl/requirements.txt +++ b/pyGHDL/libghdl/requirements.txt @@ -1 +1 @@ -pyTooling>=2.13.0, <3.0 +pyTooling>=3.0.0, <4.0 diff --git a/pyproject.toml b/pyproject.toml index db9975c12..54cfb8775 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "pyTooling >= 2.13.0", + "pyTooling >= 3.0.0", "setuptools >= 62.3.3", "wheel >= 0.38.1" ] diff --git a/setup.py b/setup.py index 085d7f8e4..d973a36ed 100644 --- a/setup.py +++ b/setup.py @@ -65,5 +65,8 @@ DescribePythonPackageHostedOnGitHub( consoleScripts={ "ghdl-ls": "pyGHDL.cli.lsp:main", "ghdl-dom": "pyGHDL.cli.dom:main" + }, + dataFiles={ + packageName: ["py.typed"] } ) -- cgit v1.2.3 From 6cc4f94d66a3f4386a78305d78b0cbf95496a98b Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 10 Apr 2023 12:25:37 +0200 Subject: Bumped dependencies. (cherry picked from commit 6f83d43a10737b353e7ed1227086d1c0d13c5fe7) --- pyGHDL/cli/requirements.txt | 2 +- pyGHDL/dom/requirements.txt | 2 +- pyGHDL/libghdl/requirements.txt | 2 +- pyproject.toml | 2 +- testsuite/requirements.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyGHDL/cli/requirements.txt b/pyGHDL/cli/requirements.txt index e07402a28..a2fdd82b3 100644 --- a/pyGHDL/cli/requirements.txt +++ b/pyGHDL/cli/requirements.txt @@ -1,5 +1,5 @@ -r ../dom/requirements.txt -pyTooling>=3.0.0, <4.0 +pyTooling>=4.0.1, <5.0 pyTooling.TerminalUI>=1.5.9 pyAttributes>=2.3.2 diff --git a/pyGHDL/dom/requirements.txt b/pyGHDL/dom/requirements.txt index 01862686c..dcded04a0 100644 --- a/pyGHDL/dom/requirements.txt +++ b/pyGHDL/dom/requirements.txt @@ -1,4 +1,4 @@ -r ../libghdl/requirements.txt -pyVHDLModel==0.23.0 +pyVHDLModel==0.24.1 #https://github.com/VHDL/pyVHDLModel/archive/dev.zip#pyVHDLModel diff --git a/pyGHDL/libghdl/requirements.txt b/pyGHDL/libghdl/requirements.txt index 31f770b15..c66bc6e3a 100644 --- a/pyGHDL/libghdl/requirements.txt +++ b/pyGHDL/libghdl/requirements.txt @@ -1 +1 @@ -pyTooling>=3.0.0, <4.0 +pyTooling>=4.0.1, <5.0 diff --git a/pyproject.toml b/pyproject.toml index 54cfb8775..aaee3ff85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "pyTooling >= 3.0.0", + "pyTooling >= 4.0.1", "setuptools >= 62.3.3", "wheel >= 0.38.1" ] diff --git a/testsuite/requirements.txt b/testsuite/requirements.txt index f66ab3978..576b49bc0 100644 --- a/testsuite/requirements.txt +++ b/testsuite/requirements.txt @@ -1,6 +1,6 @@ -r ../pyGHDL/requirements.txt -pytest>=6.2.1 +pytest>=7.3.0 pytest-cov>=2.10.1 # Coverage collection -- cgit v1.2.3 From 7a28ce3badd18a1b06f7a03a34cd8fa9b5873242 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 10 Apr 2023 12:26:11 +0200 Subject: Adjustments to pyVHDLModel. (cherry picked from commit 506c747238e6d0f17676b3436a5b7d0b7544a8f3) --- pyGHDL/dom/NonStandard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyGHDL/dom/NonStandard.py b/pyGHDL/dom/NonStandard.py index e84396433..31cc28480 100644 --- a/pyGHDL/dom/NonStandard.py +++ b/pyGHDL/dom/NonStandard.py @@ -40,7 +40,7 @@ import time from pathlib import Path from typing import Any -from pyTooling.Decorators import export +from pyTooling.Decorators import export, InheritDocString from pyVHDLModel import VHDLVersion from pyVHDLModel import Design as VHDLModel_Design @@ -85,8 +85,9 @@ from pyGHDL.dom.PSL import VerificationUnit, VerificationProperty, VerificationM @export class Design(VHDLModel_Design): - def __init__(self): - super().__init__() + @InheritDocString(VHDLModel_Design) + def __init__(self, name: str = None): + super().__init__(name) self.__ghdl_init() -- cgit v1.2.3 From 0a14cbcc82ee732aeb4a061b5dfeb1ec16a2ac95 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 10 Apr 2023 12:26:32 +0200 Subject: Adjustments to pyTooling. (cherry picked from commit 29ed1fdb26122ba272ed0da465a998fc267d75d8) --- pyGHDL/cli/dom.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pyGHDL/cli/dom.py b/pyGHDL/cli/dom.py index 442ad6688..04c23575b 100755 --- a/pyGHDL/cli/dom.py +++ b/pyGHDL/cli/dom.py @@ -114,8 +114,8 @@ class Application(LineTerminal, ArgParseMixin): _design: Design - def __init__(self, debug=False, verbose=False, quiet=False, sphinx=False): - super().__init__(verbose, debug, quiet) + def __init__(self): + super().__init__() # Initialize DOM with an empty design # -------------------------------------------------------------------------- @@ -155,11 +155,6 @@ class Application(LineTerminal, ArgParseMixin): add_help=False, ) - # If executed in Sphinx to auto-document CLI arguments, exit now - # -------------------------------------------------------------------------- - if sphinx: - return - # Change error and warning reporting # -------------------------------------------------------------------------- self._LOG_MESSAGE_FORMAT__[Severity.Fatal] = "{DARK_RED}[FATAL] {message}{NOCOLOR}" -- cgit v1.2.3 From ed828023f1c5607180ddd0fea2d924fe8457c41b Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 11 Apr 2023 21:34:34 +0200 Subject: Fixed iterating architectures of an entity. --- pyGHDL/dom/formatting/prettyprint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 5be27492d..949adf99f 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -144,7 +144,7 @@ class PrettyPrint: buffer.append(f"{prefix} - {package.Identifier} instantiate from {package.PackageReference}") buffer.append(f"{prefix}Entities ({len(library.Entities)}):") for entity in library.Entities.values(): - buffer.append(f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures])})") + buffer.append(f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures.values()])})") buffer.append(f"{prefix}Configurations ({len(library.Configurations)}):") for configuration in library.Configurations.values(): buffer.append(f"{prefix} - {configuration.Identifier}") @@ -213,7 +213,7 @@ class PrettyPrint: for item in entity.Statements: buffer.append(f"{prefix} ...") buffer.append(f"{prefix} Architectures:") - for item in entity.Architectures: + for item in entity.Architectures.values(): buffer.append(f"{prefix} - {item.Identifier}") return buffer -- cgit v1.2.3 From 91c7a148b792d795d59bfc0569fca057b049cb61 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 11 Apr 2023 21:39:10 +0200 Subject: Disabled some code due to problems with symbols. --- pyGHDL/dom/formatting/prettyprint.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 949adf99f..6f56dfb60 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -442,13 +442,14 @@ class PrettyPrint: def formatSubtypeIndication(self, subtypeIndication, entity: str, name: str) -> str: if isinstance(subtypeIndication, SimpleSubtypeSymbol): - return f"{subtypeIndication.SymbolName}" + return f"{subtypeIndication.Identifier}" elif isinstance(subtypeIndication, ConstrainedCompositeSubtypeSymbol): constraints = [] - for constraint in subtypeIndication.Constraints: - constraints.append(str(constraint)) + # FIXME: disabled due to problems with symbols + # for constraint in subtypeIndication.Constraints: + # constraints.append(str(constraint)) - return f"{subtypeIndication.SymbolName}({', '.join(constraints)})" + return f"{subtypeIndication.Identifier}({', '.join(constraints)})" else: raise PrettyPrintException( f"Unhandled subtype kind '{subtypeIndication.__class__.__name__}' for {entity} '{name}'." -- cgit v1.2.3 From f11446e1cfaf0ed4db2d43ec3b9b421de313b6ae Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 11 Apr 2023 21:57:50 +0200 Subject: Formatting with black. --- pyGHDL/dom/formatting/prettyprint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 6f56dfb60..be1d2a511 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -144,7 +144,9 @@ class PrettyPrint: buffer.append(f"{prefix} - {package.Identifier} instantiate from {package.PackageReference}") buffer.append(f"{prefix}Entities ({len(library.Entities)}):") for entity in library.Entities.values(): - buffer.append(f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures.values()])})") + buffer.append( + f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures.values()])})" + ) buffer.append(f"{prefix}Configurations ({len(library.Configurations)}):") for configuration in library.Configurations.values(): buffer.append(f"{prefix} - {configuration.Identifier}") -- cgit v1.2.3