Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
wheel ~= 0.46.3
wheel ~= 0.47.0
twine ~= 6.2
14 changes: 7 additions & 7 deletions doc/Dependency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ the mandatory dependencies too.
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=====================================================================+=============+========================================================================================+======================+
| `pytest <https://GitHub.com/pytest-dev/pytest>`__ | ≥9.0 | `MIT <https://GitHub.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
| `pytest <https://GitHub.com/pytest-dev/pytest>`__ | ≥9.1 | `MIT <https://GitHub.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ | ≥7.1 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.14 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.15 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `mypy <https://GitHub.com/python/mypy>`__ | ≥2.1 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `typing-extensions <https://GitHub.com/python/typing_extensions>`__ | ≥4.15 | `PSF-2.0 <https://github.com/python/typing_extensions/blob/main/LICENSE>`__ | *Not yet evaluated.* |
| `typing-extensions <https://GitHub.com/python/typing_extensions>`__ | ≥4.16 | `PSF-2.0 <https://github.com/python/typing_extensions/blob/main/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `lxml <https://GitHub.com/lxml/lxml>`__ | ≥6.1 | `BSD 3-Clause <https://GitHub.com/lxml/lxml/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
| `lxml <https://GitHub.com/lxml/lxml>`__ | ≥6.1 | `BSD 3-Clause <https://GitHub.com/lxml/lxml/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+


Expand Down Expand Up @@ -101,7 +101,7 @@ the mandatory dependencies too.
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| !! `sphinx_fontawesome <https://GitHub.com/fraoustin/sphinx_fontawesome>`__ | ≥0.0.6 | `GPL 2.0 <https://GitHub.com/fraoustin/sphinx_fontawesome/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.10 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.12 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+


Expand Down Expand Up @@ -131,7 +131,7 @@ install the mandatory dependencies too.
+============================================================================+==============+==========================================================================================================+======================================================================================================================================================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.15 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.46 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.47 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+


Expand Down Expand Up @@ -160,7 +160,7 @@ install the mandatory dependencies too.
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+==========================================================+==============+===========================================================================================+======================+
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.46 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.47 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
| `Twine <https://GitHub.com/pypa/twine/>`__ | ≥6.2 | `Apache License, 2.0 <https://github.com/pypa/twine/blob/main/LICENSE>`__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
71 changes: 32 additions & 39 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
from sys import path as sys_path
from os.path import abspath
from pathlib import Path
from json import loads
from sys import path as sys_path
from os.path import abspath
from pathlib import Path
from json import loads
from textwrap import dedent

from pyTooling.Packaging import extractVersionInformation

# ==============================================================================
# Project configuration
# ==============================================================================
githubNamespace = "VHDL"
project = "pyVHDLModel"
directoryName = project.replace('.', '/')
githubProject = pythonProject = "pyVHDLModel"
directoryName = pythonProject.replace('.', '/')


# ==============================================================================
Expand All @@ -32,9 +33,10 @@
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
packageInformationFile = Path(f"../{project.replace('.', '/')}/__init__.py")
packageInformationFile = Path(f"../{directoryName}/__init__.py")
versionInformation = extractVersionInformation(packageInformationFile)

project = pythonProject
author = versionInformation.Author
copyright = versionInformation.Copyright
version = ".".join(versionInformation.Version.split(".")[:2]) # e.g. 2.3 The short X.Y version.
Expand Down Expand Up @@ -124,46 +126,37 @@
# ==============================================================================
# Options for LaTeX / PDF output
# ==============================================================================
from textwrap import dedent

latex_engine = "lualatex"
latex_use_xindy = False
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
"papersize": "a4paper",

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
"preamble": dedent(r"""
% ================================================================================
% User defined additional preamble code
% ================================================================================
% Add more Unicode characters for pdfLaTeX.
% - Alternatively, compile with XeLaTeX or LuaLaTeX.
% - https://GitHub.com/sphinx-doc/sphinx/issues/3511
%
\ifdefined\DeclareUnicodeCharacter
\DeclareUnicodeCharacter{2265}{$\geq$}
\DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
\fi
% ================================================================================
"""),

# Latex figure (float) alignment
#'figure_align': 'htbp',
"papersize": "a4paper", # The paper size ('letterpaper' or 'a4paper').
"pointsize": "10pt", # The font size ('10pt', '11pt' or '12pt').
"inputenc": "", # Let LuaLaTeX handle input encoding
"utf8extra": "",
"polyglossia": "",
"babel": r"\usepackage[english]{babel}",
"fontenc": r"\usepackage{fontspec}", # Disable the default T1 font encoding (Essential for LuaLaTeX)
"fontpkg": dedent("""\
\\usepackage[fontfamily=libertinus]{pytooling}
"""),
"passoptionstopackages": dedent("""\
\\PassOptionsToPackage{verbatimvisiblespace=\\ }{sphinx}
"""),
# "sphinxsetup": "verbatimvisiblespace=\\textvisiblespace"
# "figure_align": "htbp", # Latex figure (float) alignment
"makeindex": r"\usepackage[columns=1]{idxlayout}\makeindex",
"printindex": r"\def\twocolumn[#1]{#1}\printindex",
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
( master_doc,
f"{project}.tex",
f"The {project} Documentation",
f"Patrick Lehmann",
f"manual"
f"{pythonProject}.tex",
f"The {pythonProject.replace("_", r"\_")} Documentation",
"Patrick Lehmann",
"manual"
),
]

Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ sphinxcontrib-mermaid ~= 2.0
autoapi >= 2.0.1
sphinx_design ~= 0.7.0
sphinx-copybutton >= 0.5.2
sphinx_autodoc_typehints ~= 3.11
sphinx_autodoc_typehints ~= 3.12
sphinx_reports ~= 0.11.0
2 changes: 1 addition & 1 deletion pyVHDLModel/Association.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, actual: ExpressionUnion, formal: Nullable[Symbol] = None) ->

self._formal = formal
if formal is not None:
formal._parent = self
formal.Parent = self

self._actual = actual
# actual._parent = self # FIXME: actual is provided as None
Expand Down
25 changes: 16 additions & 9 deletions pyVHDLModel/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,22 @@ def __init__(self, parent: Nullable["ModelEntity"] = None) -> None:
"""
self._parent = parent

@readonly
@property
def Parent(self) -> 'ModelEntity':
"""
Read-only property to access the model entity's parent element reference in a logical hierarchy (:attr:`_parent`).
Property to access the model entity's parent element reference in a logical hierarchy (:attr:`_parent`).
:returns: Reference to the parent entity.
"""
return self._parent

@Parent.setter
def Parent(self, parent: 'ModelEntity') -> None:
if parent is None:
raise ValueError("Parameter 'parent' is None.")

self._parent = parent

def GetAncestor(self, type: Type) -> 'ModelEntity':
parent = self._parent
while not isinstance(parent, type):
Expand Down Expand Up @@ -339,7 +346,7 @@ def __init__(self, condition: Nullable[ExpressionUnion] = None) -> None:
"""
self._condition = condition
if condition is not None:
condition._parent = self
condition.Parent = self

@readonly
def Condition(self) -> ExpressionUnion:
Expand Down Expand Up @@ -392,11 +399,11 @@ class ReportStatementMixin(metaclass=ExtendedType, mixin=True):
def __init__(self, message: Nullable[ExpressionUnion] = None, severity: Nullable[ExpressionUnion] = None) -> None:
self._message = message
if message is not None:
message._parent = self
message.Parent = self

self._severity = severity
if severity is not None:
severity._parent = self
severity.Parent = self

@property
def Message(self) -> Nullable[ExpressionUnion]:
Expand Down Expand Up @@ -445,10 +452,10 @@ def __init__(self, leftBound: ExpressionUnion, rightBound: ExpressionUnion, dire
super().__init__(parent)

self._leftBound = leftBound
leftBound._parent = self
leftBound.Parent = self

self._rightBound = rightBound
rightBound._parent = self
rightBound.Parent = self

self._direction = direction

Expand Down Expand Up @@ -477,11 +484,11 @@ def __init__(self, expression: ExpressionUnion, after: Nullable[ExpressionUnion]
super().__init__(parent)

self._expression = expression
expression._parent = self
expression.Parent = self

self._after = after
if after is not None:
after._parent = self
after.Parent = self

@property
def Expression(self) -> ExpressionUnion:
Expand Down
8 changes: 4 additions & 4 deletions pyVHDLModel/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ class ProcedureCallMixin(metaclass=ExtendedType, mixin=True):

def __init__(self, procedureName: Symbol, parameterMappings: Nullable[Iterable[ParameterAssociationItem]] = None) -> None:
self._procedure = procedureName
procedureName._parent = self
procedureName.Parent = self

# TODO: extract to mixin
self._parameterMappings = []
if parameterMappings is not None:
for parameterMapping in parameterMappings:
self._parameterMappings.append(parameterMapping)
parameterMapping._parent = self
parameterMapping.Parent = self

@readonly
def Procedure(self) -> Symbol:
Expand All @@ -127,7 +127,7 @@ class AssignmentMixin(metaclass=ExtendedType, mixin=True):

def __init__(self, target: Symbol) -> None:
self._target = target
target._parent = self
target.Parent = self

@property
def Target(self) -> Symbol:
Expand All @@ -150,7 +150,7 @@ def __init__(self, target: Symbol, expression: ExpressionUnion) -> None:
super().__init__(target)

self._expression = expression
expression._parent = self
expression.Parent = self

@property
def Expression(self) -> ExpressionUnion:
Expand Down
Loading
Loading