diff --git a/.btd.yml b/.btd.yml index 03528e6b..3b7c0aec 100644 --- a/.btd.yml +++ b/.btd.yml @@ -6,4 +6,4 @@ formats: [ html, pdf, man ] images: base: edaa/doc 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 de39bf1f..4aee2335 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 -on: [ push ] +on: + push: + workflow_dispatch: defaults: run: @@ -15,10 +17,11 @@ jobs: fail-fast: false matrix: include: - - {python: 3.6, icon: 🔴} - - {python: 3.7, icon: 🟠} - - {python: 3.8, icon: 🟡} - - {python: 3.9, icon: 🟢} + - {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 }} @@ -60,11 +63,11 @@ jobs: Coverage: - name: 📈 Collect Coverage Data using Python 3.9 + name: 📈 Collect Coverage Data using Python 3.10 runs-on: ubuntu-latest env: - PYTHON: 3.9 + PYTHON: "3.10" outputs: python: ${{ env.PYTHON }} @@ -247,11 +250,11 @@ jobs: # VerifyDocs: -# name: 👍 Verify example snippets using Python 3.9 +# name: 👍 Verify example snippets using Python 3.10 # runs-on: ubuntu-latest # # env: -# PYTHON: 3.9 +# PYTHON: "3.10" # outputs: # python: ${{ env.PYTHON }} # @@ -269,7 +272,7 @@ jobs: # # - name: 🐍 Install dependencies # run: | -# pip3 install git+https://github.com/ghdl/ghdl.git@$(ghdl version hash) +# pip3 install git+https://GitHub.com/ghdl/ghdl.git@$(ghdl version hash) # # - name: ✂ Extract code snippet from README # shell: python diff --git a/README.md b/README.md index 30e89de2..5f25da91 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,29 @@ -[![Sourcecode on GitHub](https://img.shields.io/badge/edaa--org-pySVModel-323131.svg?logo=github&longCache=true)](https://github.com/edaa-org/pySVModel) -[![Sourcecode License](https://img.shields.io/pypi/l/pySVModel?logo=GitHub&label=code%20license)](LICENSE.md) -[![GitHub tag (latest SemVer incl. pre-release)](https://img.shields.io/github/v/tag/edaa-org/pySVModel?logo=GitHub&include_prereleases)](https://github.com/edaa-org/pySVModel/tags) -[![GitHub release (latest SemVer incl. including pre-releases)](https://img.shields.io/github/v/release/edaa-org/pySVModel?logo=GitHub&include_prereleases)](https://github.com/edaa-org/pySVModel/releases/latest) -[![GitHub release date](https://img.shields.io/github/release-date/edaa-org/pySVModel?logo=GitHub&)](https://github.com/edaa-org/pySVModel/releases) -[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pySVModel?logo=GitHub)](https://github.com/edaa-org/pySVModel/network/dependents) -[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish?label=build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish%22) -[![Codacy - Quality](https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?logo=Codacy)](https://app.codacy.com/gh/edaa-org/pySVModel) -[![Codacy - Coverage](https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?logo=Codacy)](https://app.codacy.com/gh/edaa-org/pySVModel) -[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pySVModel?logo=Codecov)](https://codecov.io/gh/edaa-org/pySVModel) -[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pySVModel)](https://libraries.io/github/edaa-org/pySVModel/sourcerank) -[![GitHub Workflow Release Status](https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Release?label=release&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Release%22) -[![PyPI](https://img.shields.io/pypi/v/pySVModel?logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pySVModel/) -![PyPI - Status](https://img.shields.io/pypi/status/pySVModel?logo=PyPI&logoColor=FBE072) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pySVModel?logo=PyPI&logoColor=FBE072) -[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pySVModel)](https://libraries.io/github/edaa-org/pySVModel) -[![Requires.io](https://img.shields.io/requires/github/edaa-org/pySVModel)](https://requires.io/github/EDAA-ORG/pySVModel/requirements/?branch=main) -[![GitHub Workflow - Documentation Status](https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Documentation?label=documentation&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Documentation%22) -[![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/pySVModel/) - -An abstract language model of SystemVerilog (incl. Verilog) written in Python. -

- +

+[![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-pySVModel-29b6f6.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=0277bd)](https://GitHub.com/edaa-org/pySVModel) +[![Sourcecode License](https://img.shields.io/pypi/l/pySVModel?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%2FpySVModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpySVModel%2Findex.html)](https://edaa-org.github.io/pySVModel/) +[![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/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pySVModel/) +![PyPI - Status](https://img.shields.io/pypi/status/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072) +[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pySVModel/actions?query=workflow%3A%22Pipeline%22) +[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pySVModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/edaa-org/pySVModel) +[![Codacy - Quality](https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pySVModel) +[![Codacy - Coverage](https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pySVModel) +[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pySVModel?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/edaa-org/pySVModel) + + + +An abstract language model of SystemVerilog (incl. Verilog) written in Python. + ## Main Goals @@ -40,10 +39,14 @@ and services on such a model, while supporting multiple frontends. ### pySVModel Generators +* See [#11: Interfacing Surelog/UHDM](https://GitHub.com/edaa-org/pySVModel/issues/11) + *TBD* ### pySVModel Consumers +* [Electronic Design Automation Abstraction (EDA²)](https://edaa-org.github.io/) + *TBD* ## Examples @@ -54,9 +57,9 @@ and services on such a model, while supporting multiple frontends. ## Contributors -* [Patrick Lehmann](https://github.com/Paebbels) (Maintainer) -* [Unai Martinez-Corral](https://github.com/umarcor) -* [and more...](https://github.com/edaa-org/pySVModel/graphs/contributors) +* [Patrick Lehmann](https://GitHub.com/Paebbels) (Maintainer) +* [Unai Martinez-Corral](https://GitHub.com/umarcor) +* [and more...](https://GitHub.com/edaa-org/pySVModel/graphs/contributors) ## License diff --git a/doc/Dependency.rst b/doc/Dependency.rst index 75f20a37..a657efa3 100644 --- a/doc/Dependency.rst +++ b/doc/Dependency.rst @@ -24,12 +24,13 @@ Dependency pySVModel Package ***************** -+-----------------------------------------------------+-------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| **Package** | **Version** | **License** | **Dependencies** | -+=====================================================+=============+=====================================================================+=================================================================================================================================+ -| `pydecor `__ | ≥2.0.1 | `MIT `__ | * `dill `__ (`BSD 3-clause `__) | -| | | | * `six `__ (`MIT `__) | -+-----------------------------------------------------+-------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +*None* + ++--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| **Package** | **Version** | **License** | **Dependencies** | ++========================================================+=============+==========================================================================================+=================================================================================================================================+ +| `pyTooling `__ | ≥1.4.2 | `Apache License, 2.0 `__ | | ++--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ .. _dependency-testing: @@ -44,11 +45,15 @@ sub-dependencies are not evaluated further. +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ | **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.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ -| `pytest-cov `__ | ≥2.12.1 | `MIT `__ | *Not yet evaluated.* | +| `Coverage `__ | ≥6.1 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ -| `Coverage `__ | ≥6.0 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +| `mypy `__ | ≥0.910 | `MIT `__ | *Not yet evaluated.* | ++-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ +| `lxml `__ | ≥4.6.4 | `BSD 3-Clause `__ | *Not yet evaluated.* | +-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+ @@ -64,15 +69,13 @@ evaluated further. +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ | **Package** | **Version** | **License** | **Dependencies** | +=================================================================================================+==============+==========================================================================================================+======================+ -| `Sphinx `__ | ≥4.2.0 | `BSD 3-Clause `__ | *Not yet evaluated.* | -+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `sphinx_btd_theme `__ | | `MIT `__ | *Not yet evaluated.* | +| `Sphinx `__ | ≥4.3.0 | `BSD 3-Clause `__ | *Not yet evaluated.* | +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `autoapi `__ | | `Apache License, 2.0 `__ | *Not yet evaluated.* | +| `sphinx_btd_theme `__ | | `MIT `__ | *Not yet evaluated.* | +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| !! `sphinx_fontawesome `__ | ≥0.0.6 | `GPL 2.0 `__ | *Not yet evaluated.* | +| `autoapi `__ | | `Apache License, 2.0 `__ | *Not yet evaluated.* | +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `sphinx_autodoc_typehints `__ | ≥1.12.0 | `MIT `__ | *Not yet evaluated.* | +| !! `sphinx_fontawesome `__ | ≥0.0.6 | `GPL 2.0 `__ | *Not yet evaluated.* | +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ -| `Pygments `__ | ≥2.9.0 | `BSD 2-Clause `__ | *Not yet evaluated.* | +| `sphinx_autodoc_typehints `__ | ≥1.12.0 | `MIT `__ | *Not yet evaluated.* | +-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+ diff --git a/doc/_static/banner.svg b/doc/_static/banner.svg deleted file mode 100644 index 2f126494..00000000 --- a/doc/_static/banner.svg +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/_static/favicon.svg b/doc/_static/favicon.svg index 6f11a969..ce3203b7 100644 --- a/doc/_static/favicon.svg +++ b/doc/_static/favicon.svg @@ -1,78 +1,65 @@ - - + id="svg18" + sodipodi:docname="favicon.svg" + inkscape:version="1.1 (c68e22c387, 2021-05-23)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + id="defs22" /> - - - - image/svg+xml - - - - - - - pySV - + inkscape:current-layer="svg18" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + + + + + + diff --git a/doc/_static/logo.svg b/doc/_static/logo.svg index c41be576..94450ffb 100644 --- a/doc/_static/logo.svg +++ b/doc/_static/logo.svg @@ -1,261 +1,10 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + 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 067e7671..2e14fb4f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -2,15 +2,18 @@ # 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('../pySVModel')) -#sys.path.insert(0, abspath('_extensions')) + +ROOT = Path(__file__).resolve().parent + +sys_path.insert(0, abspath('.')) +sys_path.insert(0, abspath('..')) +sys_path.insert(0, abspath('../pySVModel')) +#sys_path.insert(0, abspath('_extensions')) # ============================================================================== @@ -37,7 +40,7 @@ def _LatestTagName(): # The full version, including alpha/beta/rc tags version = "0.3" # The short X.Y version. -release = "0.3.0" # The full version, including alpha/beta/rc tags. +release = "0.3.1" # The full version, including alpha/beta/rc tags. try: if _IsUnderGitControl: latestTagName = _LatestTagName()[1:] # remove prefix "v" @@ -88,19 +91,22 @@ def _LatestTagName(): # ============================================================================== # Options for HTML output # ============================================================================== -html_theme_options = { - 'logo_only': True, - '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, @@ -138,7 +144,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$} @@ -226,10 +232,10 @@ def _LatestTagName(): # Sphinx.Ext.ExtLinks # ============================================================================== extlinks = { - 'issue': ('https://github.com/edaa-org/pySVModel/issues/%s', 'issue #'), - 'pull': ('https://github.com/edaa-org/pySVModel/pull/%s', 'pull request #'), - 'src': ('https://github.com/edaa-org/pySVModel/blob/main/pySVModel/%s?ts=2', None), -# 'test': ('https://github.com/edaa-org/pySVModel/blob/main/test/%s?ts=2', None) + 'issue': ('https://GitHub.com/edaa-org/pySVModel/issues/%s', 'issue #'), + 'pull': ('https://GitHub.com/edaa-org/pySVModel/pull/%s', 'pull request #'), + 'src': ('https://GitHub.com/edaa-org/pySVModel/blob/main/pySVModel/%s?ts=2', None), +# 'test': ('https://GitHub.com/edaa-org/pySVModel/blob/main/test/%s?ts=2', None) } diff --git a/doc/index.rst b/doc/index.rst index 2e4211a4..8b65e341 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,24 +1,33 @@ .. include:: shields.inc +.. image:: _static/logo.svg + :height: 90 px + :align: center + :target: https://GitHub.com/edaa-org/pySVModel + +.. raw:: html + +
+ .. raw:: latex \part{Introduction} .. only:: html - | |SHIELD:svg:pySVModel-github| |SHIELD:svg:pySVModel-src-license| |SHIELD:svg:pySVModel-tag| |SHIELD:svg:pySVModel-release| |SHIELD:svg:pySVModel-date| |SHIELD:svg:pySVModel-lib-dep| - | |SHIELD:svg:pySVModel-gha-test| |SHIELD:svg:pySVModel-codacy-quality| |SHIELD:svg:pySVModel-codacy-coverage| |SHIELD:svg:pySVModel-codecov-coverage| |SHIELD:svg:pySVModel-lib-rank| - | |SHIELD:svg:pySVModel-gha-release| |SHIELD:svg:pySVModel-pypi-tag| |SHIELD:svg:pySVModel-pypi-status| |SHIELD:svg:pySVModel-pypi-python| |SHIELD:svg:pySVModel-lib-status| |SHIELD:svg:pySVModel-req-status| - | |SHIELD:svg:pySVModel-gha-doc| |SHIELD:svg:pySVModel-doc-license| |SHIELD:svg:pySVModel-ghp-doc| + | |SHIELD:svg:pySVModel-github| |SHIELD:svg:pySVModel-src-license| |SHIELD:svg:pySVModel-ghp-doc| |SHIELD:svg:pySVModel-doc-license| |SHIELD:svg:pySVModel-gitter| + | |SHIELD:svg:pySVModel-pypi-tag| |SHIELD:svg:pySVModel-pypi-status| |SHIELD:svg:pySVModel-pypi-python| + | |SHIELD:svg:pySVModel-gha-test| |SHIELD:svg:pySVModel-lib-status| |SHIELD:svg:pySVModel-codacy-quality| |SHIELD:svg:pySVModel-codacy-coverage| |SHIELD:svg:pySVModel-codecov-coverage| + +.. Disabled shields: |SHIELD:svg:pySVModel-lib-dep| |SHIELD:svg:pySVModel-req-status| |SHIELD:svg:pySVModel-lib-rank| .. only:: latex - |SHIELD:png:pySVModel-github| |SHIELD:png:pySVModel-src-license| |SHIELD:png:pySVModel-tag| |SHIELD:png:pySVModel-release| |SHIELD:png:pySVModel-date| |SHIELD:png:pySVModel-lib-dep| - |SHIELD:png:pySVModel-gha-test| |SHIELD:png:pySVModel-codacy-quality| |SHIELD:png:pySVModel-codacy-coverage| |SHIELD:png:pySVModel-codecov-coverage| |SHIELD:png:pySVModel-lib-rank| - |SHIELD:png:pySVModel-gha-release| |SHIELD:png:pySVModel-pypi-tag| |SHIELD:png:pySVModel-pypi-status| |SHIELD:png:pySVModel-pypi-python| |SHIELD:png:pySVModel-lib-status| |SHIELD:png:pySVModel-req-status| - |SHIELD:png:pySVModel-gha-doc| |SHIELD:png:pySVModel-doc-license| |SHIELD:png:pySVModel-ghp-doc| + |SHIELD:png:pySVModel-github| |SHIELD:png:pySVModel-src-license| |SHIELD:png:pySVModel-ghp-doc| |SHIELD:png:pySVModel-doc-license| |SHIELD:png:pySVModel-gitter| + |SHIELD:png:pySVModel-pypi-tag| |SHIELD:png:pySVModel-pypi-status| |SHIELD:png:pySVModel-pypi-python| + |SHIELD:png:pySVModel-gha-test| |SHIELD:png:pySVModel-lib-status| |SHIELD:png:pySVModel-codacy-quality| |SHIELD:png:pySVModel-codacy-coverage| |SHIELD:png:pySVModel-codecov-coverage| --------------------------------------------------------------------------------- +.. Disabled shields: |SHIELD:png:pySVModel-lib-dep| |SHIELD:png:pySVModel-req-status| |SHIELD:png:pySVModel-lib-rank| The pySVModel Documentation ########################### @@ -47,7 +56,6 @@ Use Cases * TBD - .. _news: News @@ -70,9 +78,9 @@ News Contributors ************ -* `Patrick Lehmann `__ (Maintainer) -* `Unai Martinez-Corral `__ -* `and more... `__ +* `Patrick Lehmann `__ (Maintainer) +* `Unai Martinez-Corral `__ +* `and more... `__ License @@ -96,6 +104,10 @@ License This document was generated on |docdate|. +.. toctree:: + :hidden: + + Used as a layer of EDA² ➚ .. toctree:: :caption: Introduction diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 00000000..922152e9 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/make.ps1 b/doc/make.ps1 new file mode 100644 index 00000000..3bafa6fa --- /dev/null +++ b/doc/make.ps1 @@ -0,0 +1,323 @@ +# .SYNOPSIS +# Please use '.\make.ps1 -' where is one of: +# html, dirhtml, singlehtml, pickle, json, linkcheck +# +# .DESCRIPTION +# This is a front-end script for Sphinx. +# +# .EXAMPLE +# .\make.ps1 -clean +# Cleanup the build directory. +# .EXAMPLE +# .\make.ps1 -html +# Build documentation as HTML pages. +# .EXAMPLE +# .\make.ps1 -clean -html -linkcheck +# Combine multiple commands in a single call +# +# +# ========================================================================== +# Copyright � 2016 Patrick Lehmann - Dresden, Germany +# ========================================================================== +[CmdletBinding()] +param( + # Make all targets + [switch]$all = $false, + # Extract VHDL documentation + [switch]$PoC = $false, + # Make standalone HTML files + [switch]$html = $false, + # Make HTML files named index.html in directories + [switch]$dirhtml = $false, + # Make a single large HTML file + [switch]$singlehtml = $false, + # Make a PDF file + [switch]$latex = $false, + [switch]$pdf = $false, + # Make pickle files + [switch]$pickle = $false, + # Make json files + [switch]$json = $false, + # Check all external links for integrity + [switch]$linkcheck = $false, + # Clean up directory before running Sphinx. + [switch]$changes = $false, + # Show changed files. + [switch]$clean = $false, + [switch]$cleanup = $false, + # Show the embedded help page(s). + [switch]$help = $false +) + +# resolve paths +$WorkingDir = Get-Location +$SphinxRootDir = Convert-Path (Resolve-Path ($PSScriptRoot)) + +# set default values +$EnableVerbose = $PSCmdlet.MyInvocation.BoundParameters["Verbose"] +$EnableDebug = $PSCmdlet.MyInvocation.BoundParameters["Debug"] +if ($EnableVerbose -eq $null) { $EnableVerbose = $false } +if ($EnableDebug -eq $null) { $EnableDebug = $false } +if ($EnableDebug -eq $true) { $EnableVerbose = $true } + +# Display help if no command was selected +$Help = $Help -or (-not ($all -or $PoC -or $html -or $dirhtml -or $singlehtml -or $latex -or $pdf -or $json -or $pickle -or $linkcheck -or $changes -or $clean -or $help)) + +function Exit-Script +{ <# + .PARAMETER ExitCode + ExitCode of this script run + #> + [CmdletBinding()] + param([int]$ExitCode = 0) + + # restore environment + # rm env:GHDL -ErrorAction SilentlyContinue + + cd $WorkingDir + + # unload modules + # Remove-Module precompile -Verbose:$false + + Pop-EnvironmentBlock + # exit with exit code + exit $ExitCode +} + +if ($Help) +{ Get-Help $MYINVOCATION.InvocationName -Detailed + Exit-Script +} + +Push-EnvironmentBlock +$env:Path += ";C:\Tools\Graphviz\2.38\bin" + +if ($PoC) +{ cd "$SphinxRootDir" + py -3 poc.py + Write-Host "Complete" -Foreground Green +} + +if ($All) +{ $clean = $true + $html = $true + $dirhtml = $true + $singlehtml = $true +} + +$SphinxBuild = if (-not $env:SPHINXBUILD) { "sphinx-build" } else { $env:SPHINXBUILD } +# $BuildDir = "$SphinxRootDir\{{ rbuilddir }}" +# $SourceDir = "$SphinxRootDir\{{ rsrcdir }}" +$BuildDir = "$SphinxRootDir\_build" # for local testing, can be removed in the future +$SourceDir = "$SphinxRootDir\." # for local testing, can be removed in the future +$AllSphinxOpts = "-d $BuildDir\doctrees ${env:SPHINXOPTS} $SourceDir" +$I18NSphinxOpts = "${env:SPHINXOPTS} $SourceDir" +# ------------------------------------------------------------------------------ +# TODO: add paper options +# ------------------------------------------------------------------------------ +# if NOT "%PAPER%" == "" ( +# set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% +# set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +# ) + +# Check if sphinx-build is available and fallback to Python version if any +# ------------------------------------------------------------------------------ +# TODO: add testings if sphinxbuild can be called and/or is installed +# ------------------------------------------------------------------------------ +# %SPHINXBUILD% 1>NUL 2>NUL +# if errorlevel 9009 goto sphinx_python +# goto sphinx_ok +# +# :sphinx_python +# +# set SPHINXBUILD=python -m sphinx.__init__ +# %SPHINXBUILD% 2> nul +# if errorlevel 9009 ( +# echo. +# echo.The 'sphinx-build' command was not found. Make sure you have Sphinx +# echo.installed, then set the SPHINXBUILD environment variable to point +# echo.to the full path of the 'sphinx-build' executable. Alternatively you +# echo.may add the Sphinx directory to PATH. +# echo. +# echo.If you don't have Sphinx installed, grab it from +# echo.http://sphinx-doc.org/ +# exit /b 1 +# ) + + +if ($clean) +{ $EnableVerbose -and (Write-Host "Cleaning build directory '$BuildDir'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " dir -Path $BuildDir * -Directory | rmdir -Recurse" ) | Out-Null + if (Test-Path $BuildDir) + { dir -Path $BuildDir * -Directory | rmdir -Recurse } + + $EnableVerbose -and (Write-Host "Cleaning autoapi directory '$SphinxRootDir\PyInfrastructure'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " dir -Path $SphinxRootDir\PyInfrastructure *.rst | ? {$_.FullName -NotMatch 'index.rst'} | rmdir -Recurse" ) | Out-Null + dir -Path $SphinxRootDir\PyInfrastructure *.rst | ? {$_.FullName -NotMatch 'index.rst'} | rmdir -Recurse + + Write-Host "Cleaning finished." -Foreground Green +} + +if ($pickle) +{ $expr = "$SphinxBuild -b pickle $AllSphinxOpts $BuildDir\pickle" + $EnableVerbose -and (Write-Host "Building target 'pickle' into '$BuildDir\pickle'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. Now you can process the pickle files." -Foreground Green +} + +if ($html) +{ $expr = "$SphinxBuild -b html" + $expr += " -t PoCInternal" + if ($cleanup) + { $expr += " -t PoCCleanUp" } + + $expr += " $AllSphinxOpts $BuildDir\html" + $EnableVerbose -and (Write-Host "Building target 'html' into '$BuildDir\html'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. The HTML pages are in $BuildDir\html." -Foreground Green +} + +if ($dirhtml) +{ $expr = "$SphinxBuild -b dirhtml $AllSphinxOpts $BuildDir\dirhtml" + $EnableVerbose -and (Write-Host "Building target 'dirhtml' into '$BuildDir\dirhtml'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. The HTML pages are in $BuildDir\dirhtml." -Foreground Green +} + +if ($singlehtml) +{ $expr = "$SphinxBuild -b singlehtml $AllSphinxOpts $BuildDir\singlehtml" + $EnableVerbose -and (Write-Host "Building target 'singlehtml' into '$BuildDir\singlehtml'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. The HTML file is in $BuildDir\singlehtml." -Foreground Green +} + +if ($latex) +{ $expr = "$SphinxBuild -b latex $AllSphinxOpts $BuildDir\pdf" + $EnableVerbose -and (Write-Host "Building target 'latex' into '$BuildDir\pdf'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. The LaTeX sources are in $BuildDir\pdf." -Foreground Green +} +if ($pdf) +{ cd "$BuildDir\pdf" + + # Write-Host "Patching LaTeX file..." -Foreground Yellow + # $strippedFileContent = "" + # $state = 0 + # foreach ($line in (cat "$BuildDir\pdf\ThePoC-Library.tex" -Encoding UTF8)) + # { if ($state -lt 3) + # { if ($line.StartsWith("\ifPDFTeX")) + # { $state = 1 + # $strippedFileContent += "\usepackage[utf8]{inputenc}`r`n\ifdefined\DeclareUnicodeCharacter`r`n \DeclareUnicodeCharacter{00A0}{\nobreakspace}`r`n \DeclareUnicodeCharacter{2265}{$\geq$}`r`n \DeclareUnicodeCharacter{21D2}{$\Rightarrow$}`r`n\fi`r`n" + # continue + # } + # elseif ($line.StartsWith("\fi")) + # { $state += 1 + # continue + # } + # if ($state -eq 0) + # { $strippedFileContent += $line + "`r`n" } + # } + # else + # { $strippedFileContent += $line + "`r`n" } + # } + # $strippedFileContent | Out-File "$BuildDir\pdf\The-PoC-Library.tex" -Encoding UTF8 + # Write-Host "Patching finished. The new LaTeX file is in $BuildDir\pdf." -Foreground Green + + cp "$BuildDir\pdf\ThePoC-Library.tex" "$BuildDir\pdf\The-PoC-Library.tex" + + $expr = "pdflatex.exe $BuildDir\pdf\The-PoC-Library.tex" + $EnableVerbose -and (Write-Host "Building target 'pdf' into '$BuildDir\pdf'..." -Foreground DarkCyan ) | Out-Null + Write-Host "Compiling with pdflatex.exe..." -Foreground Yellow + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + + $expr = "makeindex.exe .\The-PoC-Library.idx" + Write-Host "Creating index with makeindex.exe..." -Foreground Yellow + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + + $expr = "pdflatex.exe $BuildDir\pdf\The-PoC-Library.tex" + Write-Host "Compiling with pdflatex.exe..." -Foreground Yellow + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. The PDF file is in $BuildDir\pdf." -Foreground Green +} + +if ($json) +{ $expr = "$SphinxBuild -b json $AllSphinxOpts $BuildDir\json" + $EnableVerbose -and (Write-Host "Building target 'json' into '$BuildDir\json'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Build finished. Now you can process the json files." -Foreground Green +} + +if ($linkcheck) +{ $expr = "$SphinxBuild -b linkcheck $AllSphinxOpts $BuildDir\linkcheck" + $EnableVerbose -and (Write-Host "Building target 'html' into '$BuildDir\html'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Link check complete. Look for any errors in the above output or in $BuildDir\linkcheck\output.txt." -Foreground Green +} + +if ($changes) +{ $expr = "$SphinxBuild -b changes $AllSphinxOpts $BuildDir\changes" + $EnableVerbose -and (Write-Host "Building target 'changes' into '$BuildDir\changes'..." -Foreground DarkCyan ) | Out-Null + $EnableDebug -and (Write-Host " $expr" -Foreground Cyan ) | Out-Null + Invoke-Expression $expr + if ($LastExitCode -ne 0) + { Exit-Script 1 } + Write-Host "Searching for changes complete. Look for any errors in the above output or in $BuildDir\changes\output.txt." -Foreground Green +} + +if ($PoC) +{ cd "$SphinxRootDir" + Write-Host "Expanding labels..." -Foreground Yellow + py -3 ..\temp\sphinx\inventory.py --file _build\html\objects.inv --rst > ..\temp\sphinx\PoC.inventory.rst + + Write-Host "Stripping file from Python labels..." -Foreground Yellow + $strippedFileContent = "" + $skip = $false + foreach ($line in (cat ..\temp\sphinx\PoC.inventory.rst -Encoding UTF8)) + { if ($line -match "^`t:py:(exception|class|classmethod|staticmethod|module|function|method|prefix):\w") + { $skip = $true + # Write-Host "$line" -Foreground Gray + continue + } + if ($line -match "^`t`t:Title:`t-") + { $skip = $false + # Write-Host "$line" -Foreground DarkCyan + continue + } + if (-not $skip) + { $strippedFileContent += $line + "`r`n" + } + } + $strippedFileContent | Out-File ..\temp\sphinx\PoC.stripped.rst -Encoding UTF8 + Write-Host "Complete" -Foreground Green +} + +Exit-Script diff --git a/doc/requirements.txt b/doc/requirements.txt index 210a4581..10d5f305 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,22 +1,8 @@ -r ../requirements.txt -# Enforce latest version on ReadTheDocs -sphinx>=4.2.0 + +sphinx>=4.3.0 # Sphinx Extenstions -#sphinx.ext.coverage -#sphinxcontrib-actdiag>=0.8.5 -#sphinxcontrib-seqdiag>=0.8.5 -#sphinxcontrib-textstyle>=0.2.1 -#sphinxcontrib-spelling>=2.2.0 autoapi sphinx_fontawesome>=0.0.6 sphinx_autodoc_typehints>=1.12.0 -# changelog>=0.3.5 - -# BuildTheDocs Extensions (mostly patched Sphinx extensions) -#btd.sphinx.autoprogram>=0.1.6.post1 -#btd.sphinx.graphviz>=2.3.1.post1 -#btd.sphinx.inheritance_diagram>=2.3.1.post1 - -# Enforce newer version on ReadTheDocs (currently using 2.3.1) -Pygments>=2.10.0 diff --git a/doc/shields.inc b/doc/shields.inc index 2e2a1653..fd690409 100644 --- a/doc/shields.inc +++ b/doc/shields.inc @@ -4,197 +4,187 @@ # percent encoding so that the URL is properly parsed. .. # Sourcecode link to GitHub -.. |SHIELD:svg:pySVModel-github| image:: https://img.shields.io/badge/edaa--org-pySVModel-323131?logo=github&longCache=true +.. |SHIELD:svg:pySVModel-github| image:: https://img.shields.io/badge/pyEDAA-pySVModel-29b6f6.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=0277bd :alt: Sourcecode on GitHub :height: 22 - :target: https://github.com/edaa-org/pySVModel -.. |SHIELD:png:pySVModel-github| image:: https://raster.shields.io/badge/edaa--org-pySVModel-323131?logo=github&longCache=true + :target: https://GitHub.com/edaa-org/pySVModel +.. |SHIELD:png:pySVModel-github| image:: https://raster.shields.io/badge/pyEDAA-pySVModel-29b6f6.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=0277bd :alt: Sourcecode on GitHub :height: 22 - :target: https://github.com/edaa-org/pySVModel + :target: https://GitHub.com/edaa-org/pySVModel .. # Sourcecode license -.. |SHIELD:svg:pySVModel-src-license| image:: https://img.shields.io/pypi/l/pySVModel?logo=GitHub&label=code%20license +.. |SHIELD:svg:pySVModel-src-license| image:: https://img.shields.io/pypi/l/pySVModel?longCache=true&style=flat-square&logo=Apache&label=code :alt: Code license :height: 22 - :target: Code-License.html -.. |SHIELD:png:pySVModel-src-license| image:: https://img.shields.io/pypi/l/pySVModel?logo=GitHub&label=code%20license + :target: License.html +.. |SHIELD:png:pySVModel-src-license| image:: https://img.shields.io/pypi/l/pySVModel?longCache=true&style=flat-square&logo=Apache&label=code :alt: Code license :height: 22 - :target: https://github.com/edaa-org/pySVModel/blob/main/LICENSE.md + :target: https://GitHub.com/edaa-org/pySVModel/blob/main/LICENSE.md .. # GitHub tag -.. |SHIELD:svg:pySVModel-tag| image:: https://img.shields.io/github/v/tag/edaa-org/pySVModel?logo=GitHub&include_prereleases +.. |SHIELD:svg:pySVModel-tag| image:: https://img.shields.io/github/v/tag/edaa-org/pySVModel?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/pySVModel/tags -.. |SHIELD:png:pySVModel-tag| image:: https://raster.shields.io/github/v/tag/edaa-org/pySVModel?logo=GitHub&include_prereleases + :target: https://GitHub.com/edaa-org/pySVModel/tags +.. |SHIELD:png:pySVModel-tag| image:: https://raster.shields.io/github/v/tag/edaa-org/pySVModel?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/pySVModel/tags + :target: https://GitHub.com/edaa-org/pySVModel/tags .. # GitHub release -.. |SHIELD:svg:pySVModel-release| image:: https://img.shields.io/github/v/release/edaa-org/pySVModel?logo=GitHub&include_prereleases +.. |SHIELD:svg:pySVModel-release| image:: https://img.shields.io/github/v/release/edaa-org/pySVModel?longCache=true&style=flat-square&logo=GitHub&include_prereleases :alt: GitHub release (latest SemVer incl. including pre-releases :height: 22 - :target: https://github.com/edaa-org/pySVModel/releases/latest -.. |SHIELD:png:pySVModel-release| image:: https://raster.shields.io/github/v/release/edaa-org/pySVModel?logo=GitHub&include_prereleases + :target: https://GitHub.com/edaa-org/pySVModel/releases/latest +.. |SHIELD:png:pySVModel-release| image:: https://raster.shields.io/github/v/release/edaa-org/pySVModel?longCache=true&style=flat-square&logo=GitHub&include_prereleases :alt: GitHub release (latest SemVer incl. including pre-releases :height: 22 - :target: https://github.com/edaa-org/pySVModel/releases/latest + :target: https://GitHub.com/edaa-org/pySVModel/releases/latest .. # GitHub release date -.. |SHIELD:svg:pySVModel-date| image:: https://img.shields.io/github/release-date/edaa-org/pySVModel?logo=GitHub +.. |SHIELD:svg:pySVModel-date| image:: https://img.shields.io/github/release-date/edaa-org/pySVModel?longCache=true&style=flat-square&logo=GitHub :alt: GitHub release date :height: 22 - :target: https://github.com/edaa-org/pySVModel/releases + :target: https://GitHub.com/edaa-org/pySVModel/releases .. |SHIELD:png:pySVModel-date| image:: https://raster.shields.io/github/release-date/edaa-org/pySVModel?logo=GitHub :alt: GitHub release date :height: 22 - :target: https://github.com/edaa-org/pySVModel/releases + :target: https://GitHub.com/edaa-org/pySVModel/releases .. # GitHub/Libraries dependent projects -.. |SHIELD:svg:pySVModel-lib-dep| image:: https://img.shields.io/librariesio/dependent-repos/pypi/pySVModel +.. |SHIELD:svg:pySVModel-lib-dep| image:: https://img.shields.io/librariesio/dependent-repos/pypi/pySVModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Dependent repos (via libraries.io) :height: 22 - :target: https://github.com/edaa-org/pySVModel/network/dependents -.. |SHIELD:png:pySVModel-lib-dep| image:: https://raster.shields.io/librariesio/dependent-repos/pypi/pySVModel + :target: https://GitHub.com/edaa-org/pySVModel/network/dependents +.. |SHIELD:png:pySVModel-lib-dep| image:: https://raster.shields.io/librariesio/dependent-repos/pypi/pySVModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Dependent repos (via libraries.io) :height: 22 - :target: https://github.com/edaa-org/pySVModel/network/dependents + :target: https://GitHub.com/edaa-org/pySVModel/network/dependents .. # GHA test and coverage -.. |SHIELD:svg:pySVModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Test%20and%20Coverage?label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF +.. |SHIELD:svg:pySVModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish/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/pySVModel/actions?query=workflow%3A%22Test+and+Coverage%22 -.. |SHIELD:png:pySVModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Test%20and%20Coverage?label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF + :target: https://GitHub.com/edaa-org/pySVModel/actions?query=workflow%3A%22Test+and+Coverage%22 +.. |SHIELD:png:pySVModel-gha-test| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Unit%20Testing,%20Coverage%20Collection,%20Package,%20Release,%20Documentation%20and%20Publish/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/pySVModel/actions?query=workflow%3A%22Test+and+Coverage%22 + :target: https://GitHub.com/edaa-org/pySVModel/actions?query=workflow%3A%22Test+and+Coverage%22 .. # Codacy - quality -.. |SHIELD:svg:pySVModel-codacy-quality| image:: https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?logo=codacy +.. |SHIELD:svg:pySVModel-codacy-quality| image:: https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Quality :height: 22 :target: https://www.codacy.com/gh/edaa-org/pySVModel -.. |SHIELD:png:pySVModel-codacy-quality| image:: https://raster.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?logo=codacy +.. |SHIELD:png:pySVModel-codacy-quality| image:: https://raster.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Quality :height: 22 :target: https://www.codacy.com/gh/edaa-org/pySVModel .. # Codacy - coverage -.. |SHIELD:svg:pySVModel-codacy-coverage| image:: https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?logo=codacy +.. |SHIELD:svg:pySVModel-codacy-coverage| image:: https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Line Coverage :height: 22 :target: https://www.codacy.com/gh/edaa-org/pySVModel -.. |SHIELD:png:pySVModel-codacy-coverage| image:: https://raster.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?logo=codacy +.. |SHIELD:png:pySVModel-codacy-coverage| image:: https://raster.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=codacy :alt: Codacy - Line Coverage :height: 22 :target: https://www.codacy.com/gh/edaa-org/pySVModel .. # Codecov - coverage -.. |SHIELD:svg:pySVModel-codecov-coverage| image:: https://img.shields.io/codecov/c/github/edaa-org/pySVModel +.. |SHIELD:svg:pySVModel-codecov-coverage| image:: https://img.shields.io/codecov/c/github/edaa-org/pySVModel?longCache=true&style=flat-square&logo=Codecov :alt: Codecov - Branch Coverage :height: 22 :target: https://codecov.io/gh/edaa-org/pySVModel -.. |SHIELD:png:pySVModel-codecov-coverage| image:: https://raster.shields.io/codecov/c/github/edaa-org/pySVModel +.. |SHIELD:png:pySVModel-codecov-coverage| image:: https://raster.shields.io/codecov/c/github/edaa-org/pySVModel?longCache=true&style=flat-square&logo=Codecov :alt: Codecov - Branch Coverage :height: 22 :target: https://codecov.io/gh/edaa-org/pySVModel .. # Libraries - source rank -.. |SHIELD:svg:pySVModel-lib-rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/pySVModel +.. |SHIELD:svg:pySVModel-lib-rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/pySVModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io SourceRank :height: 22 :target: https://libraries.io/github/edaa-org/pySVModel/sourcerank -.. |SHIELD:png:pySVModel-lib-rank| image:: https://raster.shields.io/librariesio/sourcerank/pypi/pySVModel +.. |SHIELD:png:pySVModel-lib-rank| image:: https://raster.shields.io/librariesio/sourcerank/pypi/pySVModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff :alt: Libraries.io SourceRank :height: 22 :target: https://libraries.io/github/edaa-org/pySVModel/sourcerank -.. # GHA release -.. |SHIELD:svg:pySVModel-gha-release| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Release?label=release&logo=GitHub%20Actions&logoColor=FFFFFF - :alt: GitHub Workflow - Release Status - :height: 22 - :target: https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Release%22 -.. |SHIELD:png:pySVModel-gha-release| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Release?label=release&logo=GitHub%20Actions&logoColor=FFFFFF - :alt: GitHub Workflow - Release Status - :height: 22 - :target: https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Release%22 - .. # PyPI tag -.. |SHIELD:svg:pySVModel-pypi-tag| image:: https://img.shields.io/pypi/v/pySVModel?logo=PyPI +.. |SHIELD:svg:pySVModel-pypi-tag| image:: https://img.shields.io/pypi/v/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Tag :height: 22 :target: https://pypi.org/project/pySVModel/ -.. |SHIELD:png:pySVModel-pypi-tag| image:: https://raster.shields.io/pypi/v/pySVModel?logo=PyPI +.. |SHIELD:png:pySVModel-pypi-tag| image:: https://raster.shields.io/pypi/v/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Tag :height: 22 :target: https://pypi.org/project/pySVModel/ .. # PyPI project status -.. |SHIELD:svg:pySVModel-pypi-status| image:: https://img.shields.io/pypi/status/pySVModel?logo=PyPI +.. |SHIELD:svg:pySVModel-pypi-status| image:: https://img.shields.io/pypi/status/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Status :height: 22 -.. |SHIELD:png:pySVModel-pypi-status| image:: https://raster.shields.io/pypi/status/pySVModel?logo=PyPI +.. |SHIELD:png:pySVModel-pypi-status| image:: https://raster.shields.io/pypi/status/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Status :height: 22 .. # PyPI Python versions -.. |SHIELD:svg:pySVModel-pypi-python| image:: https://img.shields.io/pypi/pyversions/pySVModel?logo=PyPI +.. |SHIELD:svg:pySVModel-pypi-python| image:: https://img.shields.io/pypi/pyversions/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Python Version :height: 22 -.. |SHIELD:png:pySVModel-pypi-python| image:: https://raster.shields.io/pypi/pyversions/pySVModel?logo=PyPI +.. |SHIELD:png:pySVModel-pypi-python| image:: https://raster.shields.io/pypi/pyversions/pySVModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072 :alt: PyPI - Python Version :height: 22 .. # Libraries - status -.. |SHIELD:svg:pySVModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pySVModel +.. |SHIELD:svg:pySVModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pySVModel?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/pySVModel -.. |SHIELD:png:pySVModel-lib-status| image:: https://raster.shields.io/librariesio/release/pypi/pySVModel +.. |SHIELD:png:pySVModel-lib-status| image:: https://raster.shields.io/librariesio/release/pypi/pySVModel?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/pySVModel .. # Requires - status -.. |SHIELD:svg:pySVModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pySVModel +.. |SHIELD:svg:pySVModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pySVModel?longCache=true&style=flat-square :alt: Requires.io :height: 22 :target: https://requires.io/github/edaa-org/pySVModel/requirements/?branch=main -.. |SHIELD:png:pySVModel-req-status| image:: https://raster.shields.io/requires/github/edaa-org/pySVModel +.. |SHIELD:png:pySVModel-req-status| image:: https://raster.shields.io/requires/github/edaa-org/pySVModel?longCache=true&style=flat-square :alt: Requires.io :height: 22 :target: https://requires.io/github/edaa-org/pySVModel/requirements/?branch=main -.. # GHA - documentation -.. |SHIELD:svg:pySVModel-gha-doc| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Documentation?label=Documentation&logo=GitHub%20Actions&logoColor=FFFFFF - :alt: GitHub Workflow - Documentation Status - :height: 22 - :target: https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Documentation%22 -.. |SHIELD:png:pySVModel-gha-doc| image:: https://img.shields.io/github/workflow/status/edaa-org/pySVModel/Documentation?label=Documentation&logo=GitHub%20Actions&logoColor=FFFFFF - :alt: GitHub Workflow - Documentation Status - :height: 22 - :target: https://github.com/edaa-org/pySVModel/actions?query=workflow%3A%22Documentation%22 - .. # Documentation license -.. |SHIELD:svg:pySVModel-doc-license| image:: https://img.shields.io/badge/doc%20license-CC--BY%204.0-green +.. |SHIELD:svg:pySVModel-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:pySVModel-doc-license| image:: https://img.shields.io/badge/doc%20license-CC--BY%204.0-green +.. |SHIELD:png:pySVModel-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/pySVModel/blob/main/doc/Doc-License.rst + :target: https://GitHub.com/edaa-org/pySVModel/blob/main/doc/Doc-License.rst .. # GHPages - read now -.. |SHIELD:svg:pySVModel-ghp-doc| image:: https://img.shields.io/badge/doc-read%20now%20%E2%9E%94-blueviolet +.. |SHIELD:svg:pySVModel-ghp-doc| image:: https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpySVModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpySVModel%2Findex.html :alt: Documentation - Read Now! :height: 22 :target: https://edaa-org.github.io/pySVModel/ -.. |SHIELD:png:pySVModel-ghp-doc| image:: https://img.shields.io/badge/doc-read%20now%20%E2%9E%94-blueviolet +.. |SHIELD:png:pySVModel-ghp-doc| image:: https://raster.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpySVModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpySVModel%2Findex.html :alt: Documentation - Read Now! :height: 22 :target: https://edaa-org.github.io/pySVModel/ + +.. # Gitter +.. |SHIELD:svg:pySVModel-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:pySVModel-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/pySVModel/__init__.py b/pySVModel/__init__.py index f08cd2a3..a9cd17c5 100644 --- a/pySVModel/__init__.py +++ b/pySVModel/__init__.py @@ -42,10 +42,10 @@ from enum import unique, Enum from typing import Dict, Union -from pydecor import export +from pyTooling.Decorators import export -__version__ = "0.3.0" +__version__ = "0.3.1" @export diff --git a/requirements.txt b/requirements.txt index b0f362ae..805d01a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pydecor>=2.0.1 +pyTooling>=1.4.4 diff --git a/setup.py b/setup.py index 5eae7380..198f8b7d 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,10 @@ # ============================================================================= -# ____ _ __ __ _ _ __ __ _ _ -# _ __ _ _/ ___| _ _ ___| |_ ___ _ __ __\ \ / /__ _ __(_) | ___ __ _| \/ | ___ __| | ___| | -# | '_ \| | | \___ \| | | / __| __/ _ \ '_ ` _ \ \ / / _ \ '__| | |/ _ \ / _` | |\/| |/ _ \ / _` |/ _ \ | -# | |_) | |_| |___) | |_| \__ \ || __/ | | | | \ V / __/ | | | | (_) | (_| | | | | (_) | (_| | __/ | -# | .__/ \__, |____/ \__, |___/\__\___|_| |_| |_|\_/ \___|_| |_|_|\___/ \__, |_| |_|\___/ \__,_|\___|_| -# |_| |___/ |___/ |___/ +# ______ ____ __ _ _ +# _ __ _ _/ ___\ \ / / \/ | ___ __| | ___| | +# | '_ \| | | \___ \\ \ / /| |\/| |/ _ \ / _` |/ _ \ | +# | |_) | |_| |___) |\ V / | | | | (_) | (_| | __/ | +# | .__/ \__, |____/ \_/ |_| |_|\___/ \__,_|\___|_| +# |_| |___/ # ============================================================================== # Authors: Patrick Lehmann # @@ -30,10 +30,15 @@ # ============================================================================ # from pathlib import Path -from setuptools import setup as setuptools_setup, find_packages as setuptools_find_packages +from setuptools import ( + setup as setuptools_setup, + find_packages as setuptools_find_packages +) -gitHubNamespace = "edaa-org" -projectName = "pySVModel" +gitHubNamespace = "edaa-org" +projectName = "pySVModel" +projectNameWithPrefix = projectName +version = "0.3.1" # Read README for upload to PyPI readmeFile = Path("README.md") @@ -46,13 +51,13 @@ 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) +sourceCodeURL = f"https://GitHub.com/{gitHubNamespace}/{projectName}" +documentationURL = f"https://{gitHubNamespace}.github.io/{projectName}" # Assemble all package information setuptools_setup( name=projectName, - version="0.3.0", + version=version, author="Patrick Lehmann", author_email="Paebbels@gmail.com", @@ -66,13 +71,13 @@ url=sourceCodeURL, project_urls={ - 'Documentation': documentationURL, - 'Source Code': sourceCodeURL, - 'Issue Tracker': sourceCodeURL + "/issues" + 'Documentation': f"{documentationURL}", + 'Source Code': f"{sourceCodeURL}", + 'Issue Tracker': f"{sourceCodeURL}/issues" }, - # download_url="https://github.com/edaa-org/pySVModel/tarball/0.1.0", + # download_url="https://GitHub.com/edaa-org/pySVModel/tarball/0.1.0", - packages=setuptools_find_packages(exclude=["tests", "tests.*",]), + packages=setuptools_find_packages(exclude=["doc", "doc.*", "tests", "tests.*",]), classifiers=[ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", @@ -81,6 +86,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Development Status :: 3 - Alpha", # "Development Status :: 4 - Beta", # "Development Status :: 5 - Production/Stable", diff --git a/tests/requirements.txt b/tests/requirements.txt index ad895b40..060ed9f5 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,12 @@ -r ../requirements.txt # Coverage collection -Coverage>=6.0 +Coverage>=6.1 # 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.4