wavekit 0.8.0__tar.gz → 0.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {wavekit-0.8.0 → wavekit-0.8.2}/PKG-INFO +4 -3
  2. {wavekit-0.8.0 → wavekit-0.8.2}/README.md +2 -2
  3. {wavekit-0.8.0 → wavekit-0.8.2}/pyproject.toml +1 -1
  4. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/base.py +2 -7
  5. wavekit-0.8.0/src/wavekit/readers/expr_parser.py +0 -65
  6. {wavekit-0.8.0 → wavekit-0.8.2}/LICENSE +0 -0
  7. {wavekit-0.8.0 → wavekit-0.8.2}/build_exts.py +0 -0
  8. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/__init__.py +0 -0
  9. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/expression.py +0 -0
  10. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/__init__.py +0 -0
  11. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/compiler.py +0 -0
  12. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/dsl.py +0 -0
  13. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/errors.py +0 -0
  14. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/result.py +0 -0
  15. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/runtime.py +0 -0
  16. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/pattern/steps.py +0 -0
  17. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/__init__.py +0 -0
  18. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/clock_domain.py +0 -0
  19. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fsdb/__init__.py +0 -0
  20. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fsdb/npi_fsdb.pxd +0 -0
  21. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fsdb/npi_fsdb_reader.pyx +0 -0
  22. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fsdb/reader.py +0 -0
  23. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fst/__init__.py +0 -0
  24. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/fst/reader.py +0 -0
  25. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/hierarchy.py +0 -0
  26. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/matcher.py +0 -0
  27. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/range.py +0 -0
  28. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/value_change.pyx +0 -0
  29. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/vcd/__init__.py +0 -0
  30. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/vcd/reader.py +0 -0
  31. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/wellen/__init__.py +0 -0
  32. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/readers/wellen/reader.py +0 -0
  33. {wavekit-0.8.0 → wavekit-0.8.2}/src/wavekit/waveform.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavekit
3
- Version: 0.8.0
3
+ Version: 0.8.2
4
4
  Summary: High-level digital waveform analysis in Python
5
5
  License-File: LICENSE
6
6
  Author: cxzzzz
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
16
17
  Requires-Dist: lark (>=1.2,<2)
17
18
  Requires-Dist: numpy (>=2.0.0,<3.0.0)
18
19
  Requires-Dist: wavekit-pywellen (>=0.25.6)
@@ -35,8 +36,8 @@ It loads signals from waveform files as clock-aligned `Waveform` objects,
35
36
  allowing users to query and operate on them at the cycle and transaction levels,
36
37
  making complex hardware behavior easier to analyze.
37
38
 
38
- > **AI integration:** [wavekit-mcp](https://github.com/cxzzzz/wavekit-mcp) exposes wavekit analysis through
39
- > MCP tools for AI-assisted workflows.
39
+ > **Quick links:** [Online playground](https://cxzzzz.github.io/wavekit-playground/) ·
40
+ > [AI integration](https://github.com/cxzzzz/wavekit-mcp)
40
41
 
41
42
  ## Features
42
43
 
@@ -13,8 +13,8 @@ It loads signals from waveform files as clock-aligned `Waveform` objects,
13
13
  allowing users to query and operate on them at the cycle and transaction levels,
14
14
  making complex hardware behavior easier to analyze.
15
15
 
16
- > **AI integration:** [wavekit-mcp](https://github.com/cxzzzz/wavekit-mcp) exposes wavekit analysis through
17
- > MCP tools for AI-assisted workflows.
16
+ > **Quick links:** [Online playground](https://cxzzzz.github.io/wavekit-playground/) ·
17
+ > [AI integration](https://github.com/cxzzzz/wavekit-mcp)
18
18
 
19
19
  ## Features
20
20
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wavekit"
3
- version = "0.8.0"
3
+ version = "0.8.2"
4
4
  description = "High-level digital waveform analysis in Python"
5
5
  authors = ["cxzzzz <cxz19961010@outlook.com>"]
6
6
  readme = "README.md"
@@ -348,13 +348,8 @@ class Reader:
348
348
  clock_offset=clock_offset,
349
349
  )
350
350
 
351
- return Waveform(
352
- value=value,
353
- cycle=clock,
354
- time=time,
355
- width=width,
356
- signed=signed,
357
- )
351
+ wf = Waveform(value=value, cycle=clock, time=time, width=width)
352
+ return wf.as_signed() if signed else wf
358
353
 
359
354
  @abstractmethod
360
355
  def _load_value_changes(
@@ -1,65 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import re
4
-
5
- # Matches a waveform signal path token in an expression.
6
- # A valid path is one of:
7
- # - Starts with $$ or $ (module search)
8
- # - Starts with @ (regex pattern)
9
- # - Contains at least one . separator (hierarchical path)
10
- #
11
- # Path structure:
12
- # [$$|$|@] first_ident (.segment[{brace}])* ([N:M]|[N])?
13
- #
14
- # The trailing [N:M] / [N] is consumed as the signal range (not a bit-slice).
15
- # Any further [N:M] after the placeholder in the resulting expression will be
16
- # handled as a Python subscript on the Waveform object (i.e. bit-slicing).
17
- _WAVE_PATH_RE = re.compile(
18
- r'(?P<path>'
19
- r'(?:[$]{1,2}|@)?' # optional prefix $$ / $ / @
20
- r'(?:[A-Za-z_][A-Za-z0-9_]*)' # first identifier segment
21
- r'(?:[.][A-Za-z_][A-Za-z0-9_{}.,]*)*' # dot-separated segments (allow braces, no [ ])
22
- r'(?:\[\d+(?::\d+)?\])?' # optional trailing [N:M] or [N] range
23
- r')'
24
- )
25
-
26
-
27
- def _is_wave_path(token: str) -> bool:
28
- """Return True if token looks like a waveform signal path."""
29
- if token.startswith('$') or token.startswith('@'):
30
- return True
31
- # Must contain a dot (hierarchy) but not look like a floating-point literal
32
- if '.' in token:
33
- try:
34
- float(token)
35
- return False # it's a numeric literal like "1.0"
36
- except ValueError:
37
- return True
38
- return False
39
-
40
-
41
- def extract_wave_paths(expr: str) -> tuple[str, list[tuple[str, str]]]:
42
- """Parse *expr* and replace wave path tokens with placeholder identifiers.
43
-
44
- Returns
45
- -------
46
- substituted_expr : str
47
- The expression with every wave path replaced by ``__wave_N__``.
48
- paths : list of (placeholder, original_path)
49
- The ordered list of substitutions made.
50
- """
51
- paths: list[tuple[str, str]] = []
52
- counter = 0
53
-
54
- def replacer(m: re.Match) -> str:
55
- nonlocal counter
56
- token = m.group('path')
57
- if not _is_wave_path(token):
58
- return token
59
- placeholder = f'__wave_{counter}__'
60
- paths.append((placeholder, token))
61
- counter += 1
62
- return placeholder
63
-
64
- substituted = _WAVE_PATH_RE.sub(replacer, expr)
65
- return substituted, paths
File without changes
File without changes
File without changes
File without changes