diff --git a/.btd.yml b/.btd.yml index 03528e6b..296c029b 100644 --- a/.btd.yml +++ b/.btd.yml @@ -2,8 +2,8 @@ input: doc output: _build requirements: requirements.txt target: gh-pages -formats: [ html, pdf, man ] +formats: [ html ] images: - base: edaa/doc + base: btdi/sphinx:pytooling latex: btdi/latex -theme: https://codeload.github.com/buildthedocs/sphinx.theme/tar.gz/v1 +theme: https://codeload.GitHub.com/buildthedocs/sphinx.theme/tar.gz/v1 diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index f3dd915f..35b22fe7 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -1,6 +1,8 @@ -name: Unit Testing, Coverage Collection, Package, Release, Documentation and Publish +name: Pipeline -on: [ push ] +on: + push: + workflow_dispatch: defaults: run: @@ -8,443 +10,122 @@ defaults: jobs: - UnitTesting: - name: ${{ matrix.icon }} Unit Tests using Python ${{ matrix.python }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: -# - {python: "3.6", icon: ๐Ÿ”ด} # until 23.12.2021 - - {python: "3.7", icon: ๐ŸŸ } # until 27.06.2023 - - {python: "3.8", icon: ๐ŸŸก} # until Oct. 2024 - - {python: "3.9", icon: ๐ŸŸข} # until Oct. 2025 - - {python: "3.10", icon: ๐ŸŸข} # until Oct. 2026 - - env: - PYTHON: ${{ matrix.python }} - outputs: - python: ${{ env.PYTHON }} - - steps: - - name: โฌ Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: ๐Ÿ”ง Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r tests/requirements.txt + Params: + uses: pyTooling/Actions/.github/workflows/Parameters.yml@r0 + with: + name: pyEDAA.ProjectModel + python_version_list: "3.7 3.8 3.9 3.10" - - name: โ˜‘ Run unit tests - run: | - python -m pytest -rA tests/unit --color=yes + UnitTesting: + uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r0 + needs: + - Params + with: + jobs: ${{ needs.Params.outputs.python_jobs }} + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }} Coverage: - name: ๐Ÿ“ˆ Collect Coverage Data using Python 3.10 - runs-on: ubuntu-latest - - env: - PYTHON: "3.10" - ARTIFACT: pyEDAA-ProjectModel-coverage-html - outputs: - python: ${{ env.PYTHON }} - artifact: ${{ env.ARTIFACT }} - - steps: - - name: โฌ Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ Setup Python ${{ env.PYTHON }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON }} - - - name: ๐Ÿ—‚ Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r tests/requirements.txt - - - name: Collect coverage - continue-on-error: true - run: | - python -m pytest -rA --cov=.. --cov-config=tests/.coveragerc tests/unit --color=yes - - - name: Convert to cobertura format - run: | - coverage xml - - - name: Convert to HTML format - run: | - coverage html - rm htmlcov/.gitignore - - - name: ๐Ÿ“Š Publish coverage at CodeCov - continue-on-error: true - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - flags: unittests - env_vars: PYTHON - - - name: ๐Ÿ“‰ Publish coverage at Codacy - continue-on-error: true - uses: codacy/codacy-coverage-reporter-action@master - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./coverage.xml - - - name: ๐Ÿ“ค Upload 'Coverage Report' artifact - continue-on-error: true - uses: actions/upload-artifact@v2 - with: - name: ${{ env.ARTIFACT }} - path: htmlcov - if-no-files-found: error - retention-days: 1 + uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@r0 + needs: + - Params + with: + python_version: ${{ fromJson(needs.Params.outputs.params).python_version }} + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.coverage }} + secrets: + codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} StaticTypeCheck: - name: ๐Ÿ‘€ Check Static Typing using Python 3.10 - runs-on: ubuntu-latest - - env: - PYTHON: "3.10" - ARTIFACT: pyEDAA-ProjectModel-typing-html - outputs: - python: ${{ env.PYTHON }} - artifact: ${{ env.ARTIFACT }} - - steps: - - name: โฌ Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ Setup Python ${{ env.PYTHON }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON }} - - - name: ๐Ÿ—‚ Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r tests/requirements.txt - - - name: Check Static Typing - continue-on-error: true - run: | - pwd - mypy --html-report htmlmypy -m pyEDAA.ProjectModel - - - name: ๐Ÿ“ค Upload 'Static Typing Report' artifact - continue-on-error: true - uses: actions/upload-artifact@v2 - with: - name: ${{ env.ARTIFACT }} - path: htmlmypy - if-no-files-found: error - retention-days: 1 - - - Release: - name: ๐Ÿ“ Create 'Release Page' on GitHub - runs-on: ubuntu-latest - - if: startsWith(github.ref, 'refs/tags') + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r0 + needs: + - Params + with: + python_version: ${{ fromJson(needs.Params.outputs.params).python_version }} + commands: | + cd pyEDAA + mypy --html-report ../htmlmypy -p ProjectModel + report: 'htmlmypy' + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.typing }} + + PublishTestResults: + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r0 needs: - UnitTesting - - Coverage - - StaticTypeCheck - - env: - PYTHON: ${{ needs.Coverage.outputs.python }} - outputs: - python: ${{ env.PYTHON }} - tag: ${{ steps.getVariables.outputs.gitTag }} - version: ${{ steps.getVariables.outputs.version }} - datetime: ${{ steps.getVariables.outputs.datetime }} - upload_url: ${{ steps.createReleasePage.outputs.upload_url }} - - steps: - - name: ๐Ÿ” Extract Git tag from GITHUB_REF - id: getVariables - run: | - GIT_TAG=${GITHUB_REF#refs/*/} - RELEASE_VERSION=${GIT_TAG#v} - RELEASE_DATETIME="$(date --utc '+%d.%m.%Y - %H:%M:%S')" - # write to step outputs - echo ::set-output name=gitTag::${GIT_TAG} - echo ::set-output name=version::${RELEASE_VERSION} - echo ::set-output name=datetime::${RELEASE_DATETIME} - - - name: ๐Ÿ“‘ Create Release Page - id: createReleasePage - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.getVariables.outputs.gitTag }} -# release_name: ${{ steps.getVariables.outputs.gitTag }} - body: | - **Automated Release created on: ${{ steps.getVariables.outputs.datetime }}** - - # New Features - * tbd - - # Changes - * tbd - - # Bug Fixes - * tbd - draft: false - prerelease: false Package: - name: ๐Ÿ“ฆ Package in Wheel Format - runs-on: ubuntu-latest + uses: pyTooling/Actions/.github/workflows/Package.yml@r0 + needs: + - Params + - Coverage + with: + python_version: ${{ fromJson(needs.Params.outputs.params).python_version }} + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.package }} + Release: + uses: pyTooling/Actions/.github/workflows/Release.yml@r0 if: startsWith(github.ref, 'refs/tags') needs: + - UnitTesting - Coverage - - env: - PYTHON: ${{ needs.Coverage.outputs.python }} - ARTIFACT: pyEDAA-ProjectModel-wheel - outputs: - python: ${{ env.PYTHON }} - artifact: ${{ env.ARTIFACT }} - - steps: - - name: ๐Ÿ“ฅ Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ Setup Python ${{ env.PYTHON }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON }} - - - name: ๐Ÿ”ง Install dependencies for packaging and release - run: | - python -m pip install --upgrade pip - pip install wheel - - - name: ๐Ÿ”จ Build Python package (source distribution) - run: | - python setup.py sdist - - - name: ๐Ÿ”จ Build Python package (binary distribution - wheel) - run: | - python setup.py bdist_wheel - - - name: ๐Ÿ“ค Upload 'pyEDAA.ProjectModel' artifact - uses: actions/upload-artifact@v2 - with: - name: ${{ env.ARTIFACT }} - path: dist/ - if-no-files-found: error - retention-days: 1 + - StaticTypeCheck + - Package PublishOnPyPI: - name: ๐Ÿš€ Publish to PyPI - runs-on: ubuntu-latest - + uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0 if: startsWith(github.ref, 'refs/tags') needs: + - Params - Release - Package - - env: - PYTHON: ${{ needs.Package.outputs.python }} - ARTIFACT: ${{ needs.Package.outputs.artifact }} - outputs: - python: ${{ env.PYTHON }} - artifact: ${{ env.ARTIFACT }} - - steps: - - name: ๐Ÿ“ฅ Download artifacts '${{ env.ARTIFACT }}' from 'Package' job - uses: actions/download-artifact@v2 - with: - name: ${{ env.ARTIFACT }} - path: dist/ - - - name: ๐Ÿ Setup Python ${{ env.PYTHON }} - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON }} - - - name: โš™ Install dependencies for packaging and release - run: | - python -m pip install --upgrade pip - pip install wheel twine - - - name: โคด Release Python package to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: | - twine upload dist/* - - - name: ๐Ÿ—‘๏ธ Delete packaging Artifacts - uses: geekyeggo/delete-artifact@v1 - with: - name: | - ${{ env.ARTIFACT }} + with: + python_version: ${{ fromJson(needs.Params.outputs.params).python_version }} + requirements: -r dist/requirements.txt + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.package }} + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} VerifyDocs: - name: ๐Ÿ‘ Verify example snippets using Python 3.10 - runs-on: ubuntu-latest - - env: - PYTHON: "3.10" - outputs: - python: ${{ env.PYTHON }} - - steps: - - name: โฌ Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON }} - - - name: ๐Ÿ Install dependencies - run: | - pip3 install . - - - name: โœ‚ Extract code snippet from README - shell: python - run: | - from pathlib import Path - import re - - ROOT = Path('.') - - with (ROOT / 'README.md').open('r') as rptr: - content = rptr.read() - - m = re.search(r"```py(thon)?(?P.*?)```", content, re.MULTILINE|re.DOTALL) - - if m is None: - raise Exception("Regular expression did not find the example in the README!") - - with (ROOT / 'tests/docs/example.py').open('w') as wptr: - wptr.write(m["code"]) - - - name: Print example.py - run: cat tests/docs/example.py - - - name: โ˜‘ Run example snippet - working-directory: tests/docs - run: | - python3 example.py + uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r0 + needs: + - Params + with: + python_version: ${{ fromJson(needs.Params.outputs.params).python_version }} BuildTheDocs: - name: ๐Ÿ““ Run BuildTheDocs - runs-on: ubuntu-latest + uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@r0 needs: + - Params - VerifyDocs - - env: - ARTIFACT: pyEDAA-ProjectModel-documentation - outputs: - artifact: ${{ env.ARTIFACT }} - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿšข Build container image 'vhdl/doc' - run: | - docker build -t edaa/doc - <<-EOF - FROM btdi/sphinx:featured - RUN apk add -U --no-cache graphviz - EOF - - - name: ๐Ÿ›ณ๏ธ Build documentation using container edaa/doc - uses: buildthedocs/btd@v0 - with: - skip-deploy: true - - - name: ๐Ÿ“ค Upload 'documentation' artifacts - uses: actions/upload-artifact@master - with: - name: ${{ env.ARTIFACT }} - path: doc/_build/html - retention-days: 7 + with: + artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }} PublishToGitHubPages: - name: ๐Ÿ“š Publish to GH-Pages - runs-on: ubuntu-latest + uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r0 needs: + - Params - BuildTheDocs - Coverage - StaticTypeCheck - - env: - DOC: ${{ needs.BuildTheDocs.outputs.artifact }} - COVERAGE: ${{ needs.Coverage.outputs.artifact }} - TYPING: ${{ needs.StaticTypeCheck.outputs.artifact }} - outputs: - artifact: ${{ env.ARTIFACT }} - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: ๐Ÿ“ฅ Download artifacts '${{ env.DOC }}' from 'BuildTheDocs' job - uses: actions/download-artifact@v2 - with: - name: ${{ env.DOC }} - path: public - - - name: ๐Ÿ“ฅ Download artifacts '${{ env.COVERAGE }}' from 'Coverage' job - uses: actions/download-artifact@v2 - with: - name: ${{ env.COVERAGE }} - path: public/coverage - - - name: ๐Ÿ“ฅ Download artifacts '${{ env.TYPING }}' from 'StaticTypeCheck' job - uses: actions/download-artifact@v2 - with: - name: ${{ env.TYPING }} - path: public/typing - - - name: '๐Ÿ““ Publish site to GitHub Pages' - if: github.event_name != 'pull_request' - run: | - cd public - touch .nojekyll - git init - cp ../.git/config ./.git/config - git add . - git config --local user.email "BuildTheDocs@GitHubActions" - git config --local user.name "GitHub Actions" - git commit -a -m "update ${{ github.sha }}" - git push -u origin +HEAD:gh-pages + with: + doc: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }} + coverage: ${{ fromJson(needs.Params.outputs.params).artifacts.coverage }} + typing: ${{ fromJson(needs.Params.outputs.params).artifacts.typing }} ArtifactCleanUp: - name: ๐Ÿ—‘๏ธ Artifact Cleanup - runs-on: ubuntu-latest + uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0 needs: + - Params + - UnitTesting - Coverage - StaticTypeCheck - BuildTheDocs - PublishToGitHubPages - - env: - COVERAGE: ${{ needs.Coverage.outputs.artifact }} - TYPING: ${{ needs.StaticTypeCheck.outputs.artifact }} - DOC: ${{ needs.BuildTheDocs.outputs.artifact }} - - steps: - - name: ๐Ÿ—‘๏ธ Delete all Artifacts - uses: geekyeggo/delete-artifact@v1 - with: - name: | - ${{ env.COVERAGE }} - ${{ env.TYPING }} - ${{ env.DOC }} + with: + package: ${{ fromJson(needs.Params.outputs.params).artifacts.package }} + remaining: | + ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}-3.7 + ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}-3.8 + ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}-3.9 + ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}-3.10 + ${{ fromJson(needs.Params.outputs.params).artifacts.coverage }} + ${{ fromJson(needs.Params.outputs.params).artifacts.typing }} + ${{ fromJson(needs.Params.outputs.params).artifacts.doc }} diff --git a/.gitignore b/.gitignore index 3cb8138a..7d9e3f23 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,13 @@ __pycache__/ coverage.xml # setuptools -/build -/dist +/build/**/*.* +/dist/**/*.* /*.egg-info +# Dependencies +!requirements.txt + # Sphinx doc/_build/ doc/pyEDAA.ProjectModel/**/*.* diff --git a/.idea/pyEDAA.ProjectModel.iml b/.idea/pyEDAA.ProjectModel.iml index d0876a78..c8149c8d 100644 --- a/.idea/pyEDAA.ProjectModel.iml +++ b/.idea/pyEDAA.ProjectModel.iml @@ -1,7 +1,10 @@ - + + + + diff --git a/README.md b/README.md index 9c722968..81219eef 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,28 @@ -[![Sourcecode on GitHub](https://img.shields.io/badge/edaa--org-pyEDAA.ProjectModel-323131.svg?logo=github&longCache=true)](https://github.com/edaa-org/pyEDAA.ProjectModel) -[![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.ProjectModel?logo=Github&label=code%20license)](LICENSE.md) -[![GitHub tag (latest SemVer incl. pre-release)](https://img.shields.io/github/v/tag/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases)](https://github.com/edaa-org/pyEDAA.ProjectModel/tags) -[![GitHub release (latest SemVer incl. including pre-releases)](https://img.shields.io/github/v/release/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases)](https://github.com/edaa-org/pyEDAA.ProjectModel/releases/latest) -[![GitHub release date](https://img.shields.io/github/release-date/edaa-org/pyEDAA.ProjectModel?logo=GitHub&)](https://github.com/edaa-org/pyEDAA.ProjectModel/releases) -[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish?label=build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/edaa-org/pyEDAA.ProjectModel/actions?query=workflow%3A%22Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish%22) -[![Codacy - Quality](https://img.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?logo=Codacy)](https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel) -[![Codacy - Coverage](https://img.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?logo=Codacy)](https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel) -[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel?logo=Codecov)](https://codecov.io/gh/edaa-org/pyEDAA.ProjectModel) -[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.ProjectModel)](https://libraries.io/github/edaa-org/pyEDAA.ProjectModel/sourcerank) -[![PyPI](https://img.shields.io/pypi/v/pyEDAA.ProjectModel?logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.ProjectModel/) -![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.ProjectModel?logo=PyPI&logoColor=FBE072) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.ProjectModel?logo=PyPI&logoColor=FBE072) -[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel)](https://libraries.io/github/edaa-org/pyEDAA.ProjectModel) -[![Requires.io](https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel)](https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=main) -[![Documentation License](https://img.shields.io/badge/doc%20license-CC--BY%204.0-green)](LICENSE.md) -[![Documentation - Read Now!](https://img.shields.io/badge/doc-read%20now%20%E2%9E%94-blueviolet)](https://edaa-org.github.io/pyEDAA.ProjectModel/) +

+ +

+ +[![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-ProjectModel-ab47bc.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=6a1b9a)](https://GitHub.com/edaa-org/pyEDAA.ProjectModel) +[![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md) +[![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.ProjectModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.ProjectModel%2Findex.html)](https://edaa-org.github.io/pyEDAA.ProjectModel/) +[![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community) +[![PyPI](https://img.shields.io/pypi/v/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.ProjectModel/) +![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.ProjectModel?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.ProjectModel/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml) +[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/edaa-org/pyEDAA.ProjectModel) +[![Codacy - Quality](https://img.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel) +[![Codacy - Coverage](https://img.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel) +[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/edaa-org/pyEDAA.ProjectModel) -# pyEDAA.ProjectModel +# Main Goals This package provides a unified abstract project model for HDL designs and EDA tools. Third-party frameworks can derive own classes and implement additional logic to create @@ -97,22 +99,22 @@ for file in designA.Files(fileType=VHDLSourceFile): # References -- [Paebbels/pyIPCMI: pyIPCMI/Base/Project.py](https://github.com/Paebbels/pyIPCMI/blob/master/pyIPCMI/Base/Project.py) -- [VUnit/vunit: vunit/project.py](https://github.com/VUnit/vunit/blob/master/vunit/project.py) -- [PyFPGA/pyfpga: fpga/project.py](https://github.com/PyFPGA/pyfpga/blob/main/fpga/project.py) -- [olofk/fusesoc: fusesoc/capi2/core.py](https://github.com/olofk/fusesoc/blob/master/fusesoc/capi2/core.py) -- [XedaHQ/xeda: xeda/flows/flow.py](https://github.com/XedaHQ/xeda/blob/master/xeda/flows/flow.py) +- [Paebbels/pyIPCMI: pyIPCMI/Base/Project.py](https://GitHub.com/Paebbels/pyIPCMI/blob/master/pyIPCMI/Base/Project.py) +- [VUnit/vunit: vunit/project.py](https://GitHub.com/VUnit/vunit/blob/master/vunit/project.py) +- [PyFPGA/pyfpga: fpga/project.py](https://GitHub.com/PyFPGA/pyfpga/blob/main/fpga/project.py) +- [olofk/fusesoc: fusesoc/capi2/core.py](https://GitHub.com/olofk/fusesoc/blob/master/fusesoc/capi2/core.py) +- [XedaHQ/xeda: xeda/flows/flow.py](https://GitHub.com/XedaHQ/xeda/blob/master/xeda/flows/flow.py) - [tsfpga/tsfpga: tsfpga/build_project_list.py](https://gitlab.com/tsfpga/tsfpga/-/blob/master/tsfpga/build_project_list.py) - [hdl-make: hdlmake/](https://ohwr.org/project/hdl-make/tree/master/hdlmake) -- [OSVVM/OSVVM-Scripts: OsvvmProjectScripts.tcl](https://github.com/OSVVM/OSVVM-Scripts/blob/master/OsvvmProjectScripts.tcl) +- [OSVVM/OSVVM-Scripts: OsvvmProjectScripts.tcl](https://GitHub.com/OSVVM/OSVVM-Scripts/blob/master/OsvvmProjectScripts.tcl) ## Contributors -* [Patrick Lehmann](https://github.com/Paebbels) (Maintainer) -* [Unai Martinez-Corral](https://github.com/umarcor) -* [Stefan Unrein](https://github.com/stefanunrein) -* [and more...](https://github.com/edaa-org/pyEDAA.ProjectModel/graphs/contributors) +* [Patrick Lehmann](https://GitHub.com/Paebbels) (Maintainer) +* [Unai Martinez-Corral](https://GitHub.com/umarcor) +* [Stefan Unrein](https://GitHub.com/stefanunrein) +* [and more...](https://GitHub.com/edaa-org/pyEDAA.ProjectModel/graphs/contributors) ## License diff --git a/dist/requirements.txt b/dist/requirements.txt new file mode 100644 index 00000000..6c4932c1 --- /dev/null +++ b/dist/requirements.txt @@ -0,0 +1,2 @@ +wheel +twine diff --git a/doc/Dependency.rst b/doc/Dependency.rst index 218e922a..d3a279e0 100644 --- a/doc/Dependency.rst +++ b/doc/Dependency.rst @@ -10,7 +10,7 @@ Dependency .. |img-ProjectModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel :alt: Requires.io :height: 22 - :target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=master + :target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=main +------------------------------------------+------------------------------------------+ | `Libraries.io `_ | `Requires.io `_ | @@ -24,65 +24,145 @@ Dependency pyEDAA.ProjectModel Package *************************** -+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| **Package** | **Version** | **License** | **Dependencies** | -+=======================================================+=============+===================================================================================+===================================================================================================================================+ -| `pydecor `__ | โ‰ฅ2.0.1 | `MIT `__ | * `dill `__ (`BSD 3-clause `__) | -| | | | * `six `__ (`MIT `__) | -+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| `pyVHDLModel `__ | โ‰ฅ0.13.0 | `Apache License, 2.0 `__ | * `pydecor `__ (`MIT `__) | -| | | | | -| | | | * `dill `__ (`BSD 3-clause `__) | -| | | | * `six `__ (`MIT `__) | -+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| `pySVModel `__ | โ‰ฅ0.3.0 | `Apache License, 2.0 `__ | * `pydecor `__ (`MIT `__) | -| | | | | -| | | | * `dill `__ (`BSD 3-clause `__) | -| | | | * `six `__ (`MIT `__) | -+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++==========================================================+=============+===========================================================================================+=================================================================================================================================+ +| `pyTooling `__ | โ‰ฅ1.7.0 | `Apache License, 2.0 `__ | *None* | ++----------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| `pyVHDLModel `__ | โ‰ฅ0.13.0 | `Apache License, 2.0 `__ | | ++----------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| `pySVModel `__ | โ‰ฅ0.3.1 | `Apache License, 2.0 `__ | | ++----------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ .. _dependency-testing: -Unit Testing / Coverage -*********************** +Unit Testing / Coverage / Type Checking (Optional) +************************************************** -Additional Python packages needed for testing and code coverage collection. -These packages are only needed for developers or on a CI server, thus -sub-dependencies are not evaluated further. +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. + +.. code-block:: shell + + pip3 install -U -r tests/requirements.txt + + +.. rubric:: Dependency List +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ | **Package** | **Version** | **License** | **Dependencies** | +===========================================================+=============+========================================================================================+======================+ -| `pytest `__ | โ‰ฅ6.2.4 | `MIT `__ | *Not yet evaluated.* | +| `pytest `__ | โ‰ฅ6.2.5 | `MIT `__ | *Not yet evaluated.* | ++-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `pytest-cov `__ | โ‰ฅ3.0.0 | `MIT `__ | *Not yet evaluated.* | ++-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `Coverage `__ | โ‰ฅ6.2 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ -| `pytest-cov `__ | โ‰ฅ2.12.1 | `MIT `__ | *Not yet evaluated.* | +| `mypy `__ | โ‰ฅ0.910 | `MIT `__ | *Not yet evaluated.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ -| `Coverage `__ | โ‰ฅ6.0 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +| `lxml `__ | โ‰ฅ4.6.4 | `BSD 3-Clause `__ | *Not yet evaluated.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ .. _dependency-documentation: -Sphinx 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. + +.. code-block:: shell + + pip3 install -U -r doc/requirements.txt + + +.. rubric:: Dependency List + ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++=================================================================================================+==============+==========================================================================================================+======================================================================================================================================================+ +| `pyTooling.Packaging `__ | โ‰ฅ1.7.0 | `Apache License, 2.0 `__ | *None* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `Sphinx `__ | โ‰ฅ4.3.0 | `BSD 3-Clause `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `sphinx_btd_theme `__ | โ‰ฅ0.5.2 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| !! `sphinx_fontawesome `__ | โ‰ฅ0.0.6 | `GPL 2.0 `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `sphinx_autodoc_typehints `__ | โ‰ฅ1.12.0 | `MIT `__ | *Not yet evaluated.* | ++-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + + +.. _dependency-packaging: + +Packaging (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. - -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| **Package** | **Version** | **License** | **Dependencies** | -+=================================================================================================+==============+==========================================================================================================+======================+ -| `Sphinx `__ | โ‰ฅ4.2.0 | `BSD 3-Clause `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `sphinx_btd_theme `__ | | `MIT `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `autoapi `__ | | `Apache License, 2.0 `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| !! `sphinx_fontawesome `__ | โ‰ฅ0.0.6 | `GPL 2.0 `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `sphinx_autodoc_typehints `__ | โ‰ฅ1.12.0 | `MIT `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `Pygments `__ | โ‰ฅ2.9.0 | `BSD 2-Clause `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ +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. + +.. code-block:: shell + + pip3 install -U -r build/requirements.txt + + +.. rubric:: Dependency List + ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++============================================================================+==============+==========================================================================================================+======================================================================================================================================================+ +| `pyTooling.Packaging `__ | โ‰ฅ1.7.0 | `Apache License, 2.0 `__ | *None* | ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| `wheel `__ | any | `MIT `__ | *Not yet evaluated.* | ++----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + + +.. _dependency-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. + +.. code-block:: shell + + pip3 install -U -r dist/requirements.txt + + +.. rubric:: Dependency List + ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++==========================================================+==============+===========================================================================================+======================+ +| `wheel `__ | any | `MIT `__ | *Not yet evaluated.* | ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ +| `Twine `__ | any | `Apache License, 2.0 `__ | *Not yet evaluated.* | ++----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ diff --git a/doc/_static/favicon.svg b/doc/_static/favicon.svg new file mode 100644 index 00000000..97995b9d --- /dev/null +++ b/doc/_static/favicon.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + diff --git a/doc/_static/logo_on_dark.svg b/doc/_static/logo_on_dark.svg new file mode 100644 index 00000000..24e8576a --- /dev/null +++ b/doc/_static/logo_on_dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/doc/_static/logo_on_light.svg b/doc/_static/logo_on_light.svg new file mode 100644 index 00000000..eac24d90 --- /dev/null +++ b/doc/_static/logo_on_light.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/doc/_themes/.gitempty b/doc/_themes/.gitempty deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/conf.py b/doc/conf.py index 65f8443b..4ff89d87 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -2,52 +2,36 @@ # 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. -import sys +from sys import path as sys_path from os.path import abspath from pathlib import Path -from json import dump, loads +from json import loads -sys.path.insert(0, abspath('.')) -sys.path.insert(0, abspath('..')) -sys.path.insert(0, abspath('../pyEDAA/ProjectModel')) -#sys.path.insert(0, abspath('_extensions')) +from pyTooling.Packaging import extractVersionInformation +ROOT = Path(__file__).resolve().parent -# ============================================================================== -# Project information -# ============================================================================== -project = "pyEDAA.ProjectModel" -copyright = "2016-2021 Patrick Lehmann, Unai Martinez-Corral and contributors" -author = "Patrick Lehmann" +sys_path.insert(0, abspath('.')) +sys_path.insert(0, abspath('..')) +sys_path.insert(0, abspath('../pyEDAA/ProjectModel')) +#sys_path.insert(0, abspath('_extensions')) # ============================================================================== -# Versioning +# Project information and versioning # ============================================================================== # 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. -from subprocess import check_output - -def _IsUnderGitControl(): - return (check_output(["git", "rev-parse", "--is-inside-work-tree"], universal_newlines=True).strip() == "true") - -def _LatestTagName(): - return check_output(["git", "describe", "--abbrev=0", "--tags"], universal_newlines=True).strip() +project = "pyEDAA.ProjectModel" -# The full version, including alpha/beta/rc tags -version = "0.3" # The short X.Y version. -release = "0.3.1" # The full version, including alpha/beta/rc tags. -try: - if _IsUnderGitControl: - latestTagName = _LatestTagName()[1:] # remove prefix "v" - versionParts = latestTagName.split("-")[0].split(".") - - version = ".".join(versionParts[:2]) - release = latestTagName # ".".join(versionParts[:3]) -except: - pass +packageInformationFile = Path(f"../{project.replace('.', '/')}/__init__.py") +versionInformation = extractVersionInformation(packageInformationFile) +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 @@ -88,24 +72,31 @@ def _LatestTagName(): # ============================================================================== # Options for HTML output # ============================================================================== -html_theme_options = { - 'home_breadcrumbs': True, - 'vcs_pageview_mode': 'blob', -} html_context = {} -ctx = Path(__file__).resolve().parent / 'context.json' +ctx = ROOT / 'context.json' if ctx.is_file(): html_context.update(loads(ctx.open('r').read())) -html_theme_path = ["."] -html_theme = "_theme" +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" # 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_logo = str(Path(html_static_path[0]) / "logo_on_dark.svg") +html_favicon = str(Path(html_static_path[0]) / "favicon.svg") + # Output file base name for HTML help builder. htmlhelp_basename = 'pyEDAAProjectModelDoc' @@ -134,7 +125,7 @@ def _LatestTagName(): % ================================================================================ % Add more Unicode characters for pdfLaTeX. % - Alternatively, compile with XeLaTeX or LuaLaTeX. - % - https://github.com/sphinx-doc/sphinx/issues/3511 + % - https://GitHub.com/sphinx-doc/sphinx/issues/3511 % \ifdefined\DeclareUnicodeCharacter \DeclareUnicodeCharacter{2265}{$\geq$} @@ -223,10 +214,9 @@ def _LatestTagName(): # Sphinx.Ext.ExtLinks # ============================================================================== extlinks = { - 'issue': ('https://github.com/edaa-org/pyEDAA.ProjectModel/issues/%s', 'issue #'), - 'pull': ('https://github.com/edaa-org/pyEDAA.ProjectModel/pull/%s', 'pull request #'), - 'src': ('https://github.com/edaa-org/pyEDAA.ProjectModel/blob/master/pyMetaClasses/%s?ts=2', None), -# 'test': ('https://github.com/edaa-org/pyEDAA.ProjectModel/blob/master/test/%s?ts=2', None) + "ghissue": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/issues/%s', 'issue #'), + "ghpull": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/pull/%s', 'pull request #'), + "ghsrc": ('https://GitHub.com/edaa-org/pyEDAA.ProjectModel/blob/main/%s?ts=2', None), } diff --git a/doc/coverage/index.rst b/doc/coverage/index.rst index 59e1add6..80bbad2e 100644 --- a/doc/coverage/index.rst +++ b/doc/coverage/index.rst @@ -1,2 +1,4 @@ Coverage Report ############### + +*Placeholder for the Coverage report generated with* ``pytest`` *and* ``coverage``. diff --git a/doc/index.rst b/doc/index.rst index 77100837..cf662a69 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,22 +1,33 @@ .. include:: shields.inc +.. image:: _static/logo_on_light.svg + :height: 90 px + :align: center + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel + +.. raw:: html + +
+ .. raw:: latex \part{Introduction} .. only:: html - | |SHIELD:svg:ProjectModel-github| |SHIELD:svg:ProjectModel-src-license| |SHIELD:svg:ProjectModel-tag| |SHIELD:svg:ProjectModel-release| |SHIELD:svg:ProjectModel-date| |SHIELD:svg:ProjectModel-lib-dep| - | |SHIELD:svg:ProjectModel-gha-test| |SHIELD:svg:ProjectModel-codacy-quality| |SHIELD:svg:ProjectModel-codacy-coverage| |SHIELD:svg:ProjectModel-codecov-coverage| |SHIELD:svg:ProjectModel-lib-rank| - | |SHIELD:svg:ProjectModel-pypi-tag| |SHIELD:svg:ProjectModel-pypi-status| |SHIELD:svg:ProjectModel-pypi-python| |SHIELD:svg:ProjectModel-lib-status| |SHIELD:svg:ProjectModel-req-status| - | |SHIELD:svg:ProjectModel-doc-license| |SHIELD:svg:ProjectModel-ghp-doc| + | |SHIELD:svg:ProjectModel-github| |SHIELD:svg:ProjectModel-src-license| |SHIELD:svg:ProjectModel-ghp-doc| |SHIELD:svg:ProjectModel-doc-license| |SHIELD:svg:ProjectModel-gitter| + | |SHIELD:svg:ProjectModel-pypi-tag| |SHIELD:svg:ProjectModel-pypi-status| |SHIELD:svg:ProjectModel-pypi-python| + | |SHIELD:svg:ProjectModel-gha-test| |SHIELD:svg:ProjectModel-lib-status| |SHIELD:svg:ProjectModel-codacy-quality| |SHIELD:svg:ProjectModel-codacy-coverage| |SHIELD:svg:ProjectModel-codecov-coverage| + +.. Disabled shields: |SHIELD:svg:ProjectModel-lib-dep| |SHIELD:svg:ProjectModel-req-status| |SHIELD:svg:ProjectModel-lib-rank| .. only:: latex - |SHIELD:png:ProjectModel-github| |SHIELD:png:ProjectModel-src-license| |SHIELD:png:ProjectModel-tag| |SHIELD:png:ProjectModel-release| |SHIELD:png:ProjectModel-date| |SHIELD:png:ProjectModel-lib-dep| - |SHIELD:png:ProjectModel-gha-test| |SHIELD:png:ProjectModel-codacy-quality| |SHIELD:png:ProjectModel-codacy-coverage| |SHIELD:png:ProjectModel-codecov-coverage| |SHIELD:png:ProjectModel-lib-rank| - |SHIELD:png:ProjectModel-pypi-tag| |SHIELD:png:ProjectModel-pypi-status| |SHIELD:png:ProjectModel-pypi-python| |SHIELD:png:ProjectModel-lib-status| |SHIELD:png:ProjectModel-req-status| - |SHIELD:png:ProjectModel-doc-license| |SHIELD:png:ProjectModel-ghp-doc| + |SHIELD:png:ProjectModel-github| |SHIELD:png:ProjectModel-src-license| |SHIELD:png:ProjectModel-ghp-doc| |SHIELD:png:ProjectModel-doc-license| |SHIELD:svg:ProjectModel-gitter| + |SHIELD:png:ProjectModel-pypi-tag| |SHIELD:png:ProjectModel-pypi-status| |SHIELD:png:ProjectModel-pypi-python| + |SHIELD:png:ProjectModel-gha-test| |SHIELD:png:ProjectModel-lib-status| |SHIELD:png:ProjectModel-codacy-quality| |SHIELD:png:ProjectModel-codacy-coverage| |SHIELD:png:ProjectModel-codecov-coverage| + +.. Disabled shields: |SHIELD:png:ProjectModel-lib-dep| |SHIELD:png:ProjectModel-req-status| |SHIELD:png:ProjectModel-lib-rank| -------------------------------------------------------------------------------- @@ -52,7 +63,7 @@ Use Cases `Verilog to Routing (VTR) `__, `nextpnr `__, etc. -* Managing IP cores and projects with `pyIPCMI `__. +* Managing IP cores and projects with `pyIPCMI `__. .. _news: @@ -83,8 +94,8 @@ News .. rubric:: Extracted ProjectModel from pyIPCMI -* The project model has been extracted from `pyIPCMI `__. -* ProjectModel became first citizen of `EDAยฒ `__ and got integrated into the `pyEDAA` namespace at PyPI. +* The project model has been extracted from `pyIPCMI `__. +* ProjectModel became first citizen of `EDAยฒ `__ and got integrated into the `pyEDAA` namespace at PyPI. .. _contributors: @@ -92,9 +103,9 @@ News Contributors ************ -* `Patrick Lehmann `__ (Maintainer) -* `Unai Martinez-Corral `__ (Maintainer) -* `and more... `__ +* `Patrick Lehmann `__ (Maintainer) +* `Unai Martinez-Corral `__ (Maintainer) +* `and more... `__ License @@ -119,6 +130,12 @@ License This document was generated on |docdate|. +.. toctree:: + :hidden: + + Used as a layer of EDAยฒ โžš + + .. toctree:: :caption: Introduction :hidden: diff --git a/doc/requirements.txt b/doc/requirements.txt index e63a4235..58166dc3 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,15 +1,12 @@ -r ../requirements.txt + +pyTooling>=1.7.0 + # Enforce latest version on ReadTheDocs -sphinx>=4.2.0 +sphinx>=4.3.0 # Sphinx Extenstions -#sphinx.ext.coverage -#sphinxcontrib-actdiag>=0.8.5 sphinxcontrib-mermaid>=0.7.1 -#sphinxcontrib-seqdiag>=0.8.5 -#sphinxcontrib-textstyle>=0.2.1 -#sphinxcontrib-spelling>=2.2.0 -autoapi +autoapi>=2.0.1 sphinx_fontawesome>=0.0.6 sphinx_autodoc_typehints>=1.12.0 -# changelog>=0.3.5 diff --git a/doc/shields.inc b/doc/shields.inc index 308f1eca..f5d376c0 100644 --- a/doc/shields.inc +++ b/doc/shields.inc @@ -4,177 +4,177 @@ # percent encoding so that the URL is properly parsed. .. # Sourcecode link to GitHub -.. |SHIELD:svg:ProjectModel-github| image:: https://img.shields.io/badge/edaa--org-pyEDAA.ProjectModel-323131?logo=github&longCache=true +.. |SHIELD:svg:ProjectModel-github| image:: https://img.shields.io/badge/pyEDAA-ProjectModel-ab47bc.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=6a1b9a :alt: Sourcecode on GitHub :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel -.. |SHIELD:png:ProjectModel-github| image:: https://raster.shields.io/badge/edaa--org-pyEDAA.ProjectModel-323131?logo=github&longCache=true + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel +.. |SHIELD:png:ProjectModel-github| image:: https://raster.shields.io/badge/pyEDAA-ProjectModel-ab47bc.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=6a1b9a :alt: Sourcecode on GitHub :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel .. # Sourcecode license -.. |SHIELD:svg:ProjectModel-src-license| image:: https://img.shields.io/pypi/l/pyEDAA.ProjectModel?logo=GitHub&label=code%20license +.. |SHIELD:svg:ProjectModel-src-license| image:: https://img.shields.io/pypi/l/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Apache&label=code :alt: Code license :height: 22 :target: Code-License.html -.. |SHIELD:png:ProjectModel-src-license| image:: https://img.shields.io/pypi/l/pyEDAA.ProjectModel?logo=GitHub&label=code%20license +.. |SHIELD:png:ProjectModel-src-license| image:: https://img.shields.io/pypi/l/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Apache&label=code :alt: Code license :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/blob/main/LICENSE.md + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/blob/main/LICENSE.md .. # GitHub tag -.. |SHIELD:svg:ProjectModel-tag| image:: https://img.shields.io/github/v/tag/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases +.. |SHIELD:svg:ProjectModel-tag| image:: https://img.shields.io/github/v/tag/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=GitHub&include_prereleases :alt: GitHub tag (latest SemVer incl. pre-release :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/tags -.. |SHIELD:png:ProjectModel-tag| image:: https://raster.shields.io/github/v/tag/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/tags +.. |SHIELD:png:ProjectModel-tag| image:: https://raster.shields.io/github/v/tag/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=GitHub&include_prereleases :alt: GitHub tag (latest SemVer incl. pre-release :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/tags - -.. # GitHub release -.. |SHIELD:svg:ProjectModel-release| image:: https://img.shields.io/github/v/release/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases - :alt: GitHub release (latest SemVer incl. including pre-releases - :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/releases/latest -.. |SHIELD:png:ProjectModel-release| image:: https://raster.shields.io/github/v/release/edaa-org/pyEDAA.ProjectModel?logo=GitHub&include_prereleases - :alt: GitHub release (latest SemVer incl. including pre-releases - :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/releases/latest + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/tags .. # GitHub release date -.. |SHIELD:svg:ProjectModel-date| image:: https://img.shields.io/github/release-date/edaa-org/pyEDAA.ProjectModel?logo=GitHub +.. |SHIELD:svg:ProjectModel-date| image:: https://img.shields.io/github/release-date/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=GitHub :alt: GitHub release date :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/releases -.. |SHIELD:png:ProjectModel-date| image:: https://raster.shields.io/github/release-date/edaa-org/pyEDAA.ProjectModel?logo=GitHub + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/releases +.. |SHIELD:png:ProjectModel-date| image:: https://raster.shields.io/github/release-date/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=GitHub :alt: GitHub release date :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/releases + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/releases .. # GitHub/Libraries dependent projects -.. |SHIELD:svg:ProjectModel-lib-dep| image:: https://img.shields.io/librariesio/dependent-repos/pypi/pyEDAA.ProjectModel +.. |SHIELD:svg:ProjectModel-lib-dep| image:: https://img.shields.io/librariesio/dependent-repos/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Dependent repos (via libraries.io) :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/network/dependents -.. |SHIELD:png:ProjectModel-lib-dep| image:: https://raster.shields.io/librariesio/dependent-repos/pypi/pyEDAA.ProjectModel + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/network/dependents +.. |SHIELD:png:ProjectModel-lib-dep| image:: https://raster.shields.io/librariesio/dependent-repos/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Dependent repos (via libraries.io) :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/network/dependents + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/network/dependents .. # GHA test and coverage -.. |SHIELD:svg:ProjectModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish?label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF +.. |SHIELD:svg:ProjectModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF :alt: GitHub Workflow - Build and Test Status :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/actions?query=workflow%3A%22Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish%22 -.. |SHIELD:png:ProjectModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish?label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml +.. |SHIELD:png:ProjectModel-gha-test| image:: https://raster.shields.io/github/workflow/status/edaa-org/pyEDAA.ProjectModel/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF :alt: GitHub Workflow - Build and Test Status :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/actions?query=workflow%3A%22Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish%22 + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/actions/workflows/Pipeline.yml .. # Codacy - quality -.. |SHIELD:svg:ProjectModel-codacy-quality| image:: https://img.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?logo=codacy +.. |SHIELD:svg:ProjectModel-codacy-quality| image:: https://img.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Quality :height: 22 :target: https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel -.. |SHIELD:png:ProjectModel-codacy-quality| image:: https://raster.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?logo=codacy +.. |SHIELD:png:ProjectModel-codacy-quality| image:: https://raster.shields.io/codacy/grade/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Quality :height: 22 :target: https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel .. # Codacy - coverage -.. |SHIELD:svg:ProjectModel-codacy-coverage| image:: https://img.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?logo=codacy +.. |SHIELD:svg:ProjectModel-codacy-coverage| image:: https://img.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Line Coverage :height: 22 :target: https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel -.. |SHIELD:png:ProjectModel-codacy-coverage| image:: https://raster.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?logo=codacy +.. |SHIELD:png:ProjectModel-codacy-coverage| image:: https://raster.shields.io/codacy/coverage/c2635df20fa840bc85639ca2fa1d9cb4?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Line Coverage :height: 22 :target: https://www.codacy.com/manual/edaa-org/pyEDAA.ProjectModel .. # Codecov - coverage -.. |SHIELD:svg:ProjectModel-codecov-coverage| image:: https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel +.. |SHIELD:svg:ProjectModel-codecov-coverage| image:: https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Codecov :alt: Codecov - Branch Coverage :height: 22 :target: https://codecov.io/gh/edaa-org/pyEDAA.ProjectModel -.. |SHIELD:png:ProjectModel-codecov-coverage| image:: https://raster.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel +.. |SHIELD:png:ProjectModel-codecov-coverage| image:: https://raster.shields.io/codecov/c/github/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Codecov :alt: Codecov - Branch Coverage :height: 22 :target: https://codecov.io/gh/edaa-org/pyEDAA.ProjectModel .. # Libraries - source rank -.. |SHIELD:svg:ProjectModel-lib-rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.ProjectModel +.. |SHIELD:svg:ProjectModel-lib-rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io SourceRank :height: 22 :target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel/sourcerank -.. |SHIELD:png:ProjectModel-lib-rank| image:: https://raster.shields.io/librariesio/sourcerank/pypi/pyEDAA.ProjectModel +.. |SHIELD:png:ProjectModel-lib-rank| image:: https://raster.shields.io/librariesio/sourcerank/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io SourceRank :height: 22 :target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel/sourcerank .. # PyPI tag -.. |SHIELD:svg:ProjectModel-pypi-tag| image:: https://img.shields.io/pypi/v/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:svg:ProjectModel-pypi-tag| image:: https://img.shields.io/pypi/v/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Tag :height: 22 :target: https://pypi.org/project/pyEDAA.ProjectModel/ -.. |SHIELD:png:ProjectModel-pypi-tag| image:: https://raster.shields.io/pypi/v/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:png:ProjectModel-pypi-tag| image:: https://raster.shields.io/pypi/v/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Tag :height: 22 :target: https://pypi.org/project/pyEDAA.ProjectModel/ .. # PyPI project status -.. |SHIELD:svg:ProjectModel-pypi-status| image:: https://img.shields.io/pypi/status/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:svg:ProjectModel-pypi-status| image:: https://img.shields.io/pypi/status/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Status :height: 22 -.. |SHIELD:png:ProjectModel-pypi-status| image:: https://raster.shields.io/pypi/status/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:png:ProjectModel-pypi-status| image:: https://raster.shields.io/pypi/status/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Status :height: 22 .. # PyPI Python versions -.. |SHIELD:svg:ProjectModel-pypi-python| image:: https://img.shields.io/pypi/pyversions/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:svg:ProjectModel-pypi-python| image:: https://img.shields.io/pypi/pyversions/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Python Version :height: 22 -.. |SHIELD:png:ProjectModel-pypi-python| image:: https://raster.shields.io/pypi/pyversions/pyEDAA.ProjectModel?logo=PyPI +.. |SHIELD:png:ProjectModel-pypi-python| image:: https://raster.shields.io/pypi/pyversions/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Python Version :height: 22 .. # Libraries - status -.. |SHIELD:svg:ProjectModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel +.. |SHIELD:svg:ProjectModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io status for latest release :height: 22 :target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel -.. |SHIELD:png:ProjectModel-lib-status| image:: https://raster.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel +.. |SHIELD:png:ProjectModel-lib-status| image:: https://raster.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io status for latest release :height: 22 :target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel .. # Requires - status -.. |SHIELD:svg:ProjectModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel +.. |SHIELD:svg:ProjectModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square :alt: Requires.io :height: 22 :target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=main -.. |SHIELD:png:ProjectModel-req-status| image:: https://raster.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel +.. |SHIELD:png:ProjectModel-req-status| image:: https://raster.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel?longCache=true&style=flat-square :alt: Requires.io :height: 22 :target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=main .. # Documentation license -.. |SHIELD:svg:ProjectModel-doc-license| image:: https://img.shields.io/badge/doc%20license-CC--BY%204.0-green +.. |SHIELD:svg:ProjectModel-doc-license| image:: https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff :alt: Documentation License :height: 22 - :target: Doc-License.html -.. |SHIELD:png:ProjectModel-doc-license| image:: https://img.shields.io/badge/doc%20license-CC--BY%204.0-green + :target: License.html +.. |SHIELD:png:ProjectModel-doc-license| image:: https://raster.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff :alt: Documentation License :height: 22 - :target: https://github.com/edaa-org/pyEDAA.ProjectModel/blob/main/doc/Doc-License.rst + :target: https://GitHub.com/edaa-org/pyEDAA.ProjectModel/blob/main/doc/License.rst .. # GHPages - read now -.. |SHIELD:svg:ProjectModel-ghp-doc| image:: https://img.shields.io/badge/doc-read%20now%20%E2%9E%94-blueviolet +.. |SHIELD:svg:ProjectModel-ghp-doc| image:: https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.ProjectModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.ProjectModel%2Findex.html :alt: Documentation - Read Now! :height: 22 :target: https://edaa-org.github.io/pyEDAA.ProjectModel/ -.. |SHIELD:png:ProjectModel-ghp-doc| image:: https://img.shields.io/badge/doc-read%20now%20%E2%9E%94-blueviolet +.. |SHIELD:png:ProjectModel-ghp-doc| image:: https://raster.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.ProjectModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.ProjectModel%2Findex.html :alt: Documentation - Read Now! :height: 22 :target: https://edaa-org.github.io/pyEDAA.ProjectModel/ + +.. # Gitter +.. |SHIELD:svg:ProjectModel-gitter| image:: https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef + :alt: Documentation License + :height: 22 + :target: https://gitter.im/hdl/community +.. |SHIELD:png:ProjectModel-gitter| image:: https://raster.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef + :alt: Documentation License + :height: 22 + :target: https://gitter.im/hdl/community diff --git a/doc/typing/index.rst b/doc/typing/index.rst index 96a472c4..97d4ae2a 100644 --- a/doc/typing/index.rst +++ b/doc/typing/index.rst @@ -1,2 +1,4 @@ Static Type Checking Report ########################### + +*Placeholder for the Static Type Checking report generated with* ``mypy``. diff --git a/pyEDAA/ProjectModel/Altera/Quartus.py b/pyEDAA/ProjectModel/Altera/Quartus.py index e9cd0ed2..e347e25e 100644 --- a/pyEDAA/ProjectModel/Altera/Quartus.py +++ b/pyEDAA/ProjectModel/Altera/Quartus.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ConstraintFile, ProjectFile, SDCContent, TCLContent diff --git a/pyEDAA/ProjectModel/GHDL.py b/pyEDAA/ProjectModel/GHDL.py index c584eb86..115a2295 100644 --- a/pyEDAA/ProjectModel/GHDL.py +++ b/pyEDAA/ProjectModel/GHDL.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import WaveformExchangeFile diff --git a/pyEDAA/ProjectModel/Intel/QuartusPrime.py b/pyEDAA/ProjectModel/Intel/QuartusPrime.py index e9cd0ed2..e347e25e 100644 --- a/pyEDAA/ProjectModel/Intel/QuartusPrime.py +++ b/pyEDAA/ProjectModel/Intel/QuartusPrime.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ConstraintFile, ProjectFile, SDCContent, TCLContent diff --git a/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py b/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py index b5b39f16..59cf6eee 100644 --- a/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py +++ b/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ProjectFile, SettingFile, INIContent, WaveformConfigFile, TCLContent diff --git a/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py b/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py index b5b39f16..59cf6eee 100644 --- a/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py +++ b/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ProjectFile, SettingFile, INIContent, WaveformConfigFile, TCLContent diff --git a/pyEDAA/ProjectModel/OSVVM.py b/pyEDAA/ProjectModel/OSVVM.py index 244b6113..f72c1324 100644 --- a/pyEDAA/ProjectModel/OSVVM.py +++ b/pyEDAA/ProjectModel/OSVVM.py @@ -32,7 +32,7 @@ from enum import Enum, unique from pathlib import Path -from pydecor import export +from pyTooling.Decorators import export from typing import Optional as Nullable, List from pyEDAA.ProjectModel import ProjectFile, TCLContent, Project, Design, FileSet, VHDLLibrary, VHDLSourceFile diff --git a/pyEDAA/ProjectModel/Verilog.py b/pyEDAA/ProjectModel/Verilog.py index a9e75cc6..aed280ab 100644 --- a/pyEDAA/ProjectModel/Verilog.py +++ b/pyEDAA/ProjectModel/Verilog.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import WaveformExchangeFile diff --git a/pyEDAA/ProjectModel/Xilinx/ISE.py b/pyEDAA/ProjectModel/Xilinx/ISE.py index 672c35c5..7fab7aaa 100644 --- a/pyEDAA/ProjectModel/Xilinx/ISE.py +++ b/pyEDAA/ProjectModel/Xilinx/ISE.py @@ -29,7 +29,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ConstraintFile, ProjectFile, HumanReadableContent diff --git a/pyEDAA/ProjectModel/Xilinx/Vivado.py b/pyEDAA/ProjectModel/Xilinx/Vivado.py index a4c597b8..2c86cf7f 100644 --- a/pyEDAA/ProjectModel/Xilinx/Vivado.py +++ b/pyEDAA/ProjectModel/Xilinx/Vivado.py @@ -34,7 +34,7 @@ from xml.dom import minidom, Node from pyVHDLModel import VHDLVersion -from pydecor import export +from pyTooling.Decorators import export from pyEDAA.ProjectModel import ProjectFile, XMLFile, XMLContent, SDCContent, Project, FileSet, Attribute, Design from pyEDAA.ProjectModel import File as Model_File @@ -116,9 +116,13 @@ def Parse(self): def _ParseRootElement(self, root): for rootNode in root.childNodes: if rootNode.nodeName == "FileSets": - for fileSetsNode in rootNode.childNodes: - if fileSetsNode.nodeType == Node.ELEMENT_NODE and fileSetsNode.tagName == "FileSet": - self._ParseFileSet(fileSetsNode) + self._ParseFileSets(rootNode) + break + + def _ParseFileSets(self, filesetsNode): + for fileSetsNode in filesetsNode.childNodes: + if fileSetsNode.nodeType == Node.ELEMENT_NODE and fileSetsNode.tagName == "FileSet": + self._ParseFileSet(fileSetsNode) def _ParseFileSet(self, filesetNode): filesetName = filesetNode.getAttribute("Name") diff --git a/pyEDAA/ProjectModel/__init__.py b/pyEDAA/ProjectModel/__init__.py index b6ea206a..f55832c8 100644 --- a/pyEDAA/ProjectModel/__init__.py +++ b/pyEDAA/ProjectModel/__init__.py @@ -31,16 +31,20 @@ # SPDX-License-Identifier: Apache-2.0 # ============================================================================ # +__author__ = "Patrick Lehmann" +__email__ = "Paebbels@gmail.com" +__copyright__ = "2014-2021, Patrick Lehmann, Unai Martinez-Corral" +__license__ = "Apache License, Version 2.0" +__version__ = "0.4.0" +__keywords__ = ["eda project", "model", "abstract", "xilinx", "vivado", "osvvm", "file set", "file group", "test bench", "test harness"] + from os.path import relpath as path_relpath from pathlib import Path as pathlib_Path from typing import Dict, Union, Optional as Nullable, List, Iterable, Generator, Tuple, Any as typing_Any, Type from pySVModel import VerilogVersion, SystemVerilogVersion +from pyTooling.Decorators import export from pyVHDLModel import VHDLVersion -from pydecor import export - - -__version__ = "0.3.1" @export @@ -703,7 +707,7 @@ def Parent(self, value: 'FileSet') -> None: @property def FileSets(self) -> Dict[str, 'FileSet']: - """Read-only property returning the a dictionary of sub-filesets.""" + """Read-only property returning the dictionary of sub-filesets.""" return self._fileSets def Files(self, fileType: FileType = FileTypes.Any, fileSet: Union[bool, str, 'FileSet'] = None) -> Generator[File, None, None]: @@ -1105,7 +1109,7 @@ def DefaultFileSet(self, value: Union[str, FileSet]) -> None: # TODO: return generator with another method @property def FileSets(self) -> Dict[str, FileSet]: - """Read-only property returning the a dictionary of filesets.""" + """Read-only property returning the dictionary of filesets.""" return self._fileSets def Files(self, fileType: FileType = FileTypes.Any, fileSet: Union[str, FileSet] = None) -> Generator[File, None, None]: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..c2ddfb77 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[build-system] +requires = [ + "pyTooling >= 1.7.0", + "setuptools >= 35.0.2", + "wheel >= 0.29.0" +] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 120 diff --git a/requirements.txt b/requirements.txt index 3a9a4b58..29173060 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -pydecor>=2.0.1 - -pyVHDLModel>=0.13.2 -pySVModel>=0.3.0 +pyTooling>=1.7.0 +pyVHDLModel>=0.14.0 +pySVModel>=0.3.1 diff --git a/setup.py b/setup.py index cb05ebc7..d933cca5 100644 --- a/setup.py +++ b/setup.py @@ -31,70 +31,25 @@ # 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 = "ProjectModel" -projectNameWithPrefix = "pyEDAA." + projectName -version = "0.3.1" - -# 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) +from pathlib import Path +from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub -# 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', +gitHubNamespace = "edaa-org" +packageName = "pyEDAA.ProjectModel" +packageDirectory = packageName.replace(".", "/") +packageInformationFile = Path(f"{packageDirectory}/__init__.py") +DescribePythonPackageHostedOnGitHub( + packageName=packageName, description="An abstract model of EDA tool projects.", - 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.*",]), + gitHubNamespace=gitHubNamespace, + sourceFileWithVersion=packageInformationFile, + developmentStatus="beta", classifiers=[ - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3 :: Only", - "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 :: Utilities", "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", "Topic :: Utilities" - ], - keywords="Python3 EDA Project Model Abstract", - - python_requires='>=3.7', - install_requires=requirements, + ] ) diff --git a/tests/requirements.txt b/tests/requirements.txt index 172211b8..85964cb0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,12 +1,12 @@ -r ../requirements.txt # Coverage collection -Coverage>=6.0 +Coverage>=6.2 # Test Runner -pytest>=6.2.4 -pytest-cov>=2.12.1 +pytest>=6.2.5 +pytest-cov>=3.0.0 # Static Type Checking mypy>=0.910 -lxml>=4.6.3 +lxml>=4.6.4