Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.2 #19

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.IPXACT?longCache=true&style=flat-square)](https://libraries.io/github/edaa-org/pyEDAA.IPXACT/sourcerank)
-->

An IP-XACT Document Object Model (DOM) for [IEEE 1685-2014][IEEE-1685-2014] written in Python.
An IP-XACT Document Object Model (DOM) for [IEEE 1685-2022][IEEE-1685-2022] written in Python.

# Features

Expand All @@ -35,8 +35,9 @@ An IP-XACT Document Object Model (DOM) for [IEEE 1685-2014][IEEE-1685-2014] writ
* Standards:
* [IEEE 1685-2009][IEEE-1685-2009]
* [IEEE 1685-2014][IEEE-1685-2014]
* [IEEE 1685-2022][IEEE-1685-2022]
* Schema files:
* [IPXACT-Schema](https://github.com/UnofficialRepos/IPXACT-Schema) at GitHub
* [IPXACT-Schema](https://github.com/edaa-org/IPXACT-Schema) at GitHub
* [IP-XACT][IPXACT] at [Accellera][Accellera]


Expand All @@ -47,13 +48,15 @@ An IP-XACT Document Object Model (DOM) for [IEEE 1685-2014][IEEE-1685-2014] writ

# License

This Python library (source code) is licensed under [Apache License 2.0](LICENSE.md).
This Python package (source code) is licensed under [Apache License 2.0](LICENSE.md).
The accompanying documentation is licensed under [Creative Commons - Attribution 4.0 (CC-BY 4.0)](doc/Doc-License.rst).

-------------------------
SPDX-License-Identifier: Apache-2.0


[IEEE-1685-2009]: https://standards.ieee.org/findstds/standard/1685-2009.html
[IEEE-1685-2014]: https://standards.ieee.org/findstds/standard/1685-2014.html
[IEEE-1685-2022]: https://standards.ieee.org/findstds/standard/1685-2022.html
[IPXACT]: http://accellera.org/downloads/standards/ip-xact
[Accellera]: http://accellera.org
4 changes: 2 additions & 2 deletions dist/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
wheel>=0.38.1
twine
wheel >= 0.40.0
twine >= 4.0.2
34 changes: 18 additions & 16 deletions doc/Dependency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,21 @@ the mandatory dependencies too.

.. rubric:: Dependency List

+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+===========================================================+=============+========================================================================================+======================+
| `pytest <https://GitHub.com/pytest-dev/pytest>`__ | ≥7.2.0 | `MIT <https://GitHub.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ | ≥4.0.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.0 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `mypy <https://GitHub.com/python/mypy>`__ | ≥1.2 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `lxml <https://GitHub.com/lxml/lxml>`__ | ≥4.9 | `BSD 3-Clause <https://GitHub.com/lxml/lxml/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=====================================================================+=============+========================================================================================+======================+
| `pytest <https://GitHub.com/pytest-dev/pytest>`__ | ≥7.4.0 | `MIT <https://GitHub.com/pytest-dev/pytest/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ | ≥4.1.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.3 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `mypy <https://GitHub.com/python/mypy>`__ | ≥1.5 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `typing-extensions <https://GitHub.com/python/typing_extensions>`__ | ≥4.7.1 | `PSF-2.0 <https://github.com/python/typing_extensions/blob/main/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `lxml <https://GitHub.com/lxml/lxml>`__ | ≥4.9 | `BSD 3-Clause <https://GitHub.com/lxml/lxml/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+


.. _dependency-documentation:
Expand Down Expand Up @@ -134,7 +136,7 @@ install the mandatory dependencies too.
+============================================================================+==============+==========================================================================================================+======================================================================================================================================================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥5.0.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.38.1 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.40.0 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+


Expand Down Expand Up @@ -163,7 +165,7 @@ install the mandatory dependencies too.
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+==========================================================+==============+===========================================================================================+======================+
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.38.1 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.40.0 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
| `Twine <https://GitHub.com/pypa/twine/>`__ | any | `Apache License, 2.0 <https://github.com/pypa/twine/blob/main/LICENSE>`__ | *Not yet evaluated.* |
| `Twine <https://GitHub.com/pypa/twine/>`__ | ≥4.0.2 | `Apache License, 2.0 <https://github.com/pypa/twine/blob/main/LICENSE>`__ | *Not yet evaluated.* |
+----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
'ghrepo': ('https://github.com/%s', 'gh:'),
'ghissue': ('https://github.com/edaa-org/pyEDAA.IPXACT/issues/%s', 'issue #'),
'ghpull': ('https://github.com/edaa-org/pyEDAA.IPXACT/pull/%s', 'pull request #'),
'ghsrc': ('https://github.com/edaa-org/pyEDAA.IPXACT/blob/main/%s', ''),
'ghsrc': ('https://github.com/edaa-org/pyEDAA.IPXACT/blob/main/%s', None),
'pypiproject': ('https://pypi.org/project/%s', 'pypi:')
}

Expand Down
2 changes: 1 addition & 1 deletion lib/schema
Submodule schema updated 61 files
+30 −0 .editorconfig
+14 −0 .github/dependabot.yml
+18 −0 .github/pull_request_template.md
+39 −0 .github/workflows/Pipeline.yml
+30 −0 .gitignore
+83 −0 LICENSE.md
+13 −0 NOTICE.md
+60 −23 README.md
+40 −0 ieee-1685-2009/README.md
+4,894 −0 ieee-1685-2009/TGI/TGI.html
+11,291 −0 ieee-1685-2009/TGI/TGI.wsdl
+2,723 −0 ieee-1685-2009/TGI/TGI.xml
+154 −0 ieee-1685-2009/TGI/TGI.xsd
+40 −0 ieee-1685-2014/README.md
+177 −0 ieee-1685-2022/LICENSE
+11 −0 ieee-1685-2022/NOTICE
+6 −0 ieee-1685-2022/README.md
+72,691 −0 ieee-1685-2022/TGI/TGI.wsdl
+66,935 −0 ieee-1685-2022/TGI/TGI.yaml
+302 −0 ieee-1685-2022/abstractionDefinition.xsd
+165 −0 ieee-1685-2022/abstractor.xsd
+109 −0 ieee-1685-2022/autoConfigure.xsd
+114 −0 ieee-1685-2022/busDefinition.xsd
+591 −0 ieee-1685-2022/busInterface.xsd
+79 −0 ieee-1685-2022/catalog.xsd
+1,134 −0 ieee-1685-2022/commonStructures.xsd
+441 −0 ieee-1685-2022/component.xsd
+19 −0 ieee-1685-2022/configurable.xsd
+261 −0 ieee-1685-2022/constraints.xsd
+73 −0 ieee-1685-2022/design.xsd
+187 −0 ieee-1685-2022/designConfig.xsd
+467 −0 ieee-1685-2022/file.xsd
+88 −0 ieee-1685-2022/fileType.xsd
+286 −0 ieee-1685-2022/generator.xsd
+102 −0 ieee-1685-2022/identifier.xsd
+72 −0 ieee-1685-2022/index.xsd
+1,862 −0 ieee-1685-2022/memoryMap.xsd
+364 −0 ieee-1685-2022/model.xsd
+1,161 −0 ieee-1685-2022/port.xsd
+221 −0 ieee-1685-2022/signalDrivers.xsd
+286 −0 ieee-1685-2022/simpleTypes.xsd
+376 −0 ieee-1685-2022/subInstances.xsd
+198 −0 ieee-1685-2022/typeDefinitions.xsd
+24 −0 ieee-1685-2022/xml.xsd
+3 −0 ipxact-1.0/README.md
+3 −0 ipxact-1.1/README.md
+3 −0 ipxact-1.2/README.md
+3 −0 ipxact-1.4/README.md
+4,094 −0 ipxact-1.4/TGI/TGI.html
+10,132 −0 ipxact-1.4/TGI/TGI.wsdl
+2,249 −0 ipxact-1.4/TGI/TGI.xml
+94 −0 ipxact-1.4/TGI/TGI.xsd
+3 −0 ipxact-1.5/README.md
+4,894 −0 ipxact-1.5/TGI/TGI.html
+11,320 −0 ipxact-1.5/TGI/TGI.wsdl
+2,723 −0 ipxact-1.5/TGI/TGI.xml
+154 −0 ipxact-1.5/TGI/TGI.xsd
+55 −0 pyproject.toml
+0 −0 requirements.txt
+6 −0 tests/requirements.txt
+178 −0 tests/unit/IPXACT.py
12 changes: 6 additions & 6 deletions pyEDAA/IPXACT/Catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ def FromFile(cls, filePath : Path):
items = []
for rootElements in root:
element = etree.QName(rootElements)
if (element.localname == "vendor"):
if element.localname == "vendor":
vendor = rootElements.text
elif (element.localname == "library"):
elif element.localname == "library":
library = rootElements.text
elif (element.localname == "name"):
elif element.localname == "name":
name = rootElements.text
elif (element.localname == "version"):
elif element.localname == "version":
version = rootElements.text
elif (element.localname == "description"):
elif element.localname == "description":
description = rootElements.text
elif (element.localname == "catalogs"):
elif element.localname == "catalogs":
for ipxactFileElement in rootElements:
items.append(IpxactFile.FromXml(ipxactFileElement))
else:
Expand Down
22 changes: 11 additions & 11 deletions pyEDAA/IPXACT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
__email__ = "Paebbels@gmail.com"
__copyright__ = "2016-2023, Patrick Lehmann"
__license__ = "Apache License, Version 2.0"
__version__ = "0.3.1"
__version__ = "0.3.2"


@export
class IpxactSchemaStruct:
"""Schema descriptor made of version, namespace prefix, URI, URL and local path."""

Version : str = None #: Schema version
NamespacePrefix : str = None #: XML namespace prefix
SchemaUri : str = None #: schema URI
SchemaUrl : str = None #: schema URL
LocalPath : Path = None #: local path
Version: str #: Schema version
NamespacePrefix: str #: XML namespace prefix
SchemaUri: str #: Schema URI
SchemaUrl: str #: Schema URL
LocalPath: Path #: Local path

def __init__(self, version : str, namespacePrefix : str, schemaUri : str, schemaUrl : str, localPath : Path):
"""Constructor"""
Expand Down Expand Up @@ -89,10 +89,10 @@ def __init__(self, version : str, namespacePrefix : str, schemaUri : str, schema
class Vlnv:
"""VLNV data structure (Vendor, Library, Name, Version) as a unique identifier in IP-XACT."""

Vendor : str = None #: Vendor name in a VLNV unique identifier
Library : str = None #: Library name in a VLNV unique identifier
Name : str = None #: Component name in a VLNV unique identifier
Version : str = None #: Version in a VLNV unique identifier
Vendor: str #: Vendor name in a VLNV unique identifier
Library: str #: Library name in a VLNV unique identifier
Name: str #: Component name in a VLNV unique identifier
Version: str #: Version in a VLNV unique identifier

def __init__(self, vendor, library, name, version):
"""Constructor"""
Expand Down Expand Up @@ -121,7 +121,7 @@ def ToXml(self, indent=1, isVersionedIdentifier=False):
class RootElement:
"""Base-class for all IP-XACT data classes."""

_vlnv : Vlnv = None #: VLNV unique identifier.
_vlnv: Vlnv #: VLNV unique identifier.

def __init__(self, vlnv):
"""Base-constructor to set a VLNV field for all derives classes."""
Expand Down
29 changes: 24 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
[build-system]
requires = [
"pyTooling >= 5.0.0",
"setuptools >= 60.9.3",
"wheel >= 0.38.1"
"setuptools >= 68.0.0",
"wheel >= 0.40.0",
"pyTooling >= 5.0.0"
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120

[tool.mypy]
python_version = "3.11"
namespace_packages = true

pretty = true
show_error_context = true

html_report = "report/typing"

[tool.pytest.ini_options]
# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
# derived from unittest.Testcase
python_files = "*"
python_functions = "test_*"
filterwarnings = [
"error::DeprecationWarning",
"error::PendingDeprecationWarning"
]

[tool.coverage.run]
branch = true
omit = [
"*site-packages*",
"setup.py"
"setup.py",
"tests/*"
]

[tool.coverage.report]
#skip_covered = true
skip_covered = false
skip_empty = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError"
]
omit = [
"tests/*"
]

[tool.coverage.html]
directory = "report/coverage/html"
title="Code Coverage of pyEDAA.IPXACT"

[tool.coverage.xml]
output = "report/coverage/coverage.xml"
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
#
from itertools import chain
from pathlib import Path
from pyTooling.Packaging import DescribePythonPackageHostedOnGitHub, DEFAULT_CLASSIFIERS

Expand All @@ -45,5 +46,14 @@
developmentStatus="alpha",
classifiers=list(DEFAULT_CLASSIFIERS) + [
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)"
]
],
dataFiles={
packageName: [
str(file.relative_to(Path.cwd()))
for file in chain(
Path.cwd().glob("ipxact*/**/*"),
Path.cwd().glob("ieee*/**/*")
)
]
}
)
9 changes: 5 additions & 4 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
-r ../requirements.txt

# Coverage collection
Coverage>=7.0
Coverage >= 7.3

# Test Runner
pytest>=7.2.0
pytest-cov>=4.0.0
pytest >= 7.4.0
pytest-cov >= 4.1.0

# Static Type Checking
mypy >= 1.2
mypy >= 1.5
typing_extensions >= 4.7.1
lxml>=4.9
Loading