Skip to content

Commit

Permalink
Initial Code Contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Oct 4, 2021
2 parents 85f6492 + 4e49ad5 commit 77fd434
Show file tree
Hide file tree
Showing 62 changed files with 5,706 additions and 16 deletions.
9 changes: 9 additions & 0 deletions .btd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: doc
output: _build
requirements: requirements.txt
target: gh-pages
formats: [ html, pdf, man ]
images:
base: edaa/doc
latex: btdi/latex
theme: https://codeload.github.com/buildthedocs/sphinx.theme/tar.gz/v1
30 changes: 30 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
root = true

[*]
charset = utf-8
# end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
tab_width = 2


[*.py]
indent_style = tab
indent_size = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.{json,ini}]
indent_style = tab
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.rst]
indent_style = space
indent_size = 3
82 changes: 75 additions & 7 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
include:
- {python: 3.6, icon: 🔴}
# - {python: 3.6, icon: 🔴}
- {python: 3.7, icon: 🟠}
- {python: 3.8, icon: 🟡}
- {python: 3.9, icon: 🟢}
Expand Down Expand Up @@ -49,8 +49,10 @@ jobs:

env:
PYTHON: 3.9
ARTIFACT: pyEDAA-ProjectModel-coverage-html
outputs:
python: ${{ env.PYTHON }}
artifact: ${{ env.ARTIFACT }}

steps:
- name: ⏬ Checkout repository
Expand All @@ -75,6 +77,10 @@ jobs:
run: |
coverage xml
- name: Convert to HTML format
run: |
coverage html
- name: 📊 Publish coverage at CodeCov
continue-on-error: true
uses: codecov/codecov-action@v1
Expand All @@ -90,6 +96,55 @@ jobs:
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

StaticTypeCheck:
name: 📈 Check Static Typing using Python 3.9
runs-on: ubuntu-latest

env:
PYTHON: 3.9
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: |
mypy --html-report htmlmypy --pretty 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
Expand All @@ -98,6 +153,7 @@ jobs:
needs:
- UnitTesting
- Coverage
- StaticTypeCheck

env:
PYTHON: ${{ needs.Coverage.outputs.python }}
Expand Down Expand Up @@ -232,43 +288,55 @@ jobs:

# needs:
# - 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 vhdl/doc - <<-EOF
docker build -t edaa/doc - <<-EOF
FROM btdi/sphinx:featured
RUN apk add -U --no-cache graphviz
EOF
- name: 🛳️ Build documentation from './pyEDAA.ProjectModel/doc'
- name: 🛳️ Build documentation using container edaa/doc and publish to GitHub Pages
uses: buildthedocs/btd@v0
with:
token: ${{ github.token }}

- name: 📤 Upload artifacts to GitHub Pages
- name: 📤 Upload 'documentation' artifacts
uses: actions/upload-artifact@master
with:
name: doc
name: ${{ env.ARTIFACT }}
path: doc/_build/html
retention-days: 7

ArtifactCleanUp:
name: 🗑️ Artifact Cleanup
runs-on: ubuntu-latest

needs:
- Coverage
- StaticTypeCheck
- Package
- PublishOnPyPI

env:
ARTIFACT: ${{ needs.Package.outputs.artifact }}
COVERAGE: ${{ needs.Coverage.outputs.artifact }}
TYPING: ${{ needs.StaticTypeCheck.outputs.artifact }}
PACKAGE: ${{ needs.Package.outputs.artifact }}

steps:
- name: 🗑️ Delete all Artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: |
${{ env.ARTIFACT }}
${{ env.PACKAGE }}
# ${{ env.COVERAGE }}
# ${{ env.TYPING }}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Python cache and object files
__pycache__/
*.py[cod]

# Coverage.py
.coverage
.cov
coverage.xml

# setuptools
/build
/dist
/*.egg-info

# Sphinx
doc/_build/
doc/pyEDAA.ProjectModel/**/*.*
!doc/pyEDAA.ProjectModel/index.rst

# BuildTheDocs
doc/_theme/**/*.*

# IntelliJ project files
/.idea/workspace.xml
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/pyEDAA.ProjectModel.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@


```python
print(some.python.code.here())
from pathlib import Path
from pyEDAA.ProjectModel import Project, Design, FileSet, VHDLSourceFile

projectPath = Path("temp/project")
project = Project("project", rootDirectory=projectPath)
design = Design("design", project=project)
fileset = FileSet("uart", Path("src/uart"), design=design)

for vhdlFilePath in fileset.ResolvedPath.glob("*.vhdl"):
vhdlFile = VHDLSourceFile(vhdlFilePath)
fileset.AddFile(vhdlFile)
```


Expand Down
12 changes: 12 additions & 0 deletions doc/ChangeLog/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ChangeLog
#########

Upcoming Release
================

* tbd

01.09.2021
==========

`pyEDAA.ProjectModel` was split from `pyIPCMI` (v1.1.6) as an independent Python package.
88 changes: 88 additions & 0 deletions doc/Dependency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.. _dependency:

Dependency
##########

.. |img-ProjectModel-lib-status| image:: https://img.shields.io/librariesio/release/pypi/pyEDAA.ProjectModel
:alt: Libraries.io status for latest release
:height: 22
:target: https://libraries.io/github/edaa-org/pyEDAA.ProjectModel
.. |img-ProjectModel-req-status| image:: https://img.shields.io/requires/github/edaa-org/pyEDAA.ProjectModel
:alt: Requires.io
:height: 22
:target: https://requires.io/github/edaa-org/pyEDAA.ProjectModel/requirements/?branch=master

+------------------------------------------+------------------------------------------+
| `Libraries.io <https://libraries.io/>`_ | `Requires.io <https://requires.io/>`_ |
+==========================================+==========================================+
| |img-ProjectModel-lib-status| | |img-ProjectModel-req-status| |
+------------------------------------------+------------------------------------------+


.. _dependency-package:

pyEDAA.ProjectModel Package
***************************

+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=======================================================+=============+===================================================================================+===================================================================================================================================+
| `pydecor <https://github.com/mplanchard/pydecor>`__ | ≥2.0.1 | `MIT <https://github.com/mplanchard/pydecor/blob/master/LICENSE>`__ | * `dill <https://github.com/uqfoundation/dill>`__ (`BSD 3-clause <https://github.com/uqfoundation/dill/blob/master/LICENSE>`__) |
| | | | * `six <https://github.com/benjaminp/six>`__ (`MIT <https://github.com/benjaminp/six/blob/master/LICENSE>`__) |
+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| `pyVHDLModel <https://github.com/VHDL/pyVHDLModel>`__ | ≥0.13.0 | `Apache License, 2.0 <https://github.com/VHDL/pyVHDLModel/blob/master/LICENSE>`__ | * `pydecor <https://github.com/mplanchard/pydecor>`__ (`MIT <https://github.com/mplanchard/pydecor/blob/master/LICENSE>`__) |
| | | | |
| | | | * `dill <https://github.com/uqfoundation/dill>`__ (`BSD 3-clause <https://github.com/uqfoundation/dill/blob/master/LICENSE>`__) |
| | | | * `six <https://github.com/benjaminp/six>`__ (`MIT <https://github.com/benjaminp/six/blob/master/LICENSE>`__) |
+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| `pySVModel <https://github.com/edaa-org/pySVModel>`__ | ≥0.3.0 | `Apache License, 2.0 <https://github.com/VHDL/pyVHDLModel/blob/master/LICENSE>`__ | * `pydecor <https://github.com/mplanchard/pydecor>`__ (`MIT <https://github.com/mplanchard/pydecor/blob/master/LICENSE>`__) |
| | | | |
| | | | * `dill <https://github.com/uqfoundation/dill>`__ (`BSD 3-clause <https://github.com/uqfoundation/dill/blob/master/LICENSE>`__) |
| | | | * `six <https://github.com/benjaminp/six>`__ (`MIT <https://github.com/benjaminp/six/blob/master/LICENSE>`__) |
+-------------------------------------------------------+-------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+


.. _dependency-testing:

Unit Testing / Coverage
***********************

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.

+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+===========================================================+=============+========================================================================================+======================+
| `pytest <https://github.com/pytest-dev/pytest>`__ | ≥6.2.4 | `MIT <https://github.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `pytest-cov <https://github.com/pytest-dev/pytest-cov>`__ | ≥2.12.1 | `MIT <https://github.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://github.com/nedbat/coveragepy>`__ | ≥6.0 | `Apache License, 2.0 <https://github.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+


.. _dependency-documentation:

Sphinx Documentation
********************

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 <https://github.com/sphinx-doc/sphinx>`__ | ≥4.2.0 | `BSD 3-Clause <https://github.com/sphinx-doc/sphinx/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinx_btd_theme <https://github.com/buildthedocs/sphinx.theme>`__ | | `MIT <https://github.com/buildthedocs/sphinx.theme/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `autoapi <https://github.com/carlos-jenkins/autoapi>`__ | | `Apache License, 2.0 <https://github.com/carlos-jenkins/autoapi/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| !! `sphinx_fontawesome <https://github.com/fraoustin/sphinx_fontawesome>`__ | ≥0.0.6 | `GPL 2.0 <https://github.com/fraoustin/sphinx_fontawesome/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinx_autodoc_typehints <https://github.com/agronholm/sphinx-autodoc-typehints>`__ | ≥1.12.0 | `MIT <https://github.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `Pygments <https://github.com/pygments/pygments>`__ | ≥2.9.0 | `BSD 2-Clause <https://github.com/pygments/pygments/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
Loading

0 comments on commit 77fd434

Please sign in to comment.