diff --git a/.btd.yml b/.btd.yml
deleted file mode 100644
index 296c029b..00000000
--- a/.btd.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-input: doc
-output: _build
-requirements: requirements.txt
-target: gh-pages
-formats: [ html ]
-images:
- base: btdi/sphinx:pytooling
- latex: btdi/latex
-theme: https://codeload.GitHub.com/buildthedocs/sphinx.theme/tar.gz/v1
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 0e75a2d3..ca0c99ad 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -10,7 +10,6 @@ updates:
- Dependencies
reviewers:
- Paebbels
- - Umarcor
schedule:
interval: "daily" # Checks on Monday trough Friday.
@@ -24,6 +23,5 @@ updates:
- Dependencies
reviewers:
- Paebbels
- - Umarcor
schedule:
interval: "weekly"
diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml
index 71aa4b78..cc21895c 100644
--- a/.github/workflows/Pipeline.yml
+++ b/.github/workflows/Pipeline.yml
@@ -8,207 +8,19 @@ on:
- cron: '0 22 * * 5'
jobs:
- UnitTestingParams:
- uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
- with:
- name: pyEDAA.ProjectModel
-# python_version_list: "3.9 3.10 3.11 3.12 pypy-3.9 pypy-3.10"
- disable_list: "mingw64:* ucrt64:*"
-
- AppTestingParams:
- uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
- with:
- name: pyEDAA.ProjectModel
- python_version_list: "" # use latest Python version
- system_list: "ubuntu macos macos-arm"
-# include_list:
-# exclude_list:
-# disable_list: "windows:pypy-3.8 windows:pypy-3.9 windows:pypy-3.10"
-
- UnitTesting:
- uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
- needs:
- - UnitTestingParams
- with:
- jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
- requirements: "-r tests/unit/requirements.txt"
-# pacboy: "msys/git python-lxml:p"
- unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
- coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
-
- StaticTypeCheck:
- uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
- needs:
- - UnitTestingParams
- with:
- python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
- commands: |
- touch pyEDAA/__init__.py
- mypy --html-report htmlmypy -p pyEDAA.ProjectModel
- html_report: 'htmlmypy'
- html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
-
- DocCoverage:
- uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev
- needs:
- - UnitTestingParams
- with:
- python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
- directory: pyEDAA/ProjectModel
-# fail_below: 70
-
- ConfigParams:
- uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev
- needs:
- - DocCoverage
-
- Package:
- uses: pyTooling/Actions/.github/workflows/Package.yml@dev
- needs:
- - UnitTestingParams
- - UnitTesting
- with:
- python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
- artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
-
-# AppTesting:
-# uses: pyTooling/Actions/.github/workflows/ApplicationTesting.yml@dev
-# needs:
-# - AppTestingParams
-# - UnitTestingParams
-# - Package
-# with:
-# jobs: ${{ needs.AppTestingParams.outputs.python_jobs }}
-# wheel: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
-# apptest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }}
-
- PublishCoverageResults:
- uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev
- needs:
- - UnitTestingParams
- - UnitTesting
- with:
-# coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
-# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
- coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
- coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
+ Pipeline:
+ uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@dev
+ with:
+ package_namespace: pyEDAA
+ package_name: ProjectModel
+ unittest_disable_list: "mingw64:* ucrt64:*"
+ apptest_python_version_list: "" # use latest Python version
+ apptest_system_list: "ubuntu macos macos-arm"
+ codecov: true
+ codacy: true
+ dorny: true
secrets:
- codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ CODACY_TOKEN: ${{ secrets.CODACY_TOKEN }}
- PublishTestResults:
- uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
- needs:
- - UnitTestingParams
- - UnitTesting
- with:
- merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
-
-# VerifyDocs:
-# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
-# needs:
-# - UnitTestingParams
-# with:
-# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
-
- Documentation:
- uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev
- needs:
- - UnitTestingParams
- - ConfigParams
- - PublishTestResults
- - PublishCoverageResults
-# - VerifyDocs
- with:
- python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
- coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
- unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-ubuntu-native-3.12
- coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
- html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
- latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
-
- IntermediateCleanUp:
- uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@dev
- needs:
- - UnitTestingParams
- - PublishCoverageResults
- - PublishTestResults
- - Documentation
- with:
- sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
- xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
-
-# PDFDocumentation:
-# uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev
-# needs:
-# - UnitTestingParams
-# - Documentation
-# with:
-# document: pyEDAA.ProjectModel
-# latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
-# pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
-
- PublishToGitHubPages:
- uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
- needs:
- - UnitTestingParams
- - Documentation
-# - PDFDocumentation
- - PublishCoverageResults
- - StaticTypeCheck
- with:
- doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
- coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
- typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
-
- ReleasePage:
- uses: pyTooling/Actions/.github/workflows/Release.yml@dev
- if: startsWith(github.ref, 'refs/tags')
- needs:
- - Package
-# - AppTesting
- - PublishToGitHubPages
-
- PublishOnPyPI:
- uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
- if: startsWith(github.ref, 'refs/tags')
- needs:
- - UnitTestingParams
- - ReleasePage
- with:
- python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
- requirements: -r dist/requirements.txt
- artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
- secrets:
- PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
-
- ArtifactCleanUp:
- uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev
- needs:
- - UnitTestingParams
- - UnitTesting
- - StaticTypeCheck
- - Documentation
-# - PDFDocumentation
- - PublishTestResults
- - PublishCoverageResults
- - PublishToGitHubPages
-# - PublishOnPyPI
- - IntermediateCleanUp
- with:
- package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
- remaining: |
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-*
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-*
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-*
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-*
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
- ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
-# ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).apptesting_xml }}-*
-# ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
diff --git a/.gitignore b/.gitignore
index b6f70b23..6e96419b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,13 @@ __pycache__/
.coverage
.cov
coverage.xml
+/report/coverage
+
+# mypy
+/report/typing
+
+# pytest
+/report/unit
# setuptools
/build/**/*.*
@@ -15,7 +22,7 @@ coverage.xml
# Dependencies
!requirements.txt
-# Sphinx
+# Sphinx documentation
/doc/_build/
/doc/_theme/
/doc/pyEDAA.ProjectModel/**/*.*
@@ -23,3 +30,6 @@ coverage.xml
# PyCharm project files
/.idea/workspace.xml
+
+# Git files
+!.git*
diff --git a/README.md b/README.md
index 364808dc..46649b1d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
[](https://GitHub.com/edaa-org/pyEDAA.ProjectModel)
@@ -10,7 +10,7 @@
[](https://pypi.org/project/pyEDAA.ProjectModel/)


-[](https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml)
+[](https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml)
[](https://libraries.io/github/edaa-org/pyEDAA.ProjectModel)
[](https://www.codacy.com/gh/edaa-org/pyEDAA.ProjectModel)
[](https://www.codacy.com/gh/edaa-org/pyEDAA.ProjectModel)
diff --git a/dist/requirements.txt b/dist/requirements.txt
index 878e3e51..778498a1 100644
--- a/dist/requirements.txt
+++ b/dist/requirements.txt
@@ -1,2 +1,2 @@
-wheel ~= 0.44
-twine ~= 5.1
+wheel ~= 0.45
+twine ~= 6.1
diff --git a/doc/CodeCoverage.rst b/doc/CodeCoverage.rst
new file mode 100644
index 00000000..217fd1e4
--- /dev/null
+++ b/doc/CodeCoverage.rst
@@ -0,0 +1,25 @@
+.. _CODECOV:
+
+Code Coverage Report
+####################
+
+.. grid:: 2
+
+ .. grid-item::
+ :columns: 8
+
+ .. report:code-coverage::
+ :reportid: src
+
+ .. grid-item::
+ :columns: 4
+
+ .. report:code-coverage-legend::
+ :reportid: src
+ :style: vertical-table
+
+----------
+
+Code coverage report generated with `pytest `__,
+`Coverage.py `__ and visualized by
+`sphinx-reports `__.
diff --git a/doc/Dependency.rst b/doc/Dependency.rst
index f2f66326..bdd6ba09 100644
--- a/doc/Dependency.rst
+++ b/doc/Dependency.rst
@@ -1,46 +1,72 @@
-.. _dependency:
+.. _DEP:
-Dependency
-##########
+Dependencies
+############
.. |img-ProjectModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel
:alt: Libraries.io status for latest release
:height: 22
:target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel
-.. |img-ProjectModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel
- :alt: Requires.io
+.. |img-ProjectModel-vul-status| image:: https://img.shields.io/snyk/vulnerabilities/github/edaa-org/pyEDAA.ProjectModel
+ :alt: Snyk Vulnerabilities for GitHub Repo
:height: 22
- :target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=main
+ :target: https://img.shields.io/snyk/vulnerabilities/github/edaa-org/pyEDAA.ProjectModel
+------------------------------------------+------------------------------------------+
-| `Libraries.io `_ | `Requires.io `_ |
+| `Libraries.io `_ | Vulnerabilities Summary |
+==========================================+==========================================+
-| |img-ProjectModel-lib-status| | |img-ProjectModel-req-status| |
+| |img-ProjectModel-lib-status| | |img-ProjectModel-vul-status| |
+------------------------------------------+------------------------------------------+
+.. _DEP/package:
-.. _dependency-package:
+pyEDAA.ProjectModel Package (Mandatory)
+***************************************
+
+.. rubric:: Manually Installing Package Requirements
+
+Use the :file:`requirements.txt` file to install all dependencies via ``pip3`` or install the package directly from
+PyPI (see :ref:`INSTALL`).
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. code-block:: bash
+
+ pip3 install -U -r requirements.txt
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ pip install -U -r requirements.txt
-pyEDAA.ProjectModel Package
-***************************
-+------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **Package** | **Version** | **License** | **Dependencies** |
-+========================================================================+=============+===========================================================================================+========================================================================================================================================================+
-| `pyTooling `__ | ≥7.0 | `Apache License, 2.0 `__ | *None* |
-+------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `pyVHDLModel `__ | ≥0.27.1 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
-+------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `pySVModel `__ | ≥0.3.1 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
-+------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `pySystemRDLModel `__ | ≥0.1.0 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
-+------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
+.. rubric:: Dependency List
+
++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **Package** | **Version** | **License** | **Dependencies** |
++=======================================================================================+=============+==========================================================================================================+=============================================================================================================================================================+
+| `pyTooling `__ | ≥8.4 | `Apache License, 2.0 `__ | *None* |
++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `pyVHDLModel `__ | ≥0.31 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `pySVModel `__ | ≥0.3.1 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `pySystemRDLModel `__ | ≥0.1.0 | `Apache License, 2.0 `__ | * `pyTooling `__ (`Apache License, 2.0 `__) |
++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+.. _DEP/testing:
-.. _dependency-testing:
+Unit Testing (Optional)
+***********************
Unit Testing / Coverage / Type Checking (Optional)
-**************************************************
+==================================================
Additional Python packages needed for testing, code coverage collection and static type checking. These packages are
only needed for developers or on a CI server, thus sub-dependencies are not evaluated further.
@@ -51,31 +77,43 @@ only needed for developers or on a CI server, thus sub-dependencies are not eval
Use the :file:`tests/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively install
the mandatory dependencies too.
-.. code-block:: shell
+.. tab-set::
- pip3 install -U -r tests/requirements.txt
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+ .. code-block:: bash
-.. rubric:: Dependency List
+ pip install -U -r tests/requirements.txt
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ pip3 install -U -r tests\requirements.txt
+
+.. rubric:: Dependency List - Unit Testing
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=====================================================================+=============+========================================================================================+======================+
-| `pytest `__ | ≥8.3 | `MIT `__ | *Not yet evaluated.* |
+| `pytest `__ | ≥8.3 | `MIT `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-| `pytest-cov `__ | ≥6.0 | `MIT `__ | *Not yet evaluated.* |
+| `pytest-cov `__ | ≥6.1 | `MIT `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-| `Coverage `__ | ≥7.6 | `Apache License, 2.0 `__ | *Not yet evaluated.* |
+| `Coverage `__ | ≥7.8 | `Apache License, 2.0 `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-| `mypy `__ | ≥1.13 | `MIT `__ | *Not yet evaluated.* |
+| `mypy `__ | ≥1.15 | `MIT `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-| `typing-extensions `__ | ≥4.12 | `PSF-2.0 `__ | *Not yet evaluated.* |
+| `typing-extensions `__ | ≥4.13 | `PSF-2.0 `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-| `lxml `__ | ≥5.3 | `BSD 3-Clause `__ | *Not yet evaluated.* |
+| `lxml `__ | ≥5.4 | `BSD 3-Clause `__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
-.. _dependency-documentation:
+
+.. _DEP/documentation:
Sphinx Documentation (Optional)
*******************************
@@ -89,9 +127,21 @@ CI server, thus sub-dependencies are not evaluated further.
Use the :file:`doc/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively install
the mandatory dependencies too.
-.. code-block:: shell
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
- pip3 install -U -r doc/requirements.txt
+ .. code-block:: bash
+
+ pip install -U -r doc/requirements.txt
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ pip3 install -U -r doc\requirements.txt
.. rubric:: Dependency List
@@ -99,19 +149,26 @@ the mandatory dependencies too.
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=================================================================================================+==============+==========================================================================================================+======================================================================================================================================================+
-| `pyTooling `__ | ≥7.0 | `Apache License, 2.0 `__ | *None* |
+| `pyTooling `__ | ≥8.4 | `Apache License, 2.0 `__ | *None* |
++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `Sphinx `__ | ≥8.2 | `BSD 3-Clause `__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `Sphinx `__ | ≥8.1 | `BSD 3-Clause `__ | *Not yet evaluated.* |
+| `sphinxcontrib-mermaid `__ | ≥1.0 | `BSD `__ | *Not yet evaluated.* |
++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `autoapi `__ | ≥2.0.1 | `Apache License, 2.0 `__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| `sphinx_btd_theme `__ | ≥0.5.2 | `MIT `__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-| !! `sphinx_fontawesome `__ | ≥0.0.6 | `GPL 2.0 `__ | *Not yet evaluated.* |
+| `sphinx_design `__ | ≥0.6 | `MIT `__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `sphinx_autodoc_typehints `__ | ≥2.5 | `MIT `__ | *Not yet evaluated.* |
+| `sphinx-copybutton `__ | ≥0.5.2 | `MIT `__ | *Not yet evaluated.* |
++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `sphinx_autodoc_typehints `__ | ≥3.2 | `MIT `__ | *Not yet evaluated.* |
++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
+| `ruamel.yaml `__ | ≥0.18 | `MIT `__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-
-.. _dependency-packaging:
+.. _DEP/packaging:
Packaging (Optional)
********************
@@ -125,9 +182,21 @@ on a CI server, thus sub-dependencies are not evaluated further.
Use the :file:`build/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively
install the mandatory dependencies too.
-.. code-block:: shell
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
- pip3 install -U -r build/requirements.txt
+ .. code-block:: bash
+
+ pip install -U -r build/requirements.txt
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ pip3 install -U -r build\requirements.txt
.. rubric:: Dependency List
@@ -135,13 +204,13 @@ install the mandatory dependencies too.
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+============================================================================+==============+==========================================================================================================+======================================================================================================================================================+
-| `pyTooling `__ | ≥7.0 | `Apache License, 2.0 `__ | *None* |
+| `pyTooling `__ | ≥8.4 | `Apache License, 2.0 `__ | *None* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-| `wheel `__ | ≥0.44 | `MIT `__ | *Not yet evaluated.* |
+| `wheel `__ | ≥0.45 | `MIT `__ | *Not yet evaluated.* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
-.. _dependency-publishing:
+.. _DEP/publishing:
Publishing (CI-Server only)
***************************
@@ -156,9 +225,21 @@ further.
Use the :file:`dist/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively
install the mandatory dependencies too.
-.. code-block:: shell
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. code-block:: bash
+
+ pip install -U -r dist/requirements.txt
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
- pip3 install -U -r dist/requirements.txt
+ pip3 install -U -r dist\requirements.txt
.. rubric:: Dependency List
@@ -166,7 +247,7 @@ install the mandatory dependencies too.
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+==========================================================+==============+===========================================================================================+======================+
-| `wheel `__ | ≥0.44 | `MIT `__ | *Not yet evaluated.* |
+| `wheel `__ | ≥0.45 | `MIT `__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
-| `Twine `__ | ≥5.1 | `Apache License, 2.0 `__ | *Not yet evaluated.* |
+| `Twine `__ | ≥6.1 | `Apache License, 2.0 `__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
diff --git a/doc/DocCoverage.rst b/doc/DocCoverage.rst
new file mode 100644
index 00000000..d2ee3882
--- /dev/null
+++ b/doc/DocCoverage.rst
@@ -0,0 +1,24 @@
+.. _DOCCOV:
+
+Documentation Coverage Report
+#############################
+
+.. grid:: 2
+
+ .. grid-item::
+ :columns: 5
+
+ .. report:doc-coverage::
+ :reportid: src
+
+ .. grid-item::
+ :columns: 7
+
+ .. report:doc-coverage-legend::
+ :reportid: src
+ :style: vertical-table
+
+----------
+
+Documentation coverage generated with `"""docstr-coverage""" `__ and
+visualized by `sphinx-reports `__.
diff --git a/doc/Installation.rst b/doc/Installation.rst
index 77c65b60..e13b6dc2 100644
--- a/doc/Installation.rst
+++ b/doc/Installation.rst
@@ -1,60 +1,486 @@
-.. _installation:
+.. |PackageName| replace:: pyEDAA.ProjectModel
+
+.. _INSTALL:
Installation/Updates
####################
-.. note::
+See the following instructions on how to install or update the package from common sources like PyPI. Developers can
+also install the packages with development dependencies. In case of local development, see the additional sections on
+how to run unit tests, type checks or how to build the documentation to create all the build artifacts.
+
+See the list of :ref:`necessary dependencies `.
+
+
+.. _INSTALL/pip:
+
+Using PIP to Install from PyPI
+******************************
+
+The following instruction are using PIP (Package Installer for Python) as a package manager and PyPI (Python Package
+Index) as a source of Python packages.
+
+PIP might download further packages as listed in :ref:`package dependencies `.
+
+
+.. _INSTALL/pip/install:
+
+Installing a Wheel Package from PyPI using PIP
+==============================================
+
+Developers can install the |PackageName| package itself or the package with further dependencies for documentation
+generation (``doc``), running unit tests (``test``) or just all (``all``) dependencies.
+
+See :ref:`DEP` for more details.
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. tab-set::
+
+ .. tab-item:: Minimal installation
+ :sync: Minimal
+
+ .. code-block:: bash
+
+ # Basic pyEDAA.ProjectModel package
+ pip3 install pyEDAA.ProjectModel
+
+ # Alternatively
+ python3 -m pip install pyEDAA.ProjectModel
+
+ .. tab-item:: With Documentation Dependencies
+ :sync: Doc
+
+ .. code-block:: bash
+
+ # Install with dependencies to generate documentation
+ pip3 install pyEDAA.ProjectModel[doc]
+
+ # Alternatively
+ python3 -m pip install pyEDAA.ProjectModel[doc]
+
+ .. tab-item:: With Unit Testing Dependencies
+ :sync: Unit
+
+ .. code-block:: bash
+
+ # Install with dependencies to run unit tests
+ pip3 install pyEDAA.ProjectModel[test]
+
+ # Alternatively
+ python3 -m pip install pyEDAA.ProjectModel[test]
+
+ .. tab-item:: All Developer Dependencies
+ :sync: All
+
+ .. code-block:: bash
+
+ # Install with all developer dependencies
+ pip3 install pyEDAA.ProjectModel[all]
+
+ # Alternatively
+ python3 -m pip install pyEDAA.ProjectModel[all]
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. tab-set::
+
+ .. tab-item:: Minimal installation
+ :sync: Minimal
+
+ .. code-block:: powershell
+
+ # Basic pyEDAA.ProjectModel package
+ pip install pyEDAA.ProjectModel
+
+ # Alternatively
+ py -m pip install pyEDAA.ProjectModel
+
+ .. tab-item:: With Documentation Dependencies
+ :sync: Doc
+
+ .. code-block:: powershell
+
+ # Install with dependencies to generate documentation
+ pip install pyEDAA.ProjectModel[doc]
+
+ # Alternatively
+ py -m pip install pyEDAA.ProjectModel[doc]
- Python ≥3.7 is required for this package due to problems with meta classes and
- ``__getattr__`` in Python 3.6.
+ .. tab-item:: With Unit Testing Dependencies
+ :sync: Unit
-.. _installation-pip:
+ .. code-block:: powershell
-Using PIP
-*********
+ # Install with dependencies to run unit tests
+ pip install pyEDAA.ProjectModel[test]
-Installation from PyPI using PIP
-================================
+ # Alternatively
+ py -m pip install pyEDAA.ProjectModel[test]
-.. code-block:: bash
+ .. tab-item:: All Developer Dependencies
+ :sync: All
- pip3 install pyEDAA.ProjectModel
+ .. code-block:: powershell
+ # Install with all developer dependencies
+ pip install pyEDAA.ProjectModel[all]
+
+ # Alternatively
+ py -m pip install pyEDAA.ProjectModel[all]
+
+
+.. _INSTALL/pip/requirements:
+
+Referencing the package in ``requirements.txt``
+===============================================
+
+When |PackageName| is used by another Python package, it's recommended to list the dependency to the |PackageName|
+package in a ``requirements.txt`` file.
+
+.. admonition:: ``requirements.txt``
+
+ .. code-block:: text
+
+ pyEDAA.ProjectModel ~= 0.3
+
+
+.. _INSTALL/pip/update:
Updating from PyPI using PIP
============================
-.. code-block:: bash
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
- pip3 install -U pyEDAA.ProjectModel
+ .. code-block:: bash
+ # Update pyEDAA.ProjectModel
+ pip3 install -U pyEDAA.ProjectModel
+
+ # Alternatively
+ python3 -m pip install -U pyEDAA.ProjectModel
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ # Update pyEDAA.ProjectModel
+ pip install -U pyEDAA.ProjectModel
+
+ # Alternatively
+ py -m pip install -U pyEDAA.ProjectModel
+
+
+.. _INSTALL/pip/uninstall:
Uninstallation using PIP
========================
-.. code-block:: bash
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. code-block:: bash
+
+ # Uninstall pyEDAA.ProjectModel
+ pip3 uninstall pyEDAA.ProjectModel
+
+ # Alternatively
+ python3 -m pip uninstall pyEDAA.ProjectModel
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ # Uninstall pyEDAA.ProjectModel
+ pip uninstall pyEDAA.ProjectModel
+
+ # Alternatively
+ py -m pip uninstall pyEDAA.ProjectModel
+
+
+.. _INSTALL/testing:
+
+Running unit tests
+******************
+
+This package is provided with unit tests for `pytest `__. The provided testcases can be
+executed locally for testing or development purposes. In addition, code coverage including branch coverage can be
+collected using `Coverage.py `__. All steps provide appropriate artifacts as XML or
+HTML reports. The artifact output directories are specified in ``pyproject.toml``.
+
+Ensure :ref:`unit testing requirements ` are installed.
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. tab-set::
+
+ .. tab-item:: Unit Testing
+ :sync: UnitTesting
+
+ .. code-block:: bash
+
+ cd
+
+ # Running unit tests using pytest
+ pytest -raP --color=yes tests/unit
+
+ .. tab-item:: Unit Testing with Ant/JUnit XML Reports
+ :sync: UnitTestingXML
+
+ .. code-block:: bash
+
+ cd
- pip3 uninstall pyEDAA.ProjectModel
+ # Running unit tests using pytest
+ pytest -raP --color=yes --junitxml=report/unit/unittest.xml --template=html1/index.html --report=report/unit/html/index.html --split-report tests/unit
+ .. tab-item:: Unit Testing with Code Coverage
+ :sync: Coverage
-Installation from local directory using PIP
-===========================================
+ .. code-block:: bash
-.. code-block:: bash
+ cd
- pip3 install .
+ # Running unit tests with code coverage using Coverage.py
+ coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -ra --tb=line --color=yes tests/unit
+ # Write coverage report to console"
+ coverage report
-.. _installation-setup:
+ # Convert coverage report to HTML
+ coverage html
-Using ``setup.py`` (legacy)
-***************************
+ # Convert coverage report to XML (Cobertura)
+ coverage xml
-See sections above on how to use PIP.
+ .. tab-item:: Windows
+ :sync: Windows
-Installation using ``setup.py``
-===============================
+ .. tab-set::
-.. code-block:: bash
+ .. tab-item:: Unit Testing
+ :sync: UnitTesting
+
+ .. code-block:: powershell
+
+ cd
+
+ # Running unit tests using pytest
+ pytest -raP --color=yes tests\unit
+
+ .. tab-item:: Unit Testing with Ant/JUnit XML Reports
+ :sync: UnitTestingXML
+
+ .. code-block:: powershell
+
+ cd
+
+ # Running unit tests using pytest
+ pytest -raP --color=yes --junitxml=report\unit\unittest.xml --template=html1\index.html --report=report\unit\html\index.html --split-report tests\unit
+
+ .. tab-item:: Unit Testing with Code Coverage
+ :sync: Coverage
+
+ .. code-block:: powershell
+
+ cd
+
+ # Running unit tests with code coverage using Coverage.py
+ coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -ra --tb=line --color=yes tests\unit
+
+ # Write coverage report to console"
+ coverage report
+
+ # Convert coverage report to HTML
+ coverage html
+
+ # Convert coverage report to XML (Cobertura)
+ coverage xml
+
+
+.. _INSTALL/typechecking:
+
+Running type checks
+*******************
+
+This package is provided with type checks. These can be executed locally for testing or development purposes using
+`mypy `__. The artifact output directory is specified in ``pyproject.toml``.
+
+Ensure :ref:`unit testing requirements ` are installed.
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. code-block:: bash
+
+ cd
+
+ # Running type checking using mypy
+ export MYPY_FORCE_COLOR=1
+ mypy -p pyEDAA.ProjectModel
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ cd
+
+ # Running type checking using mypy
+ $env:MYPY_FORCE_COLOR = 1
+ mypy -p pyEDAA.ProjectModel
+
+
+.. _INSTALL/documentation:
+
+Building documentation
+**********************
+
+The documentation can be build locally using `Sphinx `__. It can generate HTML and LaTeX
+outputs. In an additional step, the LaTeX output can be translated to a PDF file using a LaTeX environment like
+`MiKTeX `__.
+
+Ensure :ref:`documentation requirements ` are installed.
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. tab-set::
+
+ .. tab-item:: Generating HTML
+ :sync: HTML
+
+ .. code-block:: bash
+
+ cd
+
+ # Adding package root to PYTHONPATH
+ export PYTHONPATH=$(pwd)
+ cd doc
+
+ # Building documentation using Sphinx
+ sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html
+
+ .. tab-item:: Generating LaTeX
+ :sync: LaTeX
+
+ .. code-block:: bash
+
+ cd
+
+ # Adding package root to PYTHONPATH
+ export PYTHONPATH=$(pwd)
+ cd doc
+
+ # Building documentation using Sphinx
+ sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex
+
+ .. tab-item:: Generating PDF (from LaTeX)
+ :sync: PDF
+
+ .. todo:: Describe LaTeX to PDF conversion on Linux using Miktex.
+
+ .. hint:: A `Miktex installation `__ is required.
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. tab-set::
+
+ .. tab-item:: Generating HTML
+ :sync: HTML
+
+ .. code-block:: powershell
+
+ cd
+
+ # Building documentation using Sphinx
+ .\doc\make.bat html --verbose
+
+ .. tab-item:: Generating LaTeX
+ :sync: LaTeX
+
+ .. code-block:: powershell
+
+ cd
+
+ # Building documentation using Sphinx
+ .\doc\make.bat latex --verbose
+
+ .. tab-item:: Generating PDF (from LaTeX)
+ :sync: PDF
+
+ .. todo:: Describe LaTeX to PDF conversion on Windows using Miktex.
+
+ .. hint:: A `Miktex installation `__ is required.
+
+
+.. _INSTALL/building:
+
+Local Packaging and Installation via PIP
+****************************************
+
+For development and bug fixing it might be handy to create a local wheel package and also install it locally on the
+development machine. The following instructions will create a local wheel package (``*.whl``) and then use PIP to
+install it. As a user might have a |PackageName| installation from PyPI, it's recommended to uninstall any previous
+|PackageName| packages. (This step is also needed if installing an updated local wheel file with same version number.
+PIP will not detect a new version and thus not overwrite/reinstall the updated package contents.)
+
+Ensure :ref:`packaging requirements ` are installed.
+
+.. tab-set::
+
+ .. tab-item:: Linux/macOS
+ :sync: Linux
+
+ .. code-block:: bash
+
+ cd
+
+ # Package the code in a wheel (*.whl)
+ python3 -m build --wheel
+
+ # Uninstall the old package
+ python3 -m pip uninstall -y pyEDAA.ProjectModel
+
+ # Install from wheel
+ python3 -m pip install ./dist/pyEDAA.ProjectModel-0.3.0-py3-none-any.whl
+
+ .. tab-item:: Windows
+ :sync: Windows
+
+ .. code-block:: powershell
+
+ cd
+
+ # Package the code in a wheel (*.whl)
+ py -m build --wheel
+
+ # Uninstall the old package
+ py -m pip uninstall -y pyEDAA.ProjectModel
+
+ # Install from wheel
+ py -m pip install .\dist\pyEDAA.ProjectModel-0.3.0-py3-none-any.whl
+
+.. note::
- setup.py install
+ The legacy ways of building a package using ``setup.py bdist_wheel`` and installation using ``setup.py install`` is
+ not recommended anymore.
diff --git a/doc/TODO.rst b/doc/TODO.rst
new file mode 100644
index 00000000..3144da04
--- /dev/null
+++ b/doc/TODO.rst
@@ -0,0 +1,4 @@
+TODOs
+#####
+
+.. todolist::
diff --git a/doc/_static/.gitempty b/doc/_static/.gitempty
deleted file mode 100644
index e69de29b..00000000
diff --git a/doc/_static/css/override.css b/doc/_static/css/override.css
new file mode 100644
index 00000000..4dd6beb5
--- /dev/null
+++ b/doc/_static/css/override.css
@@ -0,0 +1,115 @@
+/* theme overrides */
+.rst-content h1,
+.rst-content h2 {
+ margin-top: 24px;
+ margin-bottom: 6px;
+ text-decoration: underline;
+}
+
+.rst-content h3,
+.rst-content h4,
+.rst-content h5,
+.rst-content h6 {
+ margin-top: 12px;
+ margin-bottom: 6px;
+}
+
+.rst-content p {
+ margin-bottom: 6px
+}
+
+.rst-content .topic-title {
+ font-size: larger;
+ font-weight: 700;
+ margin-top: 18px;
+ margin-bottom: 6px;
+}
+
+.rst-content p.rubric {
+ text-decoration: underline;
+ font-weight: 700;
+ margin-top: 18px;
+ margin-bottom: 16px;
+}
+
+/* general overrides */
+html {
+ font-size: 15px;
+}
+
+footer {
+ font-size: 95%;
+ text-align: center
+}
+
+footer p {
+ margin-bottom: 0px /* 12px */;
+ font-size: 95%
+}
+
+section > p,
+.section p,
+.simple li {
+ text-align: justify
+}
+
+/* wyrm overrides */
+.wy-menu-vertical header,
+.wy-menu-vertical p.caption {
+ color: #9b9b9b /* #55a5d9 */;
+ padding: 0 0.809em /* 0 1.618em */;
+ margin: 6px 0 0 0 /* 12px 0 0 */;
+ border-top: 1px solid #9b9b9b;
+}
+
+.wy-side-nav-search {
+ margin-bottom: 0 /* .809em */;
+ background-color: #333333 /* #2980b9 */;
+ /* BTD: */
+ /*color: #fcfcfc*/
+}
+
+.wy-side-nav-search input[type=text] {
+ border-radius: 0px /* 50px */;
+}
+
+.wy-side-nav-search .wy-dropdown > a, .wy-side-nav-search > a {
+ /* BTD: */
+ /*color: #fcfcfc;*/
+ margin-bottom: 0.404em /* .809em */;
+}
+
+.wy-side-nav-search > div.version {
+ margin: 0 0 6px 0;
+ /* BTD: */
+ /*margin-top: -.4045em;*/
+}
+
+.wy-nav .wy-menu-vertical a:hover {
+ background-color: #333333 /* #2980b9 */;
+}
+
+.wy-nav-content {
+ max-width: 1600px /* 800px */ ;
+}
+
+.wy-nav-top {
+ background: #333333 /* #2980b9 */;
+}
+
+/* Sphinx Design */
+.sd-tab-set {
+ margin: 0
+}
+
+.sd-tab-set > label {
+ padding-top: .5em;
+ padding-right: 1em;
+ padding-bottom: .5em;
+ padding-left: 1em
+}
+
+.sd-container-fluid {
+ padding-left: 0;
+ padding-right: 0;
+}
diff --git a/doc/_templates/autoapi/module.rst b/doc/_templates/autoapi/module.rst
index 655beff4..4dded81f 100644
--- a/doc/_templates/autoapi/module.rst
+++ b/doc/_templates/autoapi/module.rst
@@ -1,12 +1,12 @@
-.. # Template modified by Patrick Lehmann
+.. # Template modified by Patrick Lehmann
* removed automodule on top, because private members are activated for autodoc (no doubled documentation).
* Made sections like 'submodules' bold text, but no headlines to reduce number of ToC levels.
-=={{ '=' * node.name|length }}==
-``{{ node.name }}``
-=={{ '=' * node.name|length }}==
+{{ '=' * node.name|length }}
+{{ node.name }}
+{{ '=' * node.name|length }}
-.. py:module:: {{ node.name }}
+.. automodule:: {{ node.name }}
{##}
{%- block modules -%}
@@ -14,8 +14,8 @@
**Submodules**
-
.. toctree::
+ :maxdepth: 1
{% for item in subnodes %}
{{ item.name }}
{%- endfor %}
@@ -25,7 +25,17 @@
{##}
.. currentmodule:: {{ node.name }}
{##}
-{%- block functions -%}
+
+{%- if node.variables %}
+
+**Variables**
+
+{% for item, obj in node.variables.items() -%}
+- :py:data:`{{ item }}`
+ {#{ obj|summary }#}
+{% endfor -%}
+{%- endif -%}
+
{%- if node.functions %}
**Functions**
@@ -35,15 +45,19 @@
{{ obj|summary }}
{% endfor -%}
+{%- endif -%}
-{% for item in node.functions %}
-.. autofunction:: {{ item }}
-{##}
-{%- endfor -%}
+{%- if node.exceptions %}
+
+**Exceptions**
+
+{% for item, obj in node.exceptions.items() -%}
+- :py:exc:`{{ item }}`:
+ {{ obj|summary }}
+
+{% endfor -%}
{%- endif -%}
-{%- endblock -%}
-{%- block classes -%}
{%- if node.classes %}
**Classes**
@@ -53,14 +67,40 @@
{{ obj|summary }}
{% endfor -%}
+{%- endif -%}
-{% for item in node.classes %}
-.. autoclass:: {{ item }}
- :members:
+{%- block variables -%}
+{%- if node.variables %}
- .. rubric:: Inheritance
- .. inheritance-diagram:: {{ item }}
- :parts: 1
+---------------------
+
+**Variables**
+
+{#% for item, obj in node.variables.items() -%}
+- :py:data:`{{ item }}`
+{% endfor -%#}
+
+{% for item, obj in node.variables.items() %}
+.. autodata:: {{ item }}
+ :annotation:
+
+ .. code-block:: text
+
+ {{ obj|pprint|indent(6) }}
+{##}
+{%- endfor -%}
+{%- endif -%}
+{%- endblock -%}
+
+{%- block functions -%}
+{%- if node.functions %}
+
+---------------------
+
+**Functions**
+
+{% for item in node.functions %}
+.. autofunction:: {{ item }}
{##}
{%- endfor -%}
{%- endif -%}
@@ -69,13 +109,15 @@
{%- block exceptions -%}
{%- if node.exceptions %}
+---------------------
+
**Exceptions**
-{% for item, obj in node.exceptions.items() -%}
+{#% for item, obj in node.exceptions.items() -%}
- :py:exc:`{{ item }}`:
{{ obj|summary }}
-{% endfor -%}
+{% endfor -%#}
{% for item in node.exceptions %}
.. autoexception:: {{ item }}
@@ -88,22 +130,30 @@
{%- endif -%}
{%- endblock -%}
-{%- block variables -%}
-{%- if node.variables %}
+{%- block classes -%}
+{%- if node.classes %}
-**Variables**
+---------------------
-{% for item, obj in node.variables.items() -%}
-- :py:data:`{{ item }}`
-{% endfor -%}
+**Classes**
-{% for item, obj in node.variables.items() %}
-.. autodata:: {{ item }}
- :annotation:
+{#% for item, obj in node.classes.items() -%}
+- :py:class:`{{ item }}`:
+ {{ obj|summary }}
- .. code-block:: text
+{% endfor -%#}
- {{ obj|pprint|indent(6) }}
+{% for item in node.classes %}
+.. autoclass:: {{ item }}
+ :members:
+ :private-members:
+ :special-members:
+ :inherited-members:
+ :exclude-members: __weakref__
+
+ .. rubric:: Inheritance
+ .. inheritance-diagram:: {{ item }}
+ :parts: 1
{##}
{%- endfor -%}
{%- endif -%}
diff --git a/doc/_templates/autoapi/package.rst b/doc/_templates/autoapi/package.rst
new file mode 100644
index 00000000..9cc9fbdc
--- /dev/null
+++ b/doc/_templates/autoapi/package.rst
@@ -0,0 +1,14 @@
+.. # Template created by Patrick Lehmann
+
+Python Class Reference
+######################
+
+Reference of all packages and modules:
+
+.. automodule:: {{ node.name }}
+
+.. toctree::
+ :maxdepth: 1
+{% for item in subnodes %}
+ {{ item.name }}
+{%- endfor %}
diff --git a/doc/conf.py b/doc/conf.py
index 3009b804..a866f2fc 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,19 +1,27 @@
# 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 pyTooling.Packaging import extractVersionInformation
+# ==============================================================================
+# Project configuration
+# ==============================================================================
+githubNamespace = "edaa-org"
+project = "pyEDAA.ProjectModel"
+directoryName = project.replace('.', '/')
+
+# ==============================================================================
+# Project paths
+# ==============================================================================
ROOT = Path(__file__).resolve().parent
-sys_path.insert(0, abspath('.'))
-sys_path.insert(0, abspath('..'))
-sys_path.insert(0, abspath('../pyEDAA/ProjectModel'))
+sys_path.insert(0, abspath("."))
+sys_path.insert(0, abspath(".."))
+sys_path.insert(0, abspath(f"../{directoryName}"))
# ==============================================================================
@@ -22,9 +30,7 @@
# 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.
-project = "pyEDAA.ProjectModel"
-
-packageInformationFile = Path(f"../{project.replace('.', '/')}/__init__.py")
+packageInformationFile = Path(f"../{directoryName}/__init__.py")
versionInformation = extractVersionInformation(packageInformationFile)
author = versionInformation.Author
@@ -37,23 +43,23 @@
# Miscellaneous settings
# ==============================================================================
# The master toctree document.
-master_doc = 'index'
+master_doc = "index"
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
"_build",
- "_themes",
+ "_theme",
"Thumbs.db",
".DS_Store"
]
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'stata-dark'
+pygments_style = "manni"
# ==============================================================================
@@ -72,39 +78,38 @@
# ==============================================================================
# Options for HTML output
# ==============================================================================
-
-html_context = {}
-ctx = ROOT / 'context.json'
-if ctx.is_file():
- html_context.update(loads(ctx.open('r').read()))
-
-if (ROOT / "_theme").is_dir():
- html_theme_path = ["."]
- html_theme = "_theme"
- html_theme_options = {
- 'logo_only': True,
- 'home_breadcrumbs': False,
- 'vcs_pageview_mode': 'blob',
- }
-else:
- html_theme = "alabaster"
+html_theme = "sphinx_rtd_theme"
+html_theme_options = {
+ "logo_only": True,
+ "vcs_pageview_mode": 'blob',
+ "navigation_depth": 5,
+}
+html_css_files = [
+ 'css/override.css',
+]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ["_static"]
-html_logo = str(Path(html_static_path[0]) / "logo_on_dark.svg")
+html_logo = str(Path(html_static_path[0]) / "logo.svg")
html_favicon = str(Path(html_static_path[0]) / "favicon.svg")
# Output file base name for HTML help builder.
-htmlhelp_basename = 'pyEDAAProjectModelDoc'
+htmlhelp_basename = f"{project}Doc"
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
html_last_updated_fmt = "%d.%m.%Y"
+# ==============================================================================
+# Python settings
+# ==============================================================================
+modindex_common_prefix = [
+ f"{project}."
+]
# ==============================================================================
# Options for LaTeX / PDF output
@@ -113,13 +118,13 @@
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
- 'papersize': 'a4paper',
+ "papersize": "a4paper",
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
- 'preamble': dedent(r"""
+ "preamble": dedent(r"""
% ================================================================================
% User defined additional preamble code
% ================================================================================
@@ -145,10 +150,10 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
( master_doc,
- 'pyEDAA.ProjectModel.tex',
- 'The pyEDAA.ProjectModel Documentation',
- 'Patrick Lehmann',
- 'manual'
+ f"{project}.tex",
+ f"The {project} Documentation",
+ f"Patrick Lehmann",
+ f"manual"
),
]
@@ -159,20 +164,23 @@
extensions = [
# Standard Sphinx extensions
"sphinx.ext.autodoc",
- 'sphinx.ext.extlinks',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.inheritance_diagram',
- 'sphinx.ext.todo',
- 'sphinx.ext.graphviz',
- 'sphinx.ext.mathjax',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.viewcode',
+ "sphinx.ext.extlinks",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.inheritance_diagram",
+ "sphinx.ext.todo",
+ "sphinx.ext.graphviz",
+ "sphinx.ext.mathjax",
+ "sphinx.ext.ifconfig",
+ "sphinx.ext.viewcode",
# SphinxContrib extensions
- 'sphinxcontrib.mermaid',
+ "sphinxcontrib.mermaid",
# Other extensions
- 'sphinx_fontawesome',
- 'sphinx_autodoc_typehints',
- 'autoapi.sphinx',
+ "sphinx_design",
+ "sphinx_copybutton",
+ "sphinx_autodoc_typehints",
+ "autoapi.sphinx",
+ "sphinx_reports",
+# User defined extensions
]
@@ -180,7 +188,10 @@
# Sphinx.Ext.InterSphinx
# ==============================================================================
intersphinx_mapping = {
- 'python': ('https://docs.python.org/3', None),
+ "python": ("https://docs.python.org/3", None),
+ "pyTool": ("https://pyTooling.github.io/pyTooling/", None),
+ "osvvm": ("https://OSVVM.github.io/OSVVM/", None),
+ # OSVVM-Scripts?
}
@@ -188,12 +199,12 @@
# Sphinx.Ext.AutoDoc
# ==============================================================================
# see: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration
-autodoc_default_options = {
- "private-members": True,
- "special-members": True,
- "inherited-members": True,
- "exclude-members": "__weakref__"
-}
+#autodoc_default_options = {
+# "private-members": True,
+# "special-members": True,
+# "inherited-members": True,
+# "exclude-members": "__weakref__"
+#}
#autodoc_class_signature = "separated"
autodoc_member_order = "bysource" # alphabetical, groupwise, bysource
autodoc_typehints = "both"
@@ -204,9 +215,12 @@
# Sphinx.Ext.ExtLinks
# ==============================================================================
extlinks = {
- "ghissue": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/issues/%s', 'issue #%s'),
- "ghpull": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/pull/%s', 'pull request #%s'),
- "ghsrc": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/blob/main/%s', None),
+ "gh": (f"https://GitHub.com/%s", "%s"),
+ "ghissue": (f"https://GitHub.com/{githubNamespace}/{project}/issues/%s", "issue #%s"),
+ "ghpull": (f"https://GitHub.com/{githubNamespace}/{project}/pull/%s", "pull request #%s"),
+ "ghsrc": (f"https://GitHub.com/{githubNamespace}/{project}/blob/main/%s", None),
+ "pypi": ('https://PyPI.org/project/%s', '%s'),
+ "wiki": (f"https://en.wikipedia.org/wiki/%s", None),
}
@@ -216,6 +230,26 @@
graphviz_output_format = "svg"
+# ==============================================================================
+# SphinxContrib.Mermaid
+# ==============================================================================
+mermaid_params = [
+ '--backgroundColor', 'transparent',
+]
+mermaid_verbose = True
+
+
+# ==============================================================================
+# Sphinx.Ext.Inheritance_Diagram
+# ==============================================================================
+inheritance_node_attrs = {
+# "shape": "ellipse",
+# "fontsize": 14,
+# "height": 0.75,
+ "color": "dodgerblue1",
+ "style": "filled"
+}
+
# ==============================================================================
# Sphinx.Ext.ToDo
@@ -225,10 +259,54 @@
todo_link_only = True
+# ==============================================================================
+# sphinx-reports
+# ==============================================================================
+report_dep_dependencies = {
+ "src": ["../requirements.txt"],
+ "doc": ["requirements.txt"],
+ "unit": ["../tests/unit/requirements.txt"],
+ "build": ["../build/requirements.txt"],
+ "publish": ["../dist/requirements.txt"],
+}
+
+report_unittest_testsuites = {
+ "src": {
+ "name": f"{project}",
+ "xml_report": "../report/unit/unittest.xml",
+ }
+}
+report_codecov_packages = {
+ "src": {
+ "name": f"{project}",
+ "json_report": "../report/coverage/coverage.json",
+ "fail_below": 80,
+ "levels": "default"
+ }
+}
+report_doccov_packages = {
+ "src": {
+ "name": f"{project}",
+ "directory": f"../{directoryName}",
+ "fail_below": 80,
+ "levels": "default"
+ }
+}
+
+
+# ==============================================================================
+# Sphinx_Design
+# ==============================================================================
+# sd_fontawesome_latex = True
+
# ==============================================================================
# AutoAPI.Sphinx
# ==============================================================================
autoapi_modules = {
- 'pyEDAA.ProjectModel': {'output': "pyEDAA.ProjectModel", "override": True}
+ f"{project}": {
+ "template": "module",
+ "output": project,
+ "override": True
+ }
}
diff --git a/doc/coverage/index.rst b/doc/coverage/index.rst
index 80bbad2e..614d17bc 100644
--- a/doc/coverage/index.rst
+++ b/doc/coverage/index.rst
@@ -1,4 +1,7 @@
-Coverage Report
-###############
+Code Coverage Details
+#####################
-*Placeholder for the Coverage report generated with* ``pytest`` *and* ``coverage``.
+Code coverage report generated with `pytest `__ and `Coverage.py `__.
+
+.. report:code-coverage::
+ :reportid: src
diff --git a/doc/genindex.rst b/doc/genindex.rst
deleted file mode 100644
index c07da40d..00000000
--- a/doc/genindex.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-.. This file is a placeholder and will be replaced
-
-Index
-#####
diff --git a/doc/index.rst b/doc/index.rst
index 99bce7b0..bc36a5eb 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -37,7 +37,7 @@ The pyEDAA.ProjectModel Documentation
An abstract model of HDL design projects and EDA tooling.
-.. _goals:
+.. _GOALS:
Main Goals
**********
@@ -50,7 +50,7 @@ Frameworks consuming this model can build higher level features and services on
multiple input sources.
-.. _usecase:
+.. _USECASES:
Use Cases
*********
@@ -66,7 +66,7 @@ Use Cases
* Managing IP cores and projects with `pyIPCMI `__.
-.. _news:
+.. _NEWS:
News
****
@@ -103,9 +103,9 @@ News
Contributors
************
-* `Patrick Lehmann `__ (Maintainer)
-* `Unai Martinez-Corral `__ (Maintainer)
-* `and more... `__
+* :gh:`Patrick Lehmann ` (Maintainer)
+* :gh:`Unai Martinez-Corral `
+* `and more... `__
.. _LICENSE:
@@ -123,14 +123,6 @@ License
This Python package (source code) is licensed under **Apache License 2.0**. |br|
The accompanying documentation is licensed under **Creative Commons - Attribution 4.0 (CC-BY 4.0)**.
-------------------------------------
-
-.. |docdate| date:: %d.%b %Y - %H:%M
-
-.. only:: html
-
- This document was generated on |docdate|.
-
.. toctree::
:hidden:
@@ -160,14 +152,20 @@ License
.. raw:: latex
- \part{References}
+ \part{References and Reports}
.. toctree::
- :caption: References
+ :caption: References and Reports
:hidden:
- pyEDAA.ProjectModel/index
+ Python Class Reference
+ unittests/index
+ coverage/index
+ CodeCoverage
+ Doc. Coverage Report
+ Static Type Check Report ➚
+.. Coverage Report ➚
.. raw:: latex
@@ -177,10 +175,9 @@ License
:caption: Appendix
:hidden:
- Coverage Report ➚
- Static Type Check Report ➚
License
Doc-License
Glossary
genindex
- py-modindex
+ Python Module Index
+ TODO
diff --git a/doc/py-modindex.rst b/doc/py-modindex.rst
deleted file mode 100644
index 23167be6..00000000
--- a/doc/py-modindex.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-.. This file is a placeholder and will be replaced
-
-Module Index
-############
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 8a8a83f6..36de666d 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,14 +1,17 @@
-r ../requirements.txt
-pyTooling ~= 7.0
-
# Enforce latest version on ReadTheDocs
-sphinx ~= 8.1
+sphinx ~= 8.2
docutils ~= 0.21
docutils_stubs ~= 0.0.22
+# ReadTheDocs Theme
+sphinx_rtd_theme ~= 3.0
+
# Sphinx Extenstions
sphinxcontrib-mermaid ~= 1.0
-autoapi>=2.0.1
-sphinx_fontawesome>=0.0.6
-sphinx_autodoc_typehints ~= 2.5
+autoapi >= 2.0.1
+sphinx_design ~= 0.6.1
+sphinx-copybutton >= 0.5.2
+sphinx_autodoc_typehints ~= 3.2
+sphinx_reports ~= 0.9
diff --git a/doc/shields.inc b/doc/shields.inc
index 80a76368..770c058a 100644
--- a/doc/shields.inc
+++ b/doc/shields.inc
@@ -54,11 +54,11 @@
:target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/network/dependents
.. # GHA test and coverage
-.. |SHIELD:svg:ProjectModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF
+.. |SHIELD:svg:ProjectModel-gha-test| image:: https://img.shields.io/github/actions/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline.yml?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF
:alt: GitHub Workflow - Build and Test Status
:height: 22
:target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml
-.. |SHIELD:png:ProjectModel-gha-test| image:: https://raster.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF
+.. |SHIELD:png:ProjectModel-gha-test| image:: https://raster.shields.io/github/actions/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline.yml?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF
:alt: GitHub Workflow - Build and Test Status
:height: 22
:target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml
diff --git a/doc/unittests/index.rst b/doc/unittests/index.rst
new file mode 100644
index 00000000..32022017
--- /dev/null
+++ b/doc/unittests/index.rst
@@ -0,0 +1,12 @@
+Unittest Summary Report
+#######################
+
+.. report:unittest-summary::
+ :reportid: src
+ :show-testcases: not-passed
+ :no-assertions:
+
+----------
+
+Unittest report generated with `pytest `__ and visualized by
+`sphinx-reports `__.
diff --git a/pyEDAA/ProjectModel/Altera/Quartus.py b/pyEDAA/ProjectModel/Altera/Quartus.py
index d292679f..880d33cb 100644
--- a/pyEDAA/ProjectModel/Altera/Quartus.py
+++ b/pyEDAA/ProjectModel/Altera/Quartus.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Altera/__init__.py b/pyEDAA/ProjectModel/Altera/__init__.py
index cd0e28c7..c125a8d5 100644
--- a/pyEDAA/ProjectModel/Altera/__init__.py
+++ b/pyEDAA/ProjectModel/Altera/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Attributes.py b/pyEDAA/ProjectModel/Attributes.py
index f205f2d5..336baac9 100644
--- a/pyEDAA/ProjectModel/Attributes.py
+++ b/pyEDAA/ProjectModel/Attributes.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/GHDL.py b/pyEDAA/ProjectModel/GHDL.py
index 68c9a19a..518990d3 100644
--- a/pyEDAA/ProjectModel/GHDL.py
+++ b/pyEDAA/ProjectModel/GHDL.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Intel/QuartusPrime.py b/pyEDAA/ProjectModel/Intel/QuartusPrime.py
index 9fc3ea1b..0eb838d8 100644
--- a/pyEDAA/ProjectModel/Intel/QuartusPrime.py
+++ b/pyEDAA/ProjectModel/Intel/QuartusPrime.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Intel/__init__.py b/pyEDAA/ProjectModel/Intel/__init__.py
index d67f0e49..659d2e45 100644
--- a/pyEDAA/ProjectModel/Intel/__init__.py
+++ b/pyEDAA/ProjectModel/Intel/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py b/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py
index 3a8de8e9..9322819d 100644
--- a/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py
+++ b/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py b/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py
index 1f7ea512..9ef30222 100644
--- a/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py
+++ b/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/MentorGraphics/__init__.py b/pyEDAA/ProjectModel/MentorGraphics/__init__.py
index 4351b5f3..d2025450 100644
--- a/pyEDAA/ProjectModel/MentorGraphics/__init__.py
+++ b/pyEDAA/ProjectModel/MentorGraphics/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/OSVVM.py b/pyEDAA/ProjectModel/OSVVM.py
index b9888a55..8feb79d2 100644
--- a/pyEDAA/ProjectModel/OSVVM.py
+++ b/pyEDAA/ProjectModel/OSVVM.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Verilog.py b/pyEDAA/ProjectModel/Verilog.py
index f1e6962a..55bc229f 100644
--- a/pyEDAA/ProjectModel/Verilog.py
+++ b/pyEDAA/ProjectModel/Verilog.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Xilinx/ISE.py b/pyEDAA/ProjectModel/Xilinx/ISE.py
index 667438db..e5d097f1 100644
--- a/pyEDAA/ProjectModel/Xilinx/ISE.py
+++ b/pyEDAA/ProjectModel/Xilinx/ISE.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Xilinx/Vivado.py b/pyEDAA/ProjectModel/Xilinx/Vivado.py
index f3a77f7e..b291f780 100644
--- a/pyEDAA/ProjectModel/Xilinx/Vivado.py
+++ b/pyEDAA/ProjectModel/Xilinx/Vivado.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/Xilinx/__init__.py b/pyEDAA/ProjectModel/Xilinx/__init__.py
index cca3fb28..3a504295 100644
--- a/pyEDAA/ProjectModel/Xilinx/__init__.py
+++ b/pyEDAA/ProjectModel/Xilinx/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/pyEDAA/ProjectModel/__init__.py b/pyEDAA/ProjectModel/__init__.py
index b76a9c14..f63c6270 100644
--- a/pyEDAA/ProjectModel/__init__.py
+++ b/pyEDAA/ProjectModel/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# Copyright 2014-2016 Technische Universität Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
@@ -32,9 +32,9 @@
"""An abstract model of EDA tool projects."""
__author__ = "Patrick Lehmann"
__email__ = "Paebbels@gmail.com"
-__copyright__ = "2014-2024, Patrick Lehmann, Unai Martinez-Corral"
+__copyright__ = "2014-2025, Patrick Lehmann, Unai Martinez-Corral"
__license__ = "Apache License, Version 2.0"
-__version__ = "0.5.0"
+__version__ = "0.5.1"
__keywords__ = ["eda project", "model", "abstract", "xilinx", "vivado", "osvvm", "file set", "file group", "test bench", "test harness"]
from os.path import relpath as path_relpath
diff --git a/pyproject.toml b/pyproject.toml
index d67c4ab0..96f0974b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,8 +1,8 @@
[build-system]
requires = [
- "setuptools ~= 75.3",
- "wheel ~= 0.44",
- "pyTooling ~= 7.0"
+ "setuptools >= 80.0",
+ "wheel ~= 0.45",
+ "pyTooling ~= 8.4"
]
build-backend = "setuptools.build_meta"
@@ -20,6 +20,12 @@ show_error_codes = true
namespace_packages = true
html_report = "report/typing"
+[tool.pytest]
+junit_xml = "report/unit/UnittestReportSummary.xml"
+
+[tool.pyedaa-reports]
+junit_xml = "report/unit/unittest.xml"
+
[tool.pytest.ini_options]
addopts = "--tb=native"
# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
diff --git a/requirements.txt b/requirements.txt
index 03594911..d8b160ac 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-pyTooling ~= 7.0
-pyVHDLModel ~= 0.29.1
+pyTooling ~= 8.4
+pyVHDLModel ~= 0.31
pySVModel ~= 0.5
pySystemRDLModel ~= 0.3
diff --git a/run.ps1 b/run.ps1
new file mode 100644
index 00000000..f4abba45
--- /dev/null
+++ b/run.ps1
@@ -0,0 +1,321 @@
+[CmdletBinding()]
+Param(
+ # Clean up all files and directories
+ [switch]$clean,
+
+ # Commands
+ [switch]$all,
+ [switch]$copyall,
+
+ [switch]$doc,
+ [switch]$livedoc,
+ [switch]$doccov,
+
+ [switch]$unit,
+ [switch]$liveunit,
+ [switch]$copyunit,
+
+ [switch]$cov,
+ [switch]$livecov,
+ [switch]$copycov,
+
+ [switch]$type,
+ [switch]$livetype,
+ [switch]$copytype,
+
+ [switch]$nooutput,
+
+ [switch]$build,
+ [switch]$install,
+
+ # Display this help"
+ [switch]$help
+)
+
+$PackageName = "pyEDAA.ProjectModel"
+$PackageVersion = "0.5.1"
+
+# set default values
+$EnableDebug = [bool]$PSCmdlet.MyInvocation.BoundParameters["Debug"]
+$EnableVerbose = [bool]$PSCmdlet.MyInvocation.BoundParameters["Verbose"] -or $EnableDebug
+
+# Display help if no command was selected
+$help = $help -or ( -not(
+ $all -or $copyall -or
+ $clean -or
+ $doc -or $livedoc -or $doccov -or
+ $unit -or $liveunit -or $copyunit -or
+ $cov -or $livecov -or $copycov -or
+ $type -or $livetype -or $copytype -or
+ $build -or $install
+ )
+)
+
+Write-Host "================================================================================" -ForegroundColor Magenta
+Write-Host "$PackageName Documentation Compilation and Assembly Tool" -ForegroundColor Magenta
+Write-Host "================================================================================" -ForegroundColor Magenta
+
+if ($help)
+{ Get-Help $MYINVOCATION.MyCommand.Path -Detailed
+ exit 0
+}
+
+if ($all)
+{ $doc = $true
+ $unit = $true
+# $copyunit = $true
+ $cov = $true
+# $copycov = $true
+ $type = $true
+ $copytype = $true
+}
+if ($copyall)
+{# $copyunit = $true
+# $copycov = $true
+ $copytype = $true
+}
+
+if ($clean)
+{ Write-Host -ForegroundColor DarkYellow "[live][DOC] Cleaning documentation directories ..."
+ rm -Force .\doc\$PackageName\*
+ .\doc\make.bat clean
+ Write-Host -ForegroundColor DarkYellow "[live][BUILD] Cleaning build directories ..."
+ rm -Force .\build\bdist.win-amd64
+ rm -Force .\build\lib
+}
+
+if ($build)
+{ Write-Host -ForegroundColor Yellow "[live][BUILD] Cleaning build directories ..."
+ rm -Force .\build\bdist.win-amd64
+ rm -Force .\build\lib
+ Write-Host -ForegroundColor Yellow "[live][BUILD] Building $PackageName package as wheel ..."
+ py -3.13 -m build --wheel
+
+ Write-Host -ForegroundColor Yellow "[live][BUILD] Building wheel finished"
+}
+if ($install)
+{ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
+ { Write-Host -ForegroundColor Yellow "[live][INSTALL] Installing $PackageName with administrator rights ..."
+ $proc = Start-Process pwsh.exe "-NoProfile -ExecutionPolicy Bypass -WorkingDirectory `"$PSScriptRoot`" -File `"$PSCommandPath`" `"-install`"" -Verb RunAs -Wait
+
+# Write-Host -ForegroundColor Yellow "[live][INSTALL] Wait on administrator console ..."
+# Wait-Process -Id $proc.Id
+ }
+ else
+ { Write-Host -ForegroundColor Cyan "[ADMIN][UNINSTALL] Uninstalling $PackageName ..."
+ py -3.13 -m pip uninstall -y $PackageName
+ Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Installing $PackageName from wheel ..."
+ py -3.13 -m pip install .\dist\$PackageName-$PackageVersion-py3-none-any.whl
+
+ Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Closing window in 5 seconds ..."
+ Start-Sleep -Seconds 5
+ }
+}
+
+$jobs = @()
+
+if ($livedoc)
+{ Write-Host -ForegroundColor DarkYellow "[live][DOC] Building documentation using Sphinx ..."
+
+ .\doc\make.bat html --verbose
+
+ Write-Host -ForegroundColor DarkYellow "[live][DOC] Documentation finished"
+}
+elseif ($doc)
+{ Write-Host -ForegroundColor DarkYellow "[Job1][DOC] Building documentation using Sphinx ..."
+ Write-Host -ForegroundColor DarkGreen "[SCRIPT] Starting Documentation job ..."
+
+ # Compile documentation
+ $compileDocFunc = {
+ .\doc\make.bat html --verbose
+ }
+ $docJob = Start-Job -Name "Documentation" -ScriptBlock $compileDocFunc
+# $jobs += $docJob
+}
+
+
+if ($doccov)
+{
+ .\doc\make.bat coverage
+}
+
+if ($liveunit)
+{ Write-Host -ForegroundColor DarkYellow "[live][UNIT] Running Unit Tests using pytest ..."
+
+ $env:GHDL_PREFIX = "C:\Tools\GHDL\6.0.0.dev0-ucrt64-mcode\lib\ghdl"
+ $env:ENVIRONMENT_NAME = "Windows (x86-64)"
+ pytest -raP --color=yes --junitxml=report/unit/unittest.xml --template=html1/index.html --report=report/unit/html/index.html --split-report tests/unit
+
+ if ($copyunit)
+ { cp -Recurse -Force .\report\unit\html\* .\doc\_build\html\unittests
+ Write-Host -ForegroundColor DarkBlue "[live][UNIT] Copyed unit testing report to 'unittests' directory in HTML directory"
+ }
+
+ Write-Host -ForegroundColor DarkYellow "[live][UNIT] Unit Tests finished"
+}
+elseif ($unit)
+{ Write-Host -ForegroundColor DarkYellow "[Job2][UNIT] Running Unit Tests using pytest ..."
+ Write-Host -ForegroundColor DarkGreen "[SCRIPT] Starting UnitTests jobs ..."
+
+ # Run unit tests
+ $runUnitFunc = {
+ $env:GHDL_PREFIX = "C:\Tools\GHDL\6.0.0.dev0-ucrt64-mcode\lib\ghdl"
+ $env:ENVIRONMENT_NAME = "Windows (x86-64)"
+ pytest -raP --color=yes --junitxml=report/unit/unittest.xml --template=html1/index.html --report=report/unit/html/index.html --split-report tests/unit
+ }
+ $unitJob = Start-Job -Name "UnitTests" -ScriptBlock $runUnitFunc
+ $jobs += $unitJob
+}
+
+if ($livecov)
+{ Write-Host -ForegroundColor DarkMagenta "[live][COV] Running Unit Tests with coverage ..."
+
+ $env:GHDL_PREFIX = "C:\Tools\GHDL\6.0.0.dev0-ucrt64-mcode\lib\ghdl"
+ $env:ENVIRONMENT_NAME = "Windows (x86-64)"
+ coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -ra --tb=line --color=yes tests/unit
+
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Convert coverage report to HTML ..."
+ coverage html
+
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Convert coverage report to XML (Cobertura) ..."
+ coverage xml
+
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Convert coverage report to JSON ..."
+ coverage json
+
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Write coverage report to console ..."
+ coverage report
+
+ if ($copycov)
+ { cp -Recurse -Force .\report\coverage\html\* .\doc\_build\html\coverage
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Copyed code coverage report to 'coverage' directory in HTML directory"
+ }
+
+ Write-Host -ForegroundColor DarkMagenta "[live][COV] Coverage finished"
+}
+elseif ($cov)
+{ Write-Host -ForegroundColor DarkMagenta "[live][COV] Running Unit Tests with coverage ..."
+ Write-Host -ForegroundColor DarkMagenta "[SCRIPT] Starting Coverage jobs ..."
+
+ # Collect coverage
+ $collectCovFunc = {
+ $env:GHDL_PREFIX = "C:\Tools\GHDL\6.0.0.dev0-ucrt64-mcode\lib\ghdl"
+ $env:ENVIRONMENT_NAME = "Windows (x86-64)"
+ coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -ra --tb=line --color=yes tests/unit
+
+ Write-Host -ForegroundColor DarkMagenta "[Job3][COV] Convert coverage report to HTML ..."
+ coverage html
+
+ Write-Host -ForegroundColor DarkMagenta "[Job3][COV] Convert coverage report to XML (Cobertura) ..."
+ coverage xml
+
+ Write-Host -ForegroundColor DarkMagenta "[Job3][COV] Convert coverage report to JSON ..."
+ coverage json
+ }
+ $covJob = Start-Job -Name "Coverage" -ScriptBlock $collectCovFunc
+ $jobs += $covJob
+}
+
+if ($livetype)
+{ Write-Host -ForegroundColor DarkCyan "[live][TYPE] Running static type analysis using mypy ..."
+
+ $env:MYPY_FORCE_COLOR = 1
+ mypy.exe -p $PackageName
+
+ if ($copytype)
+ { cp -Recurse -Force .\report\typing\* .\doc\_build\html\typing
+ Write-Host -ForegroundColor DarkCyan "[live][TYPE] Copyed typing report to 'typing' directory in HTML directory."
+ }
+
+ Write-Host -ForegroundColor DarkCyan "[live][TYPE] Static type analysis finished"
+}
+elseif ($type)
+{ Write-Host -ForegroundColor DarkCyan "[live][TYPE] Running static type analysis using mypy ..."
+ Write-Host -ForegroundColor DarkCyan "[SCRIPT] Starting Typing jobs ..."
+
+ # Analyze types
+ $analyzeTypesFunc = {
+ $env:MYPY_FORCE_COLOR = 1
+ mypy.exe -p $PackageName
+ }
+ $typeJob = Start-Job -Name "Typing" -ScriptBlock $analyzeTypesFunc
+ $jobs += $typeJob
+}
+
+
+if ($doc)
+{ Write-Host -ForegroundColor DarkGreen "[SCRIPT] Waiting on Documentation job ..."
+ Wait-Job -Job $docJob
+ Write-Host -ForegroundColor DarkYellow "[Job1][DOC] Documentation finished"
+}
+if ($jobs.Count -ne 0)
+{
+ Write-Host -ForegroundColor DarkGreen ( "[SCRIPT] Waiting on {0} jobs ({1}) ..." -f $jobs.Count, (($jobs | %{ $_.Name }) -join ", "))
+ Wait-Job -Job $jobs
+}
+
+
+if (-not $liveunit -and $copyunit)
+{
+# if ($unit)
+# { Wait-Job -Job $unitJob
+# Write-Host -ForegroundColor DarkBlue "[Job2][UNIT] Unit tests finished"
+# }
+ cp -Recurse -Force .\report\unit\html\* .\doc\_build\html\unittests
+ Write-Host -ForegroundColor DarkBlue "[post][UNIT] Copyed unit testing report to 'unittests' directory in HTML directory"
+}
+if (-not ($livecov -or $cov) -and $copycov)
+{
+# if ($cov)
+# { Wait-Job -Job $unitJob
+# Write-Host -ForegroundColor DarkMagenta "[Job3][UNIT] Coverage collection finished"
+# }
+ cp -Recurse -Force .\report\coverage\html\* .\doc\_build\html\coverage
+ Write-Host -ForegroundColor DarkMagenta "[post][COV] Copyed code coverage report to 'coverage' directory in HTML directory"
+}
+if (-not $livetype -and $copytype)
+{
+# if ($type)
+# { Wait-Job -Job $typeJob
+# Write-Host -ForegroundColor DarkCyan "[Job4][UNIT] Static type analysis finished"
+# }
+ cp -Recurse -Force .\report\typing\* .\doc\_build\html\typing
+ Write-Host -ForegroundColor DarkCyan "[post][TYPE] Copyed typing report to 'typing' directory in HTML directory."
+}
+
+
+if ($type)
+{ Write-Host -ForegroundColor DarkCyan "================================================================================"
+ if (-not $nooutput)
+ { Receive-Job -Job $typeJob
+ }
+ Remove-Job -Job $typeJob
+}
+if ($doc)
+{ Write-Host -ForegroundColor DarkYellow "================================================================================"
+ if (-not $nooutput)
+ { Receive-Job -Job $docJob
+ }
+ Remove-Job -Job $docJob
+}
+if ($unit)
+{ Write-Host -ForegroundColor DarkBlue "================================================================================"
+ if (-not $nooutput)
+ { Receive-Job -Job $unitJob
+ }
+ Remove-Job -Job $unitJob
+}
+if ($cov)
+{ Write-Host -ForegroundColor DarkMagenta "================================================================================"
+ if (-not $nooutput)
+ { Receive-Job -Job $covJob
+ }
+ Remove-Job -Job $covJob
+
+ if ($copycov)
+ { cp -Recurse -Force .\report\coverage\html\* .\doc\_build\html\coverage
+ Write-Host -ForegroundColor DarkMagenta "[post][COV] Copyed code coverage report to 'coverage' directory in HTML directory"
+ }
+}
+Write-Host -ForegroundColor DarkGreen "================================================================================"
+Write-Host -ForegroundColor DarkGreen "[SCRIPT] Finished"
diff --git a/setup.py b/setup.py
index 3907bd3f..0a53ad03 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# Copyright 2014-2016 Technische Universität Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
diff --git a/tests/requirements.txt b/tests/requirements.txt
index 2ad659b6..dc267c19 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,13 +1,13 @@
-r ../requirements.txt
# Coverage collection
-Coverage ~= 7.6
+Coverage ~= 7.8
# Test Runner
pytest ~= 8.3
-pytest-cov ~= 6.0
+pytest-cov ~= 6.1
# Static Type Checking
-mypy ~= 1.13
-typing_extensions ~= 4.12
-lxml ~= 5.3
+mypy ~= 1.15
+typing_extensions ~= 4.13
+lxml ~= 5.4
diff --git a/tests/unit/DependencyScan.py b/tests/unit/DependencyScan.py
index 52e67522..da3d0cdd 100644
--- a/tests/unit/DependencyScan.py
+++ b/tests/unit/DependencyScan.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/Design.py b/tests/unit/Design.py
index 560c51f4..01f1ed1f 100644
--- a/tests/unit/Design.py
+++ b/tests/unit/Design.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/File.py b/tests/unit/File.py
index 2f5e1b33..07efece2 100644
--- a/tests/unit/File.py
+++ b/tests/unit/File.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
@@ -238,3 +238,55 @@ def test_AttachedToFileSet(self) -> None:
self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
self.assertEqual("-5", file[KeyValueAttribute]["id1"])
+
+ def test_AttachedToDesign(self) -> None:
+ project = Project("project", rootDirectory=Path("project"))
+ design = Design("design", directory=Path("designA"), project=project)
+ fileSet = FileSet("fileset", design=design)
+ file = File(Path("file_A1.vhdl"), fileSet=fileSet)
+
+ design[KeyValueAttribute] = KeyValueAttribute()
+
+ attribute = fileSet[KeyValueAttribute]
+ attribute["id1"] = "15"
+ design[KeyValueAttribute]["id2"] = "25"
+
+ self.assertEqual("15", attribute["id1"])
+ self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
+ self.assertEqual("15", file[KeyValueAttribute]["id1"])
+
+ self.assertEqual("25", attribute["id2"])
+ self.assertEqual("25", fileSet[KeyValueAttribute]["id2"])
+ self.assertEqual("25", file[KeyValueAttribute]["id2"])
+
+ file[KeyValueAttribute] = KeyValueAttribute()
+ file[KeyValueAttribute]["id1"] = "-5"
+
+ self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
+ self.assertEqual("-5", file[KeyValueAttribute]["id1"])
+
+ def test_AttachedToProject(self) -> None:
+ project = Project("project", rootDirectory=Path("project"))
+ design = Design("design", directory=Path("designA"), project=project)
+ fileSet = FileSet("fileset", design=design)
+ file = File(Path("file_A1.vhdl"), fileSet=fileSet)
+
+ project[KeyValueAttribute] = KeyValueAttribute()
+
+ attribute = fileSet[KeyValueAttribute]
+ attribute["id1"] = "15"
+ project[KeyValueAttribute]["id2"] = "25"
+
+ self.assertEqual("15", attribute["id1"])
+ self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
+ self.assertEqual("15", file[KeyValueAttribute]["id1"])
+
+ self.assertEqual("25", attribute["id2"])
+ self.assertEqual("25", fileSet[KeyValueAttribute]["id2"])
+ self.assertEqual("25", file[KeyValueAttribute]["id2"])
+
+ file[KeyValueAttribute] = KeyValueAttribute()
+ file[KeyValueAttribute]["id1"] = "-5"
+
+ self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
+ self.assertEqual("-5", file[KeyValueAttribute]["id1"])
diff --git a/tests/unit/FileSet.py b/tests/unit/FileSet.py
index b206d037..f9c21dcb 100644
--- a/tests/unit/FileSet.py
+++ b/tests/unit/FileSet.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
@@ -361,3 +361,43 @@ def test_DelAttribute_Normal(self) -> None:
fileSet[Attr] = 5
del fileSet[Attr]
+
+
+class AttributeResolution(TestCase):
+ def test_AttachedToFileSet(self) -> None:
+ project = Project("project", rootDirectory=Path("project"))
+ design = Design("design", directory=Path("designA"), project=project)
+ fileSet = FileSet("fileset", design=design)
+
+ fileSet[KeyValueAttribute] = KeyValueAttribute()
+
+ attribute = fileSet[KeyValueAttribute]
+ attribute["id1"] = "5"
+
+ self.assertEqual("5", attribute["id1"])
+ self.assertEqual("5", fileSet[KeyValueAttribute]["id1"])
+
+ def test_AttachedToDesign(self) -> None:
+ project = Project("project", rootDirectory=Path("project"))
+ design = Design("design", directory=Path("designA"), project=project)
+ fileSet = FileSet("fileset", design=design)
+
+ design[KeyValueAttribute] = KeyValueAttribute()
+
+ attribute = design[KeyValueAttribute]
+ attribute["id1"] = "15"
+ design[KeyValueAttribute]["id2"] = "25"
+
+ self.assertEqual("15", attribute["id1"])
+ self.assertEqual("15", design[KeyValueAttribute]["id1"])
+ self.assertEqual("15", fileSet[KeyValueAttribute]["id1"])
+
+ self.assertEqual("25", attribute["id2"])
+ self.assertEqual("25", design[KeyValueAttribute]["id2"])
+ self.assertEqual("25", fileSet[KeyValueAttribute]["id2"])
+
+ fileSet[KeyValueAttribute] = KeyValueAttribute()
+ fileSet[KeyValueAttribute]["id1"] = "-5"
+
+ self.assertEqual("15", design[KeyValueAttribute]["id1"])
+ self.assertEqual("-5", fileSet[KeyValueAttribute]["id1"])
diff --git a/tests/unit/Files.py b/tests/unit/Files.py
index 6b68f97e..96e2bdc7 100644
--- a/tests/unit/Files.py
+++ b/tests/unit/Files.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/Project.py b/tests/unit/Project.py
index bcd82007..806d240c 100644
--- a/tests/unit/Project.py
+++ b/tests/unit/Project.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/VHDLLibrary.py b/tests/unit/VHDLLibrary.py
index d3d91774..bb648156 100644
--- a/tests/unit/VHDLLibrary.py
+++ b/tests/unit/VHDLLibrary.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/VivadoProject.py b/tests/unit/VivadoProject.py
index 90017ca8..3083f26c 100644
--- a/tests/unit/VivadoProject.py
+++ b/tests/unit/VivadoProject.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
index 1e1c72a3..f08bf70e 100644
--- a/tests/unit/__init__.py
+++ b/tests/unit/__init__.py
@@ -11,7 +11,7 @@
# #
# License: #
# ==================================================================================================================== #
-# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
+# Copyright 2017-2025 Patrick Lehmann - Boetzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #