feat!: v0.2.0 — module split, Rust parity, PyPI-ready
Split monolithic __init__.py into six modules matching the Rust client structure: protocol.py, codec.py, discovery.py, transport.py, connect.py, client.py. All symbols re-exported from top-level for backwards compat. New features: - Ping-on-connect validation (200ms handshake, matches Rust v0.2.0) - try_connect(), connect_default(), connect_mux_auto(), validate() - connect() commits to mux when socket exists (no USB fall-through) - Bandwidth/ErrorCode IntEnums, RadioConfig TypedDict, py.typed marker - MAX_PAYLOAD, RADIO_CONFIG_SIZE, tag/error constants - Payload size validation on Transmit - 46 pytest tests ported from Rust (protocol, codec, client, firmware compat) - GitHub Actions CI (ruff + pytest on 3.10-3.13 + PyPI publish) - Strict ruff linting (E, W, F, I, UP, B, C4, ARG, SIM, RUF) Breaking: package renamed back to donglora (from donglora-python). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
19 files changed
+1787
-395
No files matched your search
+30
-5
@@ -1,13 +1,20 @@
|
||||
[project]
|
||||
name = "donglora-python"
|
||||
version = "0.1.0"
|
||||
name = "donglora"
|
||||
version = "0.2.0"
|
||||
description = "DongLoRa host library — talk LoRa from Python over USB"
|
||||
license = "MIT"
|
||||
requires-python = ">=3.10"
|
||||
authors = [{ name = "Stephen Waits" }]
|
||||
keywords = ["lora", "radio", "usb", "embedded"]
|
||||
readme = "README.md"
|
||||
authors = [{ name = "Stephen Waits", email = "steve@waits.net" }]
|
||||
keywords = ["lora", "radio", "usb", "embedded", "serial"]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: Communications :: Ham Radio",
|
||||
"Topic :: System :: Hardware",
|
||||
]
|
||||
@@ -20,9 +27,27 @@ dependencies = [
|
||||
meshcore = ["pycryptodome", "pynacl"]
|
||||
orac = ["pycryptodome", "pynacl", "anthropic"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/donglora/client-py"
|
||||
Homepage = "https://github.com/donglora/client-py"
|
||||
|
||||
[dependency-groups]
|
||||
dev = ["ruff"]
|
||||
dev = ["ruff", "pytest", "pytest-cov"]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "W", "F", "I", "UP", "B", "C4", "ARG", "SIM", "RUF"]
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["donglora"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
Reference in new issue
Block a user