anymodbus 0.1.0__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 (50) hide show
  1. anymodbus-0.1.0/.gitignore +70 -0
  2. anymodbus-0.1.0/CHANGELOG.md +37 -0
  3. anymodbus-0.1.0/DESIGN.md +821 -0
  4. anymodbus-0.1.0/LICENSE +21 -0
  5. anymodbus-0.1.0/PKG-INFO +218 -0
  6. anymodbus-0.1.0/README.md +184 -0
  7. anymodbus-0.1.0/pyproject.toml +278 -0
  8. anymodbus-0.1.0/src/anymodbus/__init__.py +86 -0
  9. anymodbus-0.1.0/src/anymodbus/_mock/__init__.py +14 -0
  10. anymodbus-0.1.0/src/anymodbus/_mock/faults.py +37 -0
  11. anymodbus-0.1.0/src/anymodbus/_mock/pair.py +99 -0
  12. anymodbus-0.1.0/src/anymodbus/_mock/slave.py +364 -0
  13. anymodbus-0.1.0/src/anymodbus/_types.py +164 -0
  14. anymodbus-0.1.0/src/anymodbus/_version.py +24 -0
  15. anymodbus-0.1.0/src/anymodbus/bus.py +475 -0
  16. anymodbus-0.1.0/src/anymodbus/capabilities.py +58 -0
  17. anymodbus-0.1.0/src/anymodbus/config.py +150 -0
  18. anymodbus-0.1.0/src/anymodbus/crc.py +78 -0
  19. anymodbus-0.1.0/src/anymodbus/decoders.py +221 -0
  20. anymodbus-0.1.0/src/anymodbus/exceptions.py +312 -0
  21. anymodbus-0.1.0/src/anymodbus/framer.py +371 -0
  22. anymodbus-0.1.0/src/anymodbus/pdu.py +360 -0
  23. anymodbus-0.1.0/src/anymodbus/py.typed +0 -0
  24. anymodbus-0.1.0/src/anymodbus/slave.py +404 -0
  25. anymodbus-0.1.0/src/anymodbus/stream.py +67 -0
  26. anymodbus-0.1.0/src/anymodbus/sync.py +508 -0
  27. anymodbus-0.1.0/src/anymodbus/testing.py +13 -0
  28. anymodbus-0.1.0/tests/__init__.py +0 -0
  29. anymodbus-0.1.0/tests/conftest.py +39 -0
  30. anymodbus-0.1.0/tests/hardware/__init__.py +0 -0
  31. anymodbus-0.1.0/tests/integration/__init__.py +0 -0
  32. anymodbus-0.1.0/tests/integration/test_bus_txn_smoke.py +304 -0
  33. anymodbus-0.1.0/tests/integration/test_capability_probe.py +158 -0
  34. anymodbus-0.1.0/tests/integration/test_client_slave_pair.py +226 -0
  35. anymodbus-0.1.0/tests/integration/test_fault_injection.py +139 -0
  36. anymodbus-0.1.0/tests/integration/test_sync_pair.py +202 -0
  37. anymodbus-0.1.0/tests/unit/__init__.py +0 -0
  38. anymodbus-0.1.0/tests/unit/test_config.py +100 -0
  39. anymodbus-0.1.0/tests/unit/test_crc.py +75 -0
  40. anymodbus-0.1.0/tests/unit/test_decoders.py +207 -0
  41. anymodbus-0.1.0/tests/unit/test_examples_smoke.py +30 -0
  42. anymodbus-0.1.0/tests/unit/test_exceptions.py +151 -0
  43. anymodbus-0.1.0/tests/unit/test_framer.py +688 -0
  44. anymodbus-0.1.0/tests/unit/test_framer_encode.py +85 -0
  45. anymodbus-0.1.0/tests/unit/test_mock_constants.py +28 -0
  46. anymodbus-0.1.0/tests/unit/test_pdu_roundtrip.py +366 -0
  47. anymodbus-0.1.0/tests/unit/test_pdu_vectors.py +146 -0
  48. anymodbus-0.1.0/tests/unit/test_slave.py +64 -0
  49. anymodbus-0.1.0/tests/unit/test_smoke.py +31 -0
  50. anymodbus-0.1.0/tests/unit/test_types.py +37 -0
@@ -0,0 +1,70 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+
8
+ # Build artifacts
9
+ build/
10
+ dist/
11
+ *.egg-info/
12
+ *.egg
13
+
14
+ # Version file (generated by hatch-vcs)
15
+ src/anymodbus/_version.py
16
+
17
+ # Virtual environments
18
+ .venv/
19
+ venv/
20
+ env/
21
+
22
+ # uv
23
+ .uv-cache/
24
+
25
+ # Testing
26
+ .pytest_cache/
27
+ .coverage
28
+ .coverage.*
29
+ coverage.xml
30
+ htmlcov/
31
+ .hypothesis/
32
+
33
+ # Type checking
34
+ .mypy_cache/
35
+ .pyright/
36
+ .pytype/
37
+
38
+ # Ruff
39
+ .ruff_cache/
40
+
41
+ # Editors
42
+ .vscode/
43
+ .idea/
44
+ *.swp
45
+ *.swo
46
+ *~
47
+ .DS_Store
48
+
49
+ # Docs
50
+ site/
51
+ docs/_build/
52
+
53
+ # Reference specs (uncertain redistribution rights)
54
+ docs/modbusoverserial.md
55
+ docs/modbusprotocolspecification.md
56
+
57
+ # Benchmarks
58
+ benchmarks/results/
59
+ .benchmarks/
60
+
61
+ # Local tooling
62
+ .claude/
63
+ .codex
64
+ .cache/
65
+
66
+ # act (local GitHub Actions runner)
67
+ .secrets
68
+ .env
69
+ .act-event*.json
70
+ /tmp/act-artifacts/
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ All notable changes to `anymodbus` are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
+ the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ Initial v0.1 release. See [DESIGN.md](DESIGN.md) for the full plan.
11
+
12
+ ### Added
13
+
14
+ - Repository skeleton: `pyproject.toml`, `Makefile`, CI/docs/publish workflows,
15
+ pre-commit config, src/tests/docs layout.
16
+ - Foundational pure-Python pieces:
17
+ `anymodbus._types` (enums + small dataclasses),
18
+ `anymodbus.exceptions` (full `ModbusError` tree + `code_to_exception` translator),
19
+ `anymodbus.crc` (CRC-16/Modbus, 256-entry table),
20
+ `anymodbus.config` (frozen dataclasses with validation).
21
+ - `WordOrder` and `ByteOrder` named enums for 32-bit value layout, with
22
+ defaults matching the Modbus Application Protocol spec example
23
+ (high-word-first, big-endian within word).
24
+ - `Bus` (half-duplex single-master client) and per-slave `Slave` handle, with
25
+ `open_modbus_rtu(...)` convenience opener over `anyserial`.
26
+ - Length-aware RTU `Framer` with timing-gap fallback for unknown function codes
27
+ and tx-side 3.5-character pre-tx idle gap.
28
+ - PDU encode/decode for the v0.1 function code set (FC 1–6, 15, 16) and
29
+ `decoders` for 32-bit float / int values across two registers.
30
+ - `Capability` model (`SUPPORTED`/`UNSUPPORTED`/`UNKNOWN`) populated from probe
31
+ results.
32
+ - Sync wrapper (`anymodbus.sync`) using the same shared-portal pattern as
33
+ `anyserial.sync`.
34
+ - `anymodbus.testing` with `MockSlave`, `FaultPlan`, and `client_slave_pair()`
35
+ for hardware-free integration tests.
36
+
37
+ [Unreleased]: https://github.com/GraysonBellamy/anymodbus/compare/HEAD...HEAD