From 6a204111f499281e8a4b59b3d707a57fb96bc525 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 20 Nov 2024 23:46:41 +0100 Subject: [PATCH] General updates 2. --- .github/workflows/Pipeline.yml | 125 +------- .gitignore | 12 +- README.md | 2 +- doc/Dependency.rst | 247 ++++++++++++++++ doc/Doc-License.rst | 353 +++++++++++++++++++++++ doc/DocCoverage.rst | 7 + doc/Glossary.rst | 10 + doc/Installation.rst | 486 ++++++++++++++++++++++++++++++++ doc/License.rst | 140 +++++++++ doc/TODO.rst | 4 + doc/conf.py | 218 +++++++++++--- doc/coverage/index.rst | 9 +- doc/genindex.rst | 4 - doc/index.rst | 28 +- doc/py-modindex.rst | 4 - doc/requirements.txt | 2 - doc/unittests/index.rst | 7 + pyEDAA/OutputFilter/__init__.py | 47 ++- pyproject.toml | 2 +- setup.py | 150 ++++------ tests/unit/__init__.py | 39 +++ tests/unit/requirements.txt | 1 + 22 files changed, 1618 insertions(+), 279 deletions(-) create mode 100644 doc/Dependency.rst create mode 100644 doc/Doc-License.rst create mode 100644 doc/DocCoverage.rst create mode 100644 doc/Glossary.rst create mode 100644 doc/Installation.rst create mode 100644 doc/License.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/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index f9f699a..5d911fa 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -4,124 +4,15 @@ on: push: workflow_dispatch: schedule: - - cron: '0 0 * * 5' +# Every Friday at 22:00 - rerun pipeline to check for dependency-based issues + - cron: '0 22 * * 5' jobs: - - Params: - uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev - with: - name: pyEDAA.OutputFilter - python_version_list: "3.6 3.7 3.8 3.9 3.10" - - UnitTesting: - uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev - needs: - - Params + Pipeline: + uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r2 with: - jobs: ${{ needs.Params.outputs.python_jobs }} - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }} - - Coverage: - uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev - needs: - - Params - with: - python_version: ${{ needs.Params.outputs.python_version }} - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} + package_namespace: pyEDAA + package_name: OutputFilter secrets: - codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} - - StaticTypeCheck: - uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev - needs: - - Params - with: - python_version: ${{ needs.Params.outputs.python_version }} - requirements: '-r tests/requirements.txt' - commands: | - cd pyEDAA - mypy --html-report ../htmlmypy -p CLITool - html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} - - PublishTestResults: - uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev - needs: - - UnitTesting - - Package: - uses: pyTooling/Actions/.github/workflows/Package.yml@dev - needs: - - Params - - Coverage - with: - python_version: ${{ needs.Params.outputs.python_version }} - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} - - Release: - uses: pyTooling/Actions/.github/workflows/Release.yml@dev - if: startsWith(github.ref, 'refs/tags') - needs: - - UnitTesting - - Coverage - - StaticTypeCheck - - Package - - PublishOnPyPI: - uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev - if: startsWith(github.ref, 'refs/tags') - needs: - - Params - - Release - - Package - with: - python_version: ${{ needs.Params.outputs.python_version }} - requirements: -r dist/requirements.txt - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - -# VerifyDocs: -# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev -# needs: -# - Params -# with: -# python_version: ${{ needs.Params.outputs.python_version }} - - BuildTheDocs: - uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev - needs: - - Params - #- VerifyDocs - with: - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} - - PublishToGitHubPages: - uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev - needs: - - Params - - BuildTheDocs - - Coverage - - StaticTypeCheck - with: - doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} - coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} - typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} - - ArtifactCleanUp: - uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev - needs: - - Params - - UnitTesting - - Coverage - - StaticTypeCheck - - BuildTheDocs - - PublishToGitHubPages - - PublishTestResults - with: - package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }} - remaining: | - ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-* - ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} - ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} - ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} diff --git a/.gitignore b/.gitignore index 181440a..64274e7 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.OutputFilter/**/*.* !/doc/pyEDAA.OutputFilter/index.rst -# PyCharm project +# PyCharm project files /.idea/workspace.xml + +# Git files +!.git* diff --git a/README.md b/README.md index 1615494..b24bc60 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ # Main Goals -* Read text outputs from CLI of EDA tools. +* Analyze text outputs from CLI of EDA tools. * Filter and categorize by severity (*info*, *warning*, *error*, *fatal*, ...). * Extract information from e.g. OSVVM logs, VUnit logs, ... diff --git a/doc/Dependency.rst b/doc/Dependency.rst new file mode 100644 index 0000000..1662988 --- /dev/null +++ b/doc/Dependency.rst @@ -0,0 +1,247 @@ +.. _DEP: + +Dependencies +############ + +.. |img-OutputFilter-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pyEDAA.OutputFilter + :alt: Libraries.io status for latest release + :height: 22 + :target: https://libraries.io/github/edaa-org/pyEDAA.OutputFilter +.. |img-OutputFilter-vul-status| image:: https://img.shields.io/snyk/vulnerabilities/github/edaa-org/pyEDAA.OutputFilter + :alt: Snyk Vulnerabilities for GitHub Repo + :height: 22 + :target: https://img.shields.io/snyk/vulnerabilities/github/edaa-org/pyEDAA.OutputFilter + ++------------------------------------------+------------------------------------------+ +| `Libraries.io `_ | Vulnerabilities Summary | ++==========================================+==========================================+ +| |img-OutputFilter-lib-status| | |img-OutputFilter-vul-status| | ++------------------------------------------+------------------------------------------+ + +.. _DEP/package: + +pyEDAA.OutputFilter 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 + + +.. rubric:: Dependency List + ++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++=======================================================================================+=============+==========================================================================================================+=============================================================================================================================================================+ +| `pyTooling `__ | ≥8.0 | `Apache License, 2.0 `__ | *None* | ++---------------------------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + +.. _DEP/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. + + +.. rubric:: Manually Installing Test Requirements + +Use the :file:`tests/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively install +the mandatory dependencies too. + +.. tab-set:: + + .. tab-item:: Linux/macOS + :sync: Linux + + .. code-block:: bash + + 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-cov `__ | ≥6.0 | `MIT `__ | *Not yet evaluated.* | ++---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `Coverage `__ | ≥7.6 | `Apache License, 2.0 `__ | *Not yet evaluated.* | ++---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `mypy `__ | ≥1.13 | `MIT `__ | *Not yet evaluated.* | ++---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `typing-extensions `__ | ≥4.12 | `PSF-2.0 `__ | *Not yet evaluated.* | ++---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `lxml `__ | ≥5.3 | `BSD 3-Clause `__ | *Not yet evaluated.* | ++---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ + + + +.. _DEP/documentation: + +Sphinx Documentation (Optional) +******************************* + +Additional Python packages needed for documentation generation. These packages are only needed for developers or on a +CI server, thus sub-dependencies are not evaluated further. + + +.. rubric:: Manually Installing Documentation Requirements + +Use the :file:`doc/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively install +the mandatory dependencies too. + +.. tab-set:: + + .. tab-item:: Linux/macOS + :sync: Linux + + .. 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 + ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++=================================================================================================+==============+==========================================================================================================+======================================================================================================================================================+ +| `pyTooling `__ | ≥8.0 | `Apache License, 2.0 `__ | *None* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `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_design `__ | ≥0.6 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `sphinx-copybutton `__ | ≥0.5.2 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `sphinx_autodoc_typehints `__ | ≥2.5 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `ruamel.yaml `__ | ≥0.18 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _DEP/packaging: + +Packaging (Optional) +******************** + +Additional Python packages needed for installation package generation. These packages are only needed for developers or +on a CI server, thus sub-dependencies are not evaluated further. + + +.. rubric:: Manually Installing Packaging Requirements + +Use the :file:`build/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively +install the mandatory dependencies too. + +.. tab-set:: + + .. tab-item:: Linux/macOS + :sync: Linux + + .. 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 + ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++============================================================================+==============+==========================================================================================================+======================================================================================================================================================+ +| `pyTooling `__ | ≥8.0 | `Apache License, 2.0 `__ | *None* | ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `wheel `__ | ≥0.45 | `MIT `__ | *Not yet evaluated.* | ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + + +.. _DEP/publishing: + +Publishing (CI-Server only) +*************************** + +Additional Python packages needed for publishing the generated installation package to e.g, PyPI or any equivalent +services. These packages are only needed for maintainers or on a CI server, thus sub-dependencies are not evaluated +further. + + +.. rubric:: Manually Installing Publishing Requirements + +Use the :file:`dist/requirements.txt` file to install all dependencies via ``pip3``. The file will recursively +install the mandatory dependencies too. + +.. 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 + + +.. rubric:: Dependency List + ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++==========================================================+==============+===========================================================================================+======================+ +| `wheel `__ | ≥0.45 | `MIT `__ | *Not yet evaluated.* | ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ +| `Twine `__ | ≥5.1 | `Apache License, 2.0 `__ | *Not yet evaluated.* | ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ diff --git a/doc/Doc-License.rst b/doc/Doc-License.rst new file mode 100644 index 0000000..1258fbc --- /dev/null +++ b/doc/Doc-License.rst @@ -0,0 +1,353 @@ +.. _DOCLICENSE: + +.. Note:: This is a local copy of the `Creative Commons - Attribution 4.0 International (CC BY 4.0) `__. + +.. Attention:: This **CC BY 4.0** license applies only to the **documentation** of this project. + + +Creative Commons Attribution 4.0 International +############################################## + +Creative Commons Corporation (“Creative Commons”) is not a law firm and does not +provide legal services or legal advice. Distribution of Creative Commons public +licenses does not create a lawyer-client or other relationship. Creative Commons +makes its licenses and related information available on an “as-is” basis. +Creative Commons gives no warranties regarding its licenses, any material +licensed under their terms and conditions, or any related information. Creative +Commons disclaims all liability for damages resulting from their use to the +fullest extent possible. + +.. topic:: Using Creative Commons Public Licenses + + Creative Commons public licenses provide a standard set of terms and conditions + that creators and other rights holders may use to share original works of + authorship and other material subject to copyright and certain other rights + specified in the public license below. The following considerations are for + informational purposes only, are not exhaustive, and do not form part of our + licenses. + + * **Considerations for licensors:** Our public licenses are intended for use + by those authorized to give the public permission to use material in ways + otherwise restricted by copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms and conditions + of the license they choose before applying it. Licensors should also secure + all rights necessary before applying our licenses so that the public can reuse + the material as expected. Licensors should clearly mark any material not + subject to the license. This includes other CC-licensed material, or material + used under an exception or limitation to copyright. + `More considerations for licensors `__. + + * **Considerations for the public:** By using one of our public licenses, a + licensor grants the public permission to use the licensed material under + specified terms and conditions. If the licensor’s permission is not necessary + for any reason–for example, because of any applicable exception or limitation + to copyright–then that use is not regulated by the license. Our licenses grant + only permissions under copyright and certain other rights that a licensor has + authority to grant. Use of the licensed material may still be restricted for + other reasons, including because others have copyright or other rights in the + material. A licensor may make special requests, such as asking that all + changes be marked or described. Although not required by our licenses, you are + encouraged to respect those requests where reasonable. + `More considerations for the public `__. + +:xlarge:`Creative Commons Attribution 4.0 International Public License` + +By exercising the Licensed Rights (defined below), You accept and agree to be +bound by the terms and conditions of this Creative Commons Attribution 4.0 +International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. +======================== + +a. **Adapted Material** means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material and in + which the Licensed Material is translated, altered, arranged, transformed, or + otherwise modified in a manner requiring permission under the Copyright and + Similar Rights held by the Licensor. For purposes of this Public License, + where the Licensed Material is a musical work, performance, or sound + recording, Adapted Material is always produced where the Licensed Material + is synched in timed relation with a moving image. + +b. **Adapter's License** means the license You apply to Your Copyright and + Similar Rights in Your contributions to Adapted Material in accordance with + the terms and conditions of this Public License. + +c. **Copyright and Similar Rights** means copyright and/or similar rights + closely related to copyright including, without limitation, performance, + broadcast, sound recording, and Sui Generis Database Rights, without regard + to how the rights are labeled or categorized. For purposes of this Public + License, the rights specified in Section 2(b)(1)-(2) are not Copyright and + Similar Rights. + +d. **Effective Technological Measures** means those measures that, in the + absence of proper authority, may not be circumvented under laws fulfilling + obligations under Article 11 of the WIPO Copyright Treaty adopted on + December 20, 1996, and/or similar international agreements. + +e. **Exceptions and Limitations** means fair use, fair dealing, and/or any + other exception or limitation to Copyright and Similar Rights that applies to + Your use of the Licensed Material. + +f. **Licensed Material** means the artistic or literary work, database, or + other material to which the Licensor applied this Public License. + +g. **Licensed Rights** means the rights granted to You subject to the terms + and conditions of this Public License, which are limited to all Copyright and + Similar Rights that apply to Your use of the Licensed Material and that the + Licensor has authority to license. + +h. **Licensor** means the individual(s) or entity(ies) granting rights under + this Public License. + +i. **Share** means to provide material to the public by any means or process + that requires permission under the Licensed Rights, such as reproduction, + public display, public performance, distribution, dissemination, + communication, or importation, and to make material available to the public + including in ways that members of the public may access the material from a + place and at a time individually chosen by them. + +j. **Sui Generis Database Rights** means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of the + Council of 11 March 1996 on the legal protection of databases, as amended + and/or succeeded, as well as other essentially equivalent rights anywhere + in the world. + +k. **You** means the individual or entity exercising the Licensed Rights + under this Public License. **Your** has a corresponding meaning. + +Section 2 – Scope. +================== + +a. **License grant.** + + 1. Subject to the terms and conditions of this Public License, the Licensor + hereby grants You a worldwide, royalty-free, non-sublicensable, + non-exclusive, irrevocable license to exercise the Licensed Rights in the + Licensed Material to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + + 2. :underline:`Exceptions and Limitations.` For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public License does not + apply, and You do not need to comply with its terms and conditions. + + 3. :underline:`Term.` The term of this Public License is specified in Section 6(a). + + 4. :underline:`Media and formats`; :underline:`technical modifications allowed.` The Licensor + authorizes You to exercise the Licensed Rights in all media and formats + whether now known or hereafter created, and to make technical + modifications necessary to do so. The Licensor waives and/or agrees not to + assert any right or authority to forbid You from making technical + modifications necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective Technological + Measures. For purposes of this Public License, simply making modifications + authorized by this Section 2(a)(4) never produces Adapted Material. + + 5. :underline:`Downstream recipients.` + + A. :underline:`Offer from the Licensor – Licensed Material.` Every recipient of + the Licensed Material automatically receives an offer from the + Licensor to exercise the Licensed Rights under the terms and + conditions of this Public License. + + B. :underline:`No downstream restrictions.` You may not offer or impose any + additional or different terms or conditions on, or apply any Effective + Technological Measures to, the Licensed Material if doing so restricts + exercise of the Licensed Rights by any recipient of the Licensed + Material. + + 6. :underline:`No endorsement.` Nothing in this Public License constitutes or may + be construed as permission to assert or imply that You are, or that Your + use of the Licensed Material is, connected with, or sponsored, endorsed, + or granted official status by, the Licensor or others designated to + receive attribution as provided in Section 3(a)(1)(A)(i). + +b. **Other rights.** + + 1. Moral rights, such as the right of integrity, are not licensed under this + Public License, nor are publicity, privacy, and/or other similar + personality rights; however, to the extent possible, the Licensor waives + and/or agrees not to assert any such rights held by the Licensor to the + limited extent necessary to allow You to exercise the Licensed Rights, but + not otherwise. + + 2. Patent and trademark rights are not licensed under this Public License. + + 3. To the extent possible, the Licensor waives any right to collect royalties + from You for the exercise of the Licensed Rights, whether directly or + through a collecting society under any voluntary or waivable statutory or + compulsory licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + +Section 3 – License Conditions. +=============================== + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +a. **Attribution.** + + 1. If You Share the Licensed Material (including in modified form), You must: + + A. retain the following if it is supplied by the Licensor with the + Licensed Material: + + i. identification of the creator(s) of the Licensed Material and any + others designated to receive attribution, in any reasonable manner + requested by the Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + + v. a URI or hyperlink to the Licensed Material to the extent reasonably + practicable; + + B. indicate if You modified the Licensed Material and retain an + indication of any previous modifications; and + + C. indicate the Licensed Material is licensed under this Public License, + and include the text of, or the URI or hyperlink to, this Public + License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner + based on the medium, means, and context in which You Share the Licensed + Material. For example, it may be reasonable to satisfy the conditions by + providing a URI or hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the information + required by Section 3(a)(1)(A) to the extent reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's License You apply + must not prevent recipients of the Adapted Material from complying with + this Public License. + +Section 4 – Sui Generis Database Rights. +======================================== + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your +use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, + reuse, reproduce, and Share all or a substantial portion of the contents of + the database; + +b. if You include all or a substantial portion of the database contents in a + database in which You have Sui Generis Database Rights, then the database + in which You have Sui Generis Database Rights (but not its individual + contents) is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or a + substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. +================================================================= + +a. **Unless otherwise separately undertaken by the Licensor, to the extent + possible, the Licensor offers the Licensed Material as-is and as-available, + and makes no representations or warranties of any kind concerning the + Licensed Material, whether express, implied, statutory, or other. This + includes, without limitation, warranties of title, merchantability, + fitness for a particular purpose, non-infringement, absence of latent or + other defects, accuracy, or the presence or absence of errors, whether or + not known or discoverable. Where disclaimers of warranties are not allowed + in full or in part, this disclaimer may not apply to You.** + +b. **To the extent possible, in no event will the Licensor be liable to You + on any legal theory (including, without limitation, negligence) or + otherwise for any direct, special, indirect, incidental, consequential, + punitive, exemplary, or other losses, costs, expenses, or damages arising + out of this Public License or use of the Licensed Material, even if the + Licensor has been advised of the possibility of such losses, costs, expenses, + or damages. Where a limitation of liability is not allowed in full or in + part, this limitation may not apply to You.** + +c. The disclaimer of warranties and limitation of liability provided above + shall be interpreted in a manner that, to the extent possible, most + closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. +================================= + +a. This Public License applies for the term of the Copyright and Similar Rights + licensed here. However, if You fail to comply with this Public License, then + Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided it is cured + within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any right the + Licensor may have to seek remedies for Your violations of this Public License. + +c. For the avoidance of doubt, the Licensor may also offer the Licensed Material + under separate terms or conditions or stop distributing the Licensed Material + at any time; however, doing so will not terminate this Public License. + +d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. +======================================= + +a. The Licensor shall not be bound by any additional or different terms or + conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed + Material not stated herein are separate from and independent of the terms + and conditions of this Public License. + +Section 8 – Interpretation. +=========================== + +a. For the avoidance of doubt, this Public License does not, and shall not be + interpreted to, reduce, limit, restrict, or impose conditions on any use of + the Licensed Material that could lawfully be made without permission under + this Public License. + +b. To the extent possible, if any provision of this Public License is deemed + unenforceable, it shall be automatically reformed to the minimum extent + necessary to make it enforceable. If the provision cannot be reformed, it + shall be severed from this Public License without affecting the + enforceability of the remaining terms and conditions. + +c. No term or condition of this Public License will be waived and no failure to + comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a + limitation upon, or waiver of, any privileges and immunities that apply to + the Licensor or You, including from the legal processes of any jurisdiction + or authority. + +------------------ + +Creative Commons is not a party to its public licenses. Notwithstanding, +Creative Commons may elect to apply one of its public licenses to material it +publishes and in those instances will be considered the “Licensor.” Except for +the limited purpose of indicating that material is shared under a Creative +Commons public license or as otherwise permitted by the Creative Commons +policies published at `creativecommons.org/policies `__, +Creative Commons does not authorize the use of the trademark “Creative Commons” +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For the +avoidance of doubt, this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at `creativecommons.org `__ diff --git a/doc/DocCoverage.rst b/doc/DocCoverage.rst new file mode 100644 index 0000000..c1e7526 --- /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/Glossary.rst b/doc/Glossary.rst new file mode 100644 index 0000000..21f0fb3 --- /dev/null +++ b/doc/Glossary.rst @@ -0,0 +1,10 @@ +Glossary +######## + +.. glossary:: + + Quartus + tbd + + Vivado + tbd diff --git a/doc/Installation.rst b/doc/Installation.rst new file mode 100644 index 0000000..16e6b96 --- /dev/null +++ b/doc/Installation.rst @@ -0,0 +1,486 @@ +.. |PackageName| replace:: pyEDAA.OutputFilter + +.. _INSTALL: + +Installation/Updates +#################### + +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.OutputFilter package + pip3 install pyEDAA.OutputFilter + + # Alternatively + python3 -m pip install pyEDAA.OutputFilter + + .. tab-item:: With Documentation Dependencies + :sync: Doc + + .. code-block:: bash + + # Install with dependencies to generate documentation + pip3 install pyEDAA.OutputFilter[doc] + + # Alternatively + python3 -m pip install pyEDAA.OutputFilter[doc] + + .. tab-item:: With Unit Testing Dependencies + :sync: Unit + + .. code-block:: bash + + # Install with dependencies to run unit tests + pip3 install pyEDAA.OutputFilter[test] + + # Alternatively + python3 -m pip install pyEDAA.OutputFilter[test] + + .. tab-item:: All Developer Dependencies + :sync: All + + .. code-block:: bash + + # Install with all developer dependencies + pip3 install pyEDAA.OutputFilter[all] + + # Alternatively + python3 -m pip install pyEDAA.OutputFilter[all] + + .. tab-item:: Windows + :sync: Windows + + .. tab-set:: + + .. tab-item:: Minimal installation + :sync: Minimal + + .. code-block:: powershell + + # Basic pyEDAA.OutputFilter package + pip install pyEDAA.OutputFilter + + # Alternatively + py -m pip install pyEDAA.OutputFilter + + .. tab-item:: With Documentation Dependencies + :sync: Doc + + .. code-block:: powershell + + # Install with dependencies to generate documentation + pip install pyEDAA.OutputFilter[doc] + + # Alternatively + py -m pip install pyEDAA.OutputFilter[doc] + + .. tab-item:: With Unit Testing Dependencies + :sync: Unit + + .. code-block:: powershell + + # Install with dependencies to run unit tests + pip install pyEDAA.OutputFilter[test] + + # Alternatively + py -m pip install pyEDAA.OutputFilter[test] + + .. tab-item:: All Developer Dependencies + :sync: All + + .. code-block:: powershell + + # Install with all developer dependencies + pip install pyEDAA.OutputFilter[all] + + # Alternatively + py -m pip install pyEDAA.OutputFilter[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.OutputFilter ~= 0.3 + + +.. _INSTALL/pip/update: + +Updating from PyPI using PIP +============================ + +.. tab-set:: + + .. tab-item:: Linux/macOS + :sync: Linux + + .. code-block:: bash + + # Update pyEDAA.OutputFilter + pip3 install -U pyEDAA.OutputFilter + + # Alternatively + python3 -m pip install -U pyEDAA.OutputFilter + + .. tab-item:: Windows + :sync: Windows + + .. code-block:: powershell + + # Update pyEDAA.OutputFilter + pip install -U pyEDAA.OutputFilter + + # Alternatively + py -m pip install -U pyEDAA.OutputFilter + + +.. _INSTALL/pip/uninstall: + +Uninstallation using PIP +======================== + +.. tab-set:: + + .. tab-item:: Linux/macOS + :sync: Linux + + .. code-block:: bash + + # Uninstall pyEDAA.OutputFilter + pip3 uninstall pyEDAA.OutputFilter + + # Alternatively + python3 -m pip uninstall pyEDAA.OutputFilter + + .. tab-item:: Windows + :sync: Windows + + .. code-block:: powershell + + # Uninstall pyEDAA.OutputFilter + pip uninstall pyEDAA.OutputFilter + + # Alternatively + py -m pip uninstall pyEDAA.OutputFilter + + +.. _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 + + # 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:: bash + + 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 + + .. tab-item:: Windows + :sync: Windows + + .. tab-set:: + + .. 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.OutputFilter + + .. tab-item:: Windows + :sync: Windows + + .. code-block:: powershell + + cd + + # Running type checking using mypy + $env:MYPY_FORCE_COLOR = 1 + mypy -p pyEDAA.OutputFilter + + +.. _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.OutputFilter + + # Install from wheel + python3 -m pip install ./dist/pyEDAA.OutputFilter-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.OutputFilter + + # Install from wheel + py -m pip install .\dist\pyEDAA.OutputFilter-0.3.0-py3-none-any.whl + +.. note:: + + 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/License.rst b/doc/License.rst new file mode 100644 index 0000000..fba66a2 --- /dev/null +++ b/doc/License.rst @@ -0,0 +1,140 @@ +.. _SRCLICENSE: + +.. Note:: This is a local copy of the `Apache License Version 2.0 `__. + +.. Attention:: This **Apache License, 2.0** applies to all **source and configuration files of project**, **except documentation**. + +Apache License 2.0 +################## + +Version 2.0, January 2004 + +:xlarge:`TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION` + + +1. Definitions. +=============== +**"License"** shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +**"Licensor"** shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +**"Legal Entity"** shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that +entity. For the purposes of this definition, **"control"** means (i) the power, direct or indirect, to cause the direction or management of such entity, whether +by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +**"You"** (or **"Your"**) shall mean an individual or Legal Entity exercising permissions granted by this License. + +**"Source"** form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and +configuration files. + +**"Object"** form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + +**"Work"** shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix below). + +**"Derivative Works"** shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +**"Contribution"** shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative +Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to +submit on behalf of the copyright owner. For the purposes of this definition, **"submitted"** means any form of electronic, verbal, or written communication +sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is +conspicuously marked or otherwise designated in writing by the copyright owner as **"Not a Contribution."** + +**"Contributor"** shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. +============================== +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. +=========================== +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of +their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim +or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then +any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. +================== +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +* You must give any other recipients of the Work or Derivative Works a copy of this License; and +* You must cause any modified files to carry prominent notices stating that You changed the files; and +* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source + form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +* If the Work includes a **"NOTICE"** text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the + attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the + following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE + file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, + alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise +complies with the conditions stated in this License. + +5. Submission of Contributions. +=============================== +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any +separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. +============== +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable +and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. +========================== +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, +MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and +assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. +=========================== +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or +consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages +for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been +advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. +============================================== +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other +liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +---------------------------------------------------------------------------------------------------------------------------------------------------------------- + +:xlarge:`Appendix: How to apply the Apache License to your work` + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying +information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or +class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +.. code-block:: none + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/doc/TODO.rst b/doc/TODO.rst new file mode 100644 index 0000000..3144da0 --- /dev/null +++ b/doc/TODO.rst @@ -0,0 +1,4 @@ +TODOs +##### + +.. todolist:: diff --git a/doc/conf.py b/doc/conf.py index 915d8b7..f8ecc32 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,51 +1,65 @@ # 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.OutputFilter" +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(".")) +sys_path.insert(0, abspath("..")) +sys_path.insert(0, abspath(f"../{directoryName}")) # ============================================================================== -# Project information +# Project information and versioning # ============================================================================== -project = "pyEDAA.OutputFilter" -copyright = "2021-2024 Patrick Lehmann - Boetzingen, Germany" -author = "Patrick Lehmann" +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +packageInformationFile = Path(f"../{directoryName}/__init__.py") +versionInformation = extractVersionInformation(packageInformationFile) -version = "latest" # The short X.Y version. -release = "latest" # The full version, including alpha/beta/rc tags. +author = versionInformation.Author +copyright = versionInformation.Copyright +version = ".".join(versionInformation.Version.split(".")[:2]) # e.g. 2.3 The short X.Y version. +release = versionInformation.Version # ============================================================================== # 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" # ============================================================================== @@ -64,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.svg") html_favicon = str(Path(html_static_path[0]) / "favicon.svg") # Output file base name for HTML help builder. -htmlhelp_basename = 'pyEDAAOutputFilterDoc' +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 @@ -105,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 % ================================================================================ @@ -137,10 +150,10 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( master_doc, - 'pyEDAA.OutputFilter.tex', - 'The pyEDAA.OutputFilter Documentation', - 'Patrick Lehmann', - 'manual' + f"{project}.tex", + f"The {project} Documentation", + f"Patrick Lehmann", + f"manual" ), ] @@ -149,8 +162,25 @@ # Extensions # ============================================================================== extensions = [ - 'sphinx.ext.extlinks', - 'sphinx.ext.intersphinx', +# 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", +# SphinxContrib extensions + "sphinxcontrib.mermaid", +# Other extensions + "sphinx_design", + "sphinx_copybutton", + "sphinx_autodoc_typehints", + "autoapi.sphinx", + "sphinx_reports", +# User defined extensions ] @@ -158,15 +188,115 @@ # 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), } +# ============================================================================== +# 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_class_signature = "separated" +autodoc_member_order = "bysource" # alphabetical, groupwise, bysource +autodoc_typehints = "both" +#autoclass_content = "both" + + # ============================================================================== # Sphinx.Ext.ExtLinks # ============================================================================== extlinks = { - 'ghissue': ('https://GitHub.com/edaa-org/pyEDAA.OutputFilter/issues/%s', 'issue #%s'), - 'ghpull': ('https://GitHub.com/edaa-org/pyEDAA.OutputFilter/pull/%s', 'pull request #%s'), - 'ghsrc': ('https://GitHub.com/edaa-org/pyEDAA.OutputFilter/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), +} + + +# ============================================================================== +# Sphinx.Ext.Graphviz +# ============================================================================== +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 +# ============================================================================== +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True +todo_link_only = True + + +# ============================================================================== +# sphinx-reports +# ============================================================================== +report_unittest_testsuites = { + "src": { + "name": f"{project}", + "xml_report": "../report/unit/TestReportSummary.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 = { + f"{project}": { + "template": "module", + "output": project, + "override": True + } } diff --git a/doc/coverage/index.rst b/doc/coverage/index.rst index 80bbad2..bad51b9 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 c07da40..0000000 --- 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 9e60c94..1d6f34c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -47,8 +47,8 @@ Proposal to define an abstract model for outputs from EDA tools and logging libr Contributors ************ -* `Patrick Lehmann `__ (Maintainer) -* `Unai Martinez-Corral `__ +* :gh:`Patrick Lehmann ` (Maintainer) +* :gh:`Unai Martinez-Corral ` * `and more... `__ @@ -61,6 +61,22 @@ Contributors Used as a layer of EDA² ➚ +.. raw:: latex + + \part{References and Reports} + +.. toctree:: + :caption: References and Reports + :hidden: + + Python Class Reference + unittests/index + coverage/index + Doc. Coverage Report + Static Type Check Report ➚ + +.. Coverage Report ➚ + .. raw:: latex \part{Appendix} @@ -69,7 +85,9 @@ Contributors :caption: Appendix :hidden: + 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 23167be..0000000 --- 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 2d35335..bfb8bf1 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -15,5 +15,3 @@ sphinx_design ~= 0.6.1 sphinx-copybutton >= 0.5.2 sphinx_autodoc_typehints ~= 2.5 sphinx_reports ~= 0.7 - -# BuildTheDocs Extensions (mostly patched Sphinx extensions) diff --git a/doc/unittests/index.rst b/doc/unittests/index.rst new file mode 100644 index 0000000..8b840ee --- /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/OutputFilter/__init__.py b/pyEDAA/OutputFilter/__init__.py index e141a2a..f3bf417 100644 --- a/pyEDAA/OutputFilter/__init__.py +++ b/pyEDAA/OutputFilter/__init__.py @@ -1,7 +1,50 @@ +# ==================================================================================================================== # +# _____ ____ _ _ ___ _ _ _____ _ _ _ # +# _ __ _ _| ____| _ \ / \ / \ / _ \ _ _| |_ _ __ _ _| |_| ___(_) | |_ ___ _ __ # +# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | __| '_ \| | | | __| |_ | | | __/ _ \ '__| # +# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |_| | |_| | |_| |_) | |_| | |_| _| | | | || __/ | # +# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)___/ \__,_|\__| .__/ \__,_|\__|_| |_|_|\__\___|_| # +# |_| |___/ |_| # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany # +# Copyright 2014-2016 Technische Universitaet Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +"""An abstraction layer of EDA tool output filters.""" +__author__ = "Patrick Lehmann" +__email__ = "Paebbels@gmail.com" +__copyright__ = "2014-2024, Patrick Lehmann" +__license__ = "Apache License, Version 2.0" +__version__ = "0.1.0" +__keywords__ = ["cli", "abstraction layer", "eda", "filter", "classification"] -from pyTooling.Decorators import export -__version__ = "0.1.0" +from pyTooling.Decorators import export +from pyTooling.Exceptions import ExceptionBase + + +@export +class FilterException(ExceptionBase): + pass @export diff --git a/pyproject.toml b/pyproject.toml index a952f0d..26c59ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools ~= 75.3", + "setuptools ~= 75.5", "wheel ~= 0.45", "pyTooling ~= 8.0" ] diff --git a/setup.py b/setup.py index 2ab56a9..1ecaa58 100644 --- a/setup.py +++ b/setup.py @@ -1,97 +1,57 @@ -# ============================================================================= -# _____ ____ _ _ -# _ __ _ _| ____| _ \ / \ / \ -# | '_ \| | | | _| | | | |/ _ \ / _ \ -# | |_) | |_| | |___| |_| / ___ \ / ___ \ -# | .__/ \__, |_____|____/_/ \_\/_/ \_\ -# |_| |___/ -# ============================================================================= -# Authors: Patrick Lehmann +# ==================================================================================================================== # +# _____ ____ _ _ ___ _ _ _____ _ _ _ # +# _ __ _ _| ____| _ \ / \ / \ / _ \ _ _| |_ _ __ _ _| |_| ___(_) | |_ ___ _ __ # +# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | __| '_ \| | | | __| |_ | | | __/ _ \ '__| # +# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |_| | |_| | |_| |_) | |_| | |_| _| | | | || __/ | # +# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)___/ \__,_|\__| .__/ \__,_|\__|_| |_|_|\__\___|_| # +# |_| |___/ |_| # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany # +# Copyright 2014-2016 Technische Universitaet Dresden - Germany, Chair of VLSI-Design, Diagnostics and Architecture # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # # -# Package installer: Post-processing of EDA Tool outputs. -# -# License: -# ============================================================================ -# Copyright 2017-2021 Patrick Lehmann - Boetzingen, Germany -# Copyright 2016-2017 Patrick Lehmann - Dresden, Germany -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============================================================================ -# -from pathlib import Path -from setuptools import setup as setuptools_setup, find_namespace_packages as setuptools_find_namespace_packages - -gitHubNamespace = "edaa-org" -projectName = "OutputFilter" -projectNameWithPrefix = "pyEDAA." + projectName -version = "0.1.0" - -# Read README for upload to PyPI -readmeFile = Path("README.md") -with readmeFile.open("r") as file: - long_description = file.read() - -# Read requirements file and add them to package dependency list -requirementsFile = Path("requirements.txt") -with requirementsFile.open("r") as file: - requirements = [line for line in file.readlines()] - -# Derive URLs -sourceCodeURL = "https://github.com/{namespace}/{projectName}".format(namespace=gitHubNamespace, projectName=projectName) -documentationURL = "https://{namespace}.github.io/{projectName}".format(namespace=gitHubNamespace, projectName=projectName) - -# Assemble all package information -setuptools_setup( - name=projectNameWithPrefix, - version=version, - - author="Patrick Lehmann", - author_email="Paebbels@gmail.com", - # maintainer="Patrick Lehmann", - # maintainer_email="Paebbels@gmail.com", - license='Apache 2.0', - - description="Post-processing of EDA Tool outputs.", - long_description=long_description, - long_description_content_type="text/markdown", - - url=sourceCodeURL, - project_urls={ - 'Documentation': documentationURL, - 'Source Code': sourceCodeURL, - 'Issue Tracker': sourceCodeURL + "/issues" - }, - # download_url="https://github.com/vhdl/pyVHDLModel/tarball/0.1.0", - - packages=setuptools_find_namespace_packages(exclude=["tests", "tests.*",]), - classifiers=[ - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Development Status :: 4 - Beta", -# "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", - "Topic :: Utilities" +"""Package installer for 'Post-processing of EDA Tool outputs'.""" +from pathlib import Path +from setuptools import setup +from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub, DEFAULT_CLASSIFIERS + +gitHubNamespace = "edaa-org" +packageName = "pyEDAA.OutputFilter" +packageDirectory = packageName.replace(".", "/") +packageInformationFile = Path(f"{packageDirectory}/__init__.py") + +setup(**DescribePythonPackageHostedOnGitHub( + packageName=packageName, + description="Post-processing of EDA Tool outputs.", + gitHubNamespace=gitHubNamespace, + keywords="Python3 CLI Output Filter PostProcessing", + sourceFileWithVersion=packageInformationFile, + developmentStatus="alpha", + classifiers=list(DEFAULT_CLASSIFIERS) + [ + "Intended Audience :: Developers", + "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", + "Topic :: Utilities" ], - keywords="Python3 CLI Output Filter PostProcessing", - - python_requires='>=3.6', - install_requires=requirements, -) + dataFiles={ + packageName: ["py.typed"] + } +)) diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e69de29..9964a67 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -0,0 +1,39 @@ +# ==================================================================================================================== # +# _____ ____ _ _ ___ _ _ _____ _ _ _ # +# _ __ _ _| ____| _ \ / \ / \ / _ \ _ _| |_ _ __ _ _| |_| ___(_) | |_ ___ _ __ # +# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | __| '_ \| | | | __| |_ | | | __/ _ \ '__| # +# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |_| | |_| | |_| |_) | |_| | |_| _| | | | || __/ | # +# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)___/ \__,_|\__| .__/ \__,_|\__|_| |_|_|\__\___|_| # +# |_| |___/ |_| # +# ==================================================================================================================== # +# Authors: # +# Patrick Lehmann # +# # +# License: # +# ==================================================================================================================== # +# Copyright 2017-2024 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. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +# SPDX-License-Identifier: Apache-2.0 # +# ==================================================================================================================== # +# +"""Unit tests for ``ghdl`` output filters.""" +from unittest import TestCase + +from pyEDAA.OutputFilter import Filter + + +class CommonOptions(TestCase): + def test_Filter(self) -> None: + _ = Filter() diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt new file mode 100644 index 0000000..3c8d7e7 --- /dev/null +++ b/tests/unit/requirements.txt @@ -0,0 +1 @@ +-r ../requirements.txt