From 9648a2eec2fdb8e16685d174714090f0d08eb398 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 21 Feb 2025 22:06:32 +0100 Subject: [PATCH] General updates. --- .gitignore | 12 +++++++++++- README.md | 2 +- dist/requirements.txt | 2 +- doc/DocCoverage.rst | 7 +++++++ doc/TODO.rst | 4 ++++ doc/coverage/index.rst | 9 ++++++--- doc/genindex.rst | 4 ---- doc/index.rst | 24 +++++++++++++----------- doc/py-modindex.rst | 4 ---- doc/requirements.txt | 8 +++----- doc/shields.inc | 4 ++-- doc/unittests/index.rst | 7 +++++++ pyEDAA/UCIS/CLI/__init__.py | 2 +- pyEDAA/UCIS/Cobertura.py | 2 +- pyEDAA/UCIS/UCDB.py | 2 +- pyEDAA/UCIS/__init__.py | 4 ++-- pyproject.toml | 7 +++++-- requirements.txt | 2 +- setup.py | 15 ++++++++++----- tests/requirements.txt | 2 +- tests/unit/CLI.py | 2 +- tests/unit/UCDB.py | 2 +- tests/unit/__init__.py | 2 +- tests/unit/requirements.txt | 1 + 24 files changed, 81 insertions(+), 49 deletions(-) create mode 100644 doc/DocCoverage.rst create mode 100644 doc/TODO.rst delete mode 100644 doc/genindex.rst delete mode 100644 doc/py-modindex.rst create mode 100644 doc/unittests/index.rst create mode 100644 tests/unit/requirements.txt diff --git a/.gitignore b/.gitignore index 0e00965a..e0f9e7c8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,13 @@ __pycache__/ .coverage .cov coverage.xml +/report/coverage + +# mypy +/report/typing + +# pytest +/report/unit # setuptools /build/**/*.* @@ -21,5 +28,8 @@ coverage.xml /doc/pyEDAA.UCIS/**/*.* !/doc/pyEDAA.UCIS/index.rst -# PyCharm project +# PyCharm project files /.idea/workspace.xml + +# Git files +!.git* diff --git a/README.md b/README.md index b5d9b15a..b6752104 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![PyPI](https://img.shields.io/pypi/v/pyEDAA.UCIS?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.UCIS/) ![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.UCIS?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.UCIS?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072) -[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.UCIS/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.UCIS/actions/workflows/Pipeline.yml) +[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/actions/workflow/status/edaa-org/pyEDAA.UCIS/Pipeline.yml?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.UCIS/actions/workflows/Pipeline.yml) [![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyEDAA.UCIS?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/edaa-org/pyEDAA.UCIS) [![Codacy - Quality](https://img.shields.io/codacy/grade/63bd2bd65585447a9f6d7ad4e7d82a35?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.UCIS) [![Codacy - Coverage](https://img.shields.io/codacy/coverage/63bd2bd65585447a9f6d7ad4e7d82a35?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.UCIS) diff --git a/dist/requirements.txt b/dist/requirements.txt index 918a0be9..778498a1 100644 --- a/dist/requirements.txt +++ b/dist/requirements.txt @@ -1,2 +1,2 @@ wheel ~= 0.45 -twine ~= 5.1 +twine ~= 6.1 diff --git a/doc/DocCoverage.rst b/doc/DocCoverage.rst new file mode 100644 index 00000000..c1e75266 --- /dev/null +++ b/doc/DocCoverage.rst @@ -0,0 +1,7 @@ +Documentation Coverage +###################### + +Documentation coverage generated by `docstr-coverage `__. + +.. report:doc-coverage:: + :packageid: src 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/coverage/index.rst b/doc/coverage/index.rst index 80bbad2e..bad51b90 100644 --- a/doc/coverage/index.rst +++ b/doc/coverage/index.rst @@ -1,4 +1,7 @@ -Coverage Report -############### +Code Coverage Report +#################### -*Placeholder for the Coverage report generated with* ``pytest`` *and* ``coverage``. +Code coverage report generated with `pytest `__ and `Coverage.py `__. + +.. report:code-coverage:: + :packageid: 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 9572d9ae..71c119f4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -104,10 +104,10 @@ News Contributors ************ -* `Patrick Lehmann `__ (Maintainer) +* :gh:`Patrick Lehmann ` (Maintainer) * `Artur Porebski (Aldec Inc.) `__ * `Michal Pacula (Aldec Inc.) `__ -* `Unai Martinez-Corral `__ +* :gh:`Unai Martinez-Corral ` * `and more... `__ @@ -151,14 +151,19 @@ License .. raw:: latex - \part{References} + \part{References and Reports} .. toctree:: - :caption: References + :caption: References and Reports :hidden: - CommandLineInterface - pyEDAA.UCIS/index + Python Class Reference + unittests/index + coverage/index + Doc. Coverage Report + Static Type Check Report ➚ + +.. Coverage Report ➚ .. raw:: latex @@ -168,12 +173,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 40fc7e6c..00000000 --- a/doc/py-modindex.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. This file is a placeholder and will be replaced - -Python Module Index -################### diff --git a/doc/requirements.txt b/doc/requirements.txt index 2d35335e..ea64b684 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,19 +1,17 @@ -r ../requirements.txt # 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.0 +sphinx_rtd_theme ~= 3.0 # Sphinx Extenstions sphinxcontrib-mermaid ~= 1.0 autoapi >= 2.0.1 sphinx_design ~= 0.6.1 sphinx-copybutton >= 0.5.2 -sphinx_autodoc_typehints ~= 2.5 +sphinx_autodoc_typehints ~= 3.1 sphinx_reports ~= 0.7 - -# BuildTheDocs Extensions (mostly patched Sphinx extensions) diff --git a/doc/shields.inc b/doc/shields.inc index 5fc07a50..48d84053 100644 --- a/doc/shields.inc +++ b/doc/shields.inc @@ -64,11 +64,11 @@ :target: https://GitHub.com/edaa-org/pyEDAA.UCIS/network/dependents .. # GHA test and coverage -.. |SHIELD:svg:UCIS-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.UCIS/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF +.. |SHIELD:svg:UCIS-gha-test| image:: https://img.shields.io/github/actions/workflow/status/edaa-org/pyEDAA.UCIS/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.UCIS/actions/workflows/Pipeline.yml -.. |SHIELD:png:UCIS-gha-test| image:: https://raster.shields.io/github/workflow/status/edaa-org/pyEDAA.UCIS/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF +.. |SHIELD:png:UCIS-gha-test| image:: https://raster.shields.io/github/actions/workflow/status/edaa-org/pyEDAA.UCIS/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.UCIS/actions/workflows/Pipeline.yml diff --git a/doc/unittests/index.rst b/doc/unittests/index.rst new file mode 100644 index 00000000..8b840ee6 --- /dev/null +++ b/doc/unittests/index.rst @@ -0,0 +1,7 @@ +Unittest Summary Report +####################### + +Unittest report generated with `pytest `__. + +.. report:unittest-summary:: + :reportid: src diff --git a/pyEDAA/UCIS/CLI/__init__.py b/pyEDAA/UCIS/CLI/__init__.py index d802520d..00a47458 100644 --- a/pyEDAA/UCIS/CLI/__init__.py +++ b/pyEDAA/UCIS/CLI/__init__.py @@ -13,7 +13,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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/UCIS/Cobertura.py b/pyEDAA/UCIS/Cobertura.py index ea026ba1..6d3e0a7e 100644 --- a/pyEDAA/UCIS/Cobertura.py +++ b/pyEDAA/UCIS/Cobertura.py @@ -12,7 +12,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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/UCIS/UCDB.py b/pyEDAA/UCIS/UCDB.py index c3ba0eee..43d44f8b 100644 --- a/pyEDAA/UCIS/UCDB.py +++ b/pyEDAA/UCIS/UCDB.py @@ -12,7 +12,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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/UCIS/__init__.py b/pyEDAA/UCIS/__init__.py index efdec206..373ffa74 100644 --- a/pyEDAA/UCIS/__init__.py +++ b/pyEDAA/UCIS/__init__.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -31,7 +31,7 @@ """The Unified Coverage Interoperability Standard (UCIS) layer of EDA² offers a data model for reading UCDB files.""" __author__ = "Patrick Lehmann" __email__ = "Paebbels@gmail.com" -__copyright__ = "2021-2024, Electronic Design Automation Abstraction (EDA²)" +__copyright__ = "2021-2025, Electronic Design Automation Abstraction (EDA²)" __license__ = "Apache License, Version 2.0" __version__ = "0.3.0" __keywords__ = ["UCIS", "UCDB", "coverage", "Cobertura", "xml"] diff --git a/pyproject.toml b/pyproject.toml index 6de7f967..1b21eeb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [build-system] requires = [ - "setuptools ~= 75.3", + "setuptools ~= 75.8", "wheel ~= 0.45", - "pyTooling ~= 8.0" + "pyTooling ~= 8.1" ] build-backend = "setuptools.build_meta" @@ -20,6 +20,9 @@ show_error_codes = true namespace_packages = true html_report = "report/typing" +[tool.pytest] +junit_xml = "report/unit/TestReportSummary.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 2ac890ef..bd0918f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -pyTooling ~= 8.0 +pyTooling ~= 8.1 lxml ~= 5.3 diff --git a/setup.py b/setup.py index 286ee9a7..745de768 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -29,24 +29,29 @@ # ==================================================================================================================== # # """Package installer for 'Tools to extract and convert data from UCDB files'.""" +from setuptools import setup + from pathlib import Path -from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub +from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub, DEFAULT_CLASSIFIERS gitHubNamespace = "pyEDAA" packageName = "pyEDAA.UCIS" packageDirectory = packageName.replace(".", "/") packageInformationFile = Path(f"{packageDirectory}/__init__.py") -DescribePythonPackageHostedOnGitHub( +setup(**DescribePythonPackageHostedOnGitHub( packageName=packageName, description="Tools to extract and convert data from UCDB files.", gitHubNamespace=gitHubNamespace, sourceFileWithVersion=packageInformationFile, developmentStatus="stable", - classifiers=[ + classifiers=list(DEFAULT_CLASSIFIERS) + [ "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", ], + dataFiles={ + packageName: ["py.typed"] + }, consoleScripts={ "pyedaa-ucis": "pyEDAA.UCIS.CLI:main" } -) +)) diff --git a/tests/requirements.txt b/tests/requirements.txt index 4960a9f5..6cb40f5c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,7 +8,7 @@ pytest ~= 8.3 pytest-cov ~= 6.0 # Static Type Checking -mypy ~= 1.13 +mypy ~= 1.15 typing_extensions ~= 4.12 lxml ~= 5.3 diff --git a/tests/unit/CLI.py b/tests/unit/CLI.py index 3642856b..95d84d56 100644 --- a/tests/unit/CLI.py +++ b/tests/unit/CLI.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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/UCDB.py b/tests/unit/UCDB.py index a842a1cd..90bc5622 100644 --- a/tests/unit/UCDB.py +++ b/tests/unit/UCDB.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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 4f3e36fc..85e934ce 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2021-2024 Electronic Design Automation Abstraction (EDA²) # +# Copyright 2021-2025 Electronic Design Automation Abstraction (EDA²) # # # # 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/requirements.txt b/tests/unit/requirements.txt new file mode 100644 index 00000000..3c8d7e78 --- /dev/null +++ b/tests/unit/requirements.txt @@ -0,0 +1 @@ +-r ../requirements.txt