Skip to content

Commit

Permalink
Merge pull request #49 from vkottler/dev/3.0.1
Browse files Browse the repository at this point in the history
3.0.1 - Correctness issue
  • Loading branch information
vkottler authored Oct 11, 2023
2 parents 35ebefd + 9d9fd69 commit 752ad86
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- run: |
mk python-release owner=vkottler \
repo=ifgen version=3.0.0
repo=ifgen version=3.0.1
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
=====================================
generator=datazen
version=3.1.4
hash=27ffdb1e06b7c509cfa2a62efc120ee9
hash=e2d67bfd7efcf9a8fd101e9a24006e5a
=====================================
-->

# ifgen ([3.0.0](https://pypi.org/project/ifgen/))
# ifgen ([3.0.1](https://pypi.org/project/ifgen/))

[![python](https://img.shields.io/pypi/pyversions/ifgen.svg)](https://pypi.org/project/ifgen/)
![Build Status](https://github.com/vkottler/ifgen/workflows/Python%20Package/badge.svg)
Expand Down
4 changes: 2 additions & 2 deletions ifgen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.4
# hash=8da41169dbaf3a7f4948f28c43bb8510
# hash=75a8be659b7a0b9eac6bb40ac4061a5a
# =====================================

"""
Expand All @@ -10,4 +10,4 @@

DESCRIPTION = "An interface generator for distributed computing."
PKG_NAME = "ifgen"
VERSION = "3.0.0"
VERSION = "3.0.1"
2 changes: 1 addition & 1 deletion ifgen/generation/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def stream_implementation(self) -> bool:
"""
Determine if this instances should include a stream implementations.
"""
return self.instance.get("stream", True)
return self.instance.get("stream", True) # type: ignore

@property
def source_path(self) -> Path:
Expand Down
4 changes: 1 addition & 3 deletions ifgen/svd/group/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ def peripheral_groups(

if group.root is None:
group.root = peripheral
elif peripheral.derived:
else:
result[peripheral.derived_elem.base_name()].derivatives.append(
peripheral
)
else:
group.derivatives.append(peripheral)

# Validate groups.
for name, group in result.items():
Expand Down
15 changes: 2 additions & 13 deletions ifgen/svd/model/peripheral.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,11 @@ def access(self) -> Optional[str]:
"""Get the possible 'access' field default."""
return self.derived_elem.raw_data.get("access")

def group_name(self, default: str = None) -> Optional[str]:
"""Get a possible group name for this peripheral."""

return self.raw_data.get("groupName", default)

def base_name(self, lower: bool = True, strip_zero: bool = True) -> str:
def base_name(self, lower: bool = True) -> str:
"""Get the base peripheral name."""

result = self.group_name(default=self.name)
assert result is not None

result = self.name
result = result.lower() if lower else result

if result.endswith("0") and strip_zero:
result = result[:-1]

return result

def handle_address_block(self, address_block: ElementTree.Element) -> None:
Expand Down
2 changes: 1 addition & 1 deletion local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 3
minor: 0
patch: 0
patch: 1
entry: ig
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"

[project]
name = "ifgen"
version = "3.0.0"
version = "3.0.1"
description = "An interface generator for distributed computing."
readme = "README.md"
requires-python = ">=3.11"
Expand Down

0 comments on commit 752ad86

Please sign in to comment.