Release 0.2.0: dependency floors, ruff, tests, CI #1

Merged
tim merged 7 commits from release/0.1.2.post1 into main 2026-10-12 08:34:29 +00:00
Owner

First release maintained in this fork. main is upstream v0.1.2 plus the fix that bounds BLE operations and force-disconnects on failure, so BLE proxy connection slots are released (405d29f).

Versioned 0.2.0: the dependency floors and Python requirement changed, so this is no longer a drop-in for upstream 0.1.2.

Commits

  1. chore: release 0.1.2.post1: initial version bump (superseded by the last commit).
  2. build: declare real dependency floors and Python version
    • bleak>=3.0.2, bleak-retry-connector>=4.7.1 instead of *. These are what Home Assistant 2026.10.1 pins, and what the tests run against.
    • python>=3.14 instead of >=3.9. The code already needed 3.11+ (int.from_bytes without byteorder, match, strict zip), so 3.9 was never true. 3.14 is what current Home Assistant requires.
    • pytest and pytest-asyncio declared as dev dependencies.
  3. chore: add ruff lint/format config and pre-commit: same E4/E7/E9/F rule set as the integration repo.
  4. style: apply ruff format: formatting only, the Python ASTs of all changed modules are identical before and after.
  5. test: 176 new tests (decoders, 11-bit CAN framing, OBDCommand, utils). Coverage 31% to 59%.
  6. ci: ruff check, ruff format --check and pytest on the python-3.14 runner, for pull requests and pushes to main.
  7. chore: version 0.2.0.

Verification

  • 182 tests pass on Python 3.14.8 with bleak 3.0.2 and bleak-retry-connector 4.7.1.
  • pre-commit (ruff check and format) passes.
  • The CI steps were dry-run locally in python:3.14-slim.

Not covered

  • elm327.py (26%), obd.py (19%), api.py (30%) and most of bleserial.py (48%). These need a scripted fake serial link.
  • mypy reports 5 errors in obd.py (self.interface is Optional). Not touched.

After merging

Create tag v0.2.0 on the merge commit. The Home Assistant integration (tim/hass-nissan-leaf-obd-ble!1) pins to that tag.

Generated with Claude Code

First release maintained in this fork. `main` is upstream v0.1.2 plus the fix that bounds BLE operations and force-disconnects on failure, so BLE proxy connection slots are released (`405d29f`). Versioned **0.2.0**: the dependency floors and Python requirement changed, so this is no longer a drop-in for upstream 0.1.2. ## Commits 1. **chore: release 0.1.2.post1**: initial version bump (superseded by the last commit). 2. **build: declare real dependency floors and Python version** - `bleak>=3.0.2`, `bleak-retry-connector>=4.7.1` instead of `*`. These are what Home Assistant 2026.10.1 pins, and what the tests run against. - `python>=3.14` instead of `>=3.9`. The code already needed 3.11+ (`int.from_bytes` without byteorder, `match`, strict `zip`), so 3.9 was never true. 3.14 is what current Home Assistant requires. - pytest and pytest-asyncio declared as dev dependencies. 3. **chore: add ruff lint/format config and pre-commit**: same E4/E7/E9/F rule set as the integration repo. 4. **style: apply ruff format**: formatting only, the Python ASTs of all changed modules are identical before and after. 5. **test**: 176 new tests (decoders, 11-bit CAN framing, OBDCommand, utils). Coverage 31% to 59%. 6. **ci**: ruff check, ruff format --check and pytest on the `python-3.14` runner, for pull requests and pushes to main. 7. **chore: version 0.2.0**. ## Verification - 182 tests pass on Python 3.14.8 with bleak 3.0.2 and bleak-retry-connector 4.7.1. - pre-commit (ruff check and format) passes. - The CI steps were dry-run locally in `python:3.14-slim`. ## Not covered - `elm327.py` (26%), `obd.py` (19%), `api.py` (30%) and most of `bleserial.py` (48%). These need a scripted fake serial link. - `mypy` reports 5 errors in `obd.py` (`self.interface` is Optional). Not touched. ## After merging Create tag `v0.2.0` on the merge commit. The Home Assistant integration (tim/hass-nissan-leaf-obd-ble!1) pins to that tag. Generated with [Claude Code](https://claude.com/claude-code)
First release maintained in this fork: upstream 0.1.2 plus the fix that
bounds BLE operations and force-disconnects on failure to release proxy
connection slots. The .post1 suffix keeps it distinct from the PyPI 0.1.2
so pip never treats the two as the same package.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- bleak >=3.0.2 and bleak-retry-connector >=4.7.1 instead of "*": these
  are the versions Home Assistant 2026.10 pins and the tests run
  against; bleak-retry-connector 4.7.1 itself requires bleak>=3.0.2
- Python >=3.14: the code already needs 3.11+ (int.from_bytes without
  byteorder, match statements, strict zip), so ">=3.9" was wrong, and
  3.14 is what current Home Assistant requires
- classifiers follow the declared version
- declare pytest and pytest-asyncio as dev dependencies

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Same E4/E7/E9/F rule set as the Home Assistant integration repo, with
ruff-check and ruff-format hooks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Formatting only: the Python ASTs of all changed modules are identical
before and after. Also formats the Python code blocks in the README.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Characterisation tests for the pure-logic layers (no BLE needed):

- every Leaf decoder, including LBC sign extension of negative current
- 11-bit CAN framing: single and multi frame reassembly, out-of-order
  and missing consecutive frames, truncation, DTC trimming, ECU ordering,
  non-hex ELM lines
- OBDCommand padding/trimming, equality/hash/clone, command table
  invariants (unique header+command, valid hex, known headers)
- utils.isHex / utils.contiguous

Coverage 31% -> 59%. Still untested: elm327.py, obd.py and api.py, which
need a scripted fake serial link.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tim changed title from chore: release 0.1.2.post1 to Release 0.1.2.post1: dependency floors, ruff, tests 2026-10-12 08:18:27 +00:00
ci: lint and test on the python-3.14 runner
All checks were successful
Test / Lint and test (pull_request) Successful in 16s
b5daa76bb5
Runs ruff check, ruff format --check and the test suite in a venv on
pull requests and pushes to main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
chore: version 0.2.0
All checks were successful
Test / Lint and test (pull_request) Successful in 16s
a3af6073b7
Replaces the 0.1.2.post1 suffix: the dependency floors and Python
requirement changed, which a post-release should not do. The fork is no
longer a drop-in for upstream 0.1.2, so it gets its own minor version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tim changed title from Release 0.1.2.post1: dependency floors, ruff, tests to Release 0.2.0: dependency floors, ruff, tests, CI 2026-10-12 08:30:29 +00:00
tim merged commit b4f70c2330 into main 2026-10-12 08:34:29 +00:00
tim deleted branch release/0.1.2.post1 2026-10-12 08:34:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tim/py-nissan-leaf-obd-ble!1
No description provided.