Skip to content

Commit a175bc5

Browse files
authored
v0.32.0
2 parents 7870ce5 + 1172b70 commit a175bc5

File tree

9 files changed

+86
-13
lines changed

9 files changed

+86
-13
lines changed

.github/workflows/Pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r6
1313
with:
1414
package_name: 'pyVHDLModel'
15+
unittest_python_version_list: '3.11 3.12 3.13 3.14 pypy-3.11'
1516
bandit: 'true'
1617
pylint: 'false'
1718
codecov: 'true'

.idea/pyVHDLModel.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/Dependency.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ the mandatory dependencies too.
5555
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
5656
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ | ≥7.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
5757
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
58-
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.10 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
58+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.11 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
5959
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
6060
| `mypy <https://GitHub.com/python/mypy>`__ | ≥1.18 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
6161
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
@@ -101,7 +101,7 @@ the mandatory dependencies too.
101101
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
102102
| !! `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.* |
103103
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
104-
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.1 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
104+
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.5 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
105105
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
106106

107107

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ sphinxcontrib-mermaid ~= 1.0
1313
autoapi >= 2.0.1
1414
sphinx_design ~= 0.6
1515
sphinx-copybutton >= 0.5
16-
sphinx_autodoc_typehints ~= 3.1
16+
sphinx_autodoc_typehints ~= 3.5
1717
sphinx_reports ~= 0.9

pyVHDLModel/Expression.py

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
3535
All declarations for literals, aggregates, operators forming an expressions.
3636
"""
37-
from typing import Tuple, List, Iterable, Union
37+
from enum import Flag
38+
from typing import Tuple, List, Iterable, Union, ClassVar
3839

3940
from pyTooling.Decorators import export, readonly
4041

@@ -196,14 +197,32 @@ def __str__(self) -> str:
196197
return "\"" + self._value + "\""
197198

198199

200+
@export
201+
class BitStringBase(Flag):
202+
NoBase = 0
203+
Binary = 2
204+
Octal = 8
205+
Decimal = 10
206+
Hexadecimal = 16
207+
Unsigned = 32
208+
Signed = 64
209+
210+
199211
@export
200212
class BitStringLiteral(Literal):
213+
# _base: ClassVar[BitStringBase]
201214
_value: str
215+
_bits: int
202216

203217
def __init__(self, value: str) -> None:
204218
super().__init__()
219+
self._bits = len(value)
205220
self._value = value
206221

222+
@readonly
223+
def Bits(self) -> int:
224+
return self._bits
225+
207226
@readonly
208227
def Value(self) -> str:
209228
return self._value
@@ -212,6 +231,58 @@ def __str__(self) -> str:
212231
return "\"" + self._value + "\""
213232

214233

234+
@export
235+
class BinaryBitStringLiteral(BitStringLiteral):
236+
_base: ClassVar[BitStringBase] = BitStringBase.Binary
237+
238+
def __init__(self, value: str, bits: int = 0) -> None:
239+
super().__init__(value)
240+
if bits > 0:
241+
self._bits = bits
242+
243+
def __str__(self) -> str:
244+
return "b\"" + self._value + "\""
245+
246+
247+
@export
248+
class OctalBitStringLiteral(BitStringLiteral):
249+
_base: ClassVar[BitStringBase] = BitStringBase.Octal
250+
251+
def __init__(self, value: str, bits: int = 0) -> None:
252+
super().__init__(value)
253+
if bits > 0:
254+
self._bits = bits
255+
256+
def __str__(self) -> str:
257+
return "o\"" + self._value + "\""
258+
259+
260+
@export
261+
class DecimalBitStringLiteral(BitStringLiteral):
262+
_base: ClassVar[BitStringBase] = BitStringBase.Decimal
263+
264+
def __init__(self, value: str, bits: int = 0) -> None:
265+
super().__init__(value)
266+
if bits > 0:
267+
self._bits = bits
268+
269+
def __str__(self) -> str:
270+
return "d\"" + self._value + "\""
271+
272+
273+
@export
274+
class HexadecimalBitStringLiteral(BitStringLiteral):
275+
_base: ClassVar[BitStringBase] = BitStringBase.Hexadecimal
276+
277+
def __init__(self, value: str, bits: int = 0) -> None:
278+
super().__init__(value)
279+
if bits > 0:
280+
self._bits = bits
281+
282+
def __str__(self) -> str:
283+
return "x\"" + self._value + "\""
284+
285+
215286
@export
216287
class ParenthesisExpression: #(Protocol):
217288
__slots__ = () # FIXME: use ExtendedType?

pyVHDLModel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
__email__ = "[email protected]"
4949
__copyright__ = "2016-2025, Patrick Lehmann"
5050
__license__ = "Apache License, Version 2.0"
51-
__version__ = "0.31.3"
51+
__version__ = "0.32.0"
5252

5353

5454
from enum import unique, Enum, Flag, auto

run.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Param(
3333
)
3434

3535
$PackageName = "pyVHDLModel"
36-
$PackageVersion = "0.31.2"
36+
$PackageVersion = "0.32.0"
3737

3838
# set default values
3939
$EnableDebug = [bool]$PSCmdlet.MyInvocation.BoundParameters["Debug"]
@@ -89,7 +89,7 @@ if ($build)
8989
rm -Force .\build\bdist.win-amd64
9090
rm -Force .\build\lib
9191
Write-Host -ForegroundColor Yellow "[live][BUILD] Building $PackageName package as wheel ..."
92-
py -3.13 -m build --wheel --no-isolation
92+
py -3.14 -m build --wheel --no-isolation
9393

9494
Write-Host -ForegroundColor Yellow "[live][BUILD] Building wheel finished"
9595
}
@@ -103,9 +103,9 @@ if ($install)
103103
}
104104
else
105105
{ Write-Host -ForegroundColor Cyan "[ADMIN][UNINSTALL] Uninstalling $PackageName ..."
106-
py -3.13 -m pip uninstall -y $PackageName
106+
py -3.14 -m pip uninstall -y $PackageName
107107
Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Installing $PackageName from wheel ..."
108-
py -3.13 -m pip install .\dist\$PackageName-$PackageVersion-py3-none-any.whl
108+
py -3.14 -m pip install .\dist\$($PackageName.Replace(".", "_").ToLower())-$PackageVersion-py3-none-any.whl
109109

110110
Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Closing window in 5 seconds ..."
111111
Start-Sleep -Seconds 5

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@
4747
gitHubNamespace=gitHubNamespace,
4848
keywords="Python3 VHDL Language Model Abstract",
4949
sourceFileWithVersion=packageInformationFile,
50-
developmentStatus="beta",
5150
classifiers=list(DEFAULT_CLASSIFIERS) + [
5251
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
5352
"Topic :: Software Development :: Code Generators",
5453
"Topic :: Software Development :: Compilers",
5554
],
55+
developmentStatus="beta",
56+
pythonVersions=("3.11", "3.12", "3.13", "3.14"),
5657
dataFiles={
5758
packageName: ["py.typed"]
5859
},

tests/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-r ../requirements.txt
22

33
# Coverage collection
4-
Coverage ~= 7.10
4+
Coverage ~= 7.11
55

66
# Test Runner
77
pytest ~= 8.4
@@ -10,4 +10,4 @@ pytest-cov ~= 7.0
1010
# Static Type Checking
1111
mypy[reports] ~= 1.18
1212
typing_extensions ~= 4.15
13-
lxml ~= 6.0
13+
lxml >= 5.4, <7.0

0 commit comments

Comments
 (0)