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
@@ -6,8 +6,8 @@ default: check
|
||||
_ensure_tools:
|
||||
@mise trust --yes . 2>/dev/null; mise install --quiet
|
||||
|
||||
# Run all checks (fmt, lint)
|
||||
check: fmt-check lint
|
||||
# Run all checks (fmt, lint, test)
|
||||
check: fmt-check lint test
|
||||
|
||||
# Format code
|
||||
fmt: _ensure_tools
|
||||
@@ -20,3 +20,7 @@ fmt-check: _ensure_tools
|
||||
# Lint
|
||||
lint: _ensure_tools
|
||||
@uv run ruff check .
|
||||
|
||||
# Run tests
|
||||
test: _ensure_tools
|
||||
@uv run pytest -v
|
||||
Reference in new issue
Block a user