Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
# New Features
* Added editorconfig
* Added pyCharm project files.
* Enabled GHA workflow based on pyTooling/Actions.
* Added a (partial) program description based on pyTooling.CLIAbstraction.
  * GHDL
  * Docker
  * GTKWave
  * ModelSim
  * Active-HDL
  * Riviera-PRO
  * Quartus
  * Diamond
  * ISE
  * Vivado
* Added a list of supported and planned tool abstractions.
* Added a merged variant of "GHDL in Docker"
* Added Methods to derive GHDL variants (analyze, elaborate, simulate).
* Added a matching simple test case for the GHDL program class.
* Added setup.py for packaging.
* Basic documentation incl.
  * Installation instructions
  * Dependencies
  * Goals / features
  * Updated navigation bar
  * Links to reports (coverage, static typing)
  * License

# Changes
* Use `DEFAULT_CLASSIFIERS` in `setup.py`.
* Added option `-P<dir>` to GHDL.

# Bug Fixes
*None*

---

**Related PRs:**
* #6
* #7
* #8
  • Loading branch information
umarcor committed Jan 9, 2022
2 parents 036a8ed + 6c56419 commit 2fd5104
Show file tree
Hide file tree
Showing 39 changed files with 2,556 additions and 192 deletions.
30 changes: 30 additions & 0 deletions .editorconfig
@@ -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
86 changes: 56 additions & 30 deletions .github/workflows/Pipeline.yml
Expand Up @@ -3,10 +3,8 @@ name: Pipeline
on:
push:
workflow_dispatch:

defaults:
run:
shell: bash
schedule:
- cron: '0 0 * * 5'

jobs:

Expand All @@ -15,34 +13,47 @@ jobs:
with:
name: pyEDAA.CLITool

# 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 }}
#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:
# 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 }}
Coverage:
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 }}

# PublishTestResults:
# uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r0
# needs:
# - UnitTesting
StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r0
needs:
- Params
with:
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
requirements: '-r tests/requirements.txt'
commands: |
cd pyEDAA
mypy --html-report ../htmlmypy -p CLITool
report: 'htmlmypy'
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.typing }}

#PublishTestResults:
# uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r0
# needs:
# - UnitTesting

Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@r0
needs:
- Params
#- Coverage
- Coverage
with:
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.package }}
Expand All @@ -52,7 +63,8 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
needs:
#- UnitTesting
#- Coverage
- Coverage
- StaticTypeCheck
- Package

PublishOnPyPI:
Expand All @@ -64,14 +76,23 @@ jobs:
- Package
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:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@r0
# needs:
# - Params
# with:
# python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}

BuildTheDocs:
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@r0
needs:
- Params
#- VerifyDocs
with:
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }}

Expand All @@ -80,26 +101,31 @@ jobs:
needs:
- Params
- BuildTheDocs
#- Coverage
- Coverage
- StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }}
#coverage: ${{ fromJson(needs.Params.outputs.params).artifacts.coverage }}
coverage: ${{ fromJson(needs.Params.outputs.params).artifacts.coverage }}
typing: ${{ fromJson(needs.Params.outputs.params).artifacts.typing }}

ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0
needs:
- Params
#- UnitTesting
#- Coverage
- Coverage
- StaticTypeCheck
- BuildTheDocs
- PublishToGitHubPages
#- PublishTestResults
with:
package: ${{ fromJson(needs.Params.outputs.params).artifacts.package }}
remaining: |
${{ fromJson(needs.Params.outputs.params).artifacts.coverage }}
${{ fromJson(needs.Params.outputs.params).artifacts.typing }}
${{ fromJson(needs.Params.outputs.params).artifacts.doc }}
# ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}-3.6
# ${{ 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 }}
22 changes: 17 additions & 5 deletions .gitignore
Expand Up @@ -2,12 +2,24 @@
__pycache__/
*.py[cod]

# Coverage.py
.coverage
.cov
coverage.xml

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

# Dependencies
!requirements.txt

# Sphinx documentation
doc/_build
doc/_theme
/doc/_build/
/doc/_theme/
/doc/pyEDAA.CLITool/**/*.*
!/doc/pyEDAA.CLITool/index.rst

# PyCharm project
/.idea/workspace.xml

# VSCode settings
/.vscode
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.

4 changes: 4 additions & 0 deletions .idea/misc.xml

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

13 changes: 13 additions & 0 deletions .idea/pyEDAA.CLITool.iml

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

3 changes: 3 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,3 @@
{
"files.trimTrailingWhitespace": false,
}
110 changes: 89 additions & 21 deletions README.md
Expand Up @@ -2,50 +2,118 @@
<a title="edaa-org.github.io/pyEDAA.CLITool" href="https://edaa-org.github.io/pyEDAA.CLITool"><img height="80px" src="doc/_static/logo.svg"/></a>
</p>

[![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
[![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.CLITool&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.CLITool%2Findex.html)](https://edaa-org.github.io/pyEDAA.CLITool/)
[![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)
[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.CLITool/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.CLITool/actions/workflows/Pipeline.yml)

<!--
[![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
[![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.CLITool?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.CLITool&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.CLITool%2Findex.html)](https://edaa-org.github.io/pyEDAA.CLITool/)
[![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.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.CLITool/)
![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.CLITool?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.CLITool/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.CLITool/actions/workflows/Pipeline.yml)
[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyEDAA.CLITool?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/edaa-org/pyEDAA.CLITool)
[![Codacy - Quality](https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.CLITool)
[![Codacy - Coverage](https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.CLITool)
[![Codacy - Quality](https://img.shields.io/codacy/grade/7cc5334a04924f77ae75bbffbf48ff98?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/edaa-org/pyEDAA.CLITool)
[![Codacy - Coverage](https://img.shields.io/codacy/coverage/7cc5334a04924f77ae75bbffbf48ff98?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/edaa-org/pyEDAA.CLITool)
[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.CLITool?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/edaa-org/pyEDAA.CLITool)

[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pyEDAA.CLITool?longCache=true&style=flat-square&logo=GitHub)](https://GitHub.com/edaa-org/pyEDAA.CLITool/network/dependents)
[![Requires.io](https://img.shields.io/requires/github/edaa-org/pyEDAA.CLITool?longCache=true&style=flat-square)](https://requires.io/github/EDAA-ORG/pyEDAA.CLITool/requirements/?branch=main)
[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.CLITool?longCache=true&style=flat-square)](https://libraries.io/github/edaa-org/pyEDAA.CLITool/sourcerank)
<!--
[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pyEDAA.CLITool?longCache=true&style=flat-square&logo=GitHub)](https://github.com/edaa-org/pyEDAA.CLITool/network/dependents)
[![Requires.io](https://img.shields.io/requires/github/edaa-org/pyEDAA.CLITool?longCache=true&style=flat-square)](https://requires.io/github/edaa-org/pyEDAA.CLITool/requirements/?branch=main)
[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.CLITool)](https://libraries.io/github/edaa-org/pyEDAA.CLITool/sourcerank)
-->


<p align="center">
<a title="edaa-org.github.io/pyEDAA.CLITool" href="https://edaa-org.github.io/pyEDAA.CLITool"><img height="275px" src="doc/_static/work-in-progress.png"/></a>
</p>


# Main Goals

Provide unified interfaces to execute EDA tools via CLI from Python, agnostic to any specific configuration format/object.


# Use Cases

* *tbd*
# Main Goals

* Provide a pythonic solution to construct command line calls for EDA tools based on [pyTooling.CLIAbstraction](https://github.com/pyTooling/pyTooling.CLIAbstraction)
* Launch CLI tools and connect to STDIn, STDOUT, STDERR for realtime output post-processing.


# Features

* Support multiple native platforms: Linux, macOS, Windows.
* Support nested platforms like MSYS2 with MinGW32, MinGW64, URCT64, Clang64, ...
* Find CLI programs either in `PATH` or specify an exact installation location.
* Generate CLI options in correct order.
* Generate correctly escaped CLI options.


# Supported Tools

* Aldec
* 🚧 Active-HDL
* 🚧 Riviera-PRO
* Altera
* 🚧 Quartus
* 🚫 ModelSim Altera (Student) Edition
* Cadence
* πŸ™‹ need a list of tools
* IntelFPGA
* 🚧 Quartus
* 🚫 ModelSim Altera (Student) Edition
* Lattice
* 🚧 Diamond
* 🚫 Active-HDL Lattice Edition
* 🚫 ModelSim Lattice Edition
* MentorGraphics
* βœ… ModelSim DE/SE/PE
* 🚫 QuestaSim
* SiemensEDA
* 🚫 ModelSim DE/SE/PE
* 🚫 QuestaSim
* Synopsys
* πŸ™‹ need a list of tools
* Xilinx
* 🚧 ISE
* 🚧 Vivado
* 🚫 Vivado-SDK
* 🚫 Vitis
* System Tools
* βœ… Git
* Open Source
* βœ… GHDL
* βœ… GTKWave
* Yosys
* πŸ™‹ need a list of tools

**Legend:**
βœ… &rarr; implemented and tested
🚧 &rarr; under test
🚫 &rarr; planned but not yet implemented &rArr; accepting PRs
πŸ™‹ &rarr; need help

# Examples

```python
print(some.python.code.here())
from pyEDAA.CLITool.GHDL import GHDL

tool = GHDL()
tool[tool.CommandAnalyze] = True
tool[tool.FlagVHDLStandard] = "08"
tool[tool.FlagSynopsys] = True
tool[tool.FlagRelaxed] = True
tool[tool.FlagExplicit] = True
tool[tool.FlagMultiByteComments] = True
tool[tool.FlagLibrary] = "lib_Test"

print(f"Calling GHDL: {tool}")
# Calling GHDL: "ghdl" "analyze" "--std=08" "-fsynopsys" "-frelaxed" "-fexplicit" "--work=lib_Test" "--mb-comments"
```

# Consumers

This layer is used by:

* 🚧 pyEDAA.Workflow
* 🚧 [Open Source Verification Bundle (OSVB)](https://umarcor.github.io/osvb)


# References

Expand Down
2 changes: 2 additions & 0 deletions dist/requirements.txt
@@ -0,0 +1,2 @@
wheel
twine

0 comments on commit 2fd5104

Please sign in to comment.