Release 0.1.0: Python 3.14, tests, lint, CI and security scans #1

Merged
tim merged 6 commits from chore/maintenance-2026-10 into main 2026-10-12 12:04:58 +00:00
Owner

First release maintained in this fork. Upstream (tadasdanielius/pyaltherma) has been idle since February 2023: last release 0.0.21, last commit 2023-02-10, 7 open issues, one test file, no CI.

Versioned 0.1.0: the Python and dependency requirements changed, so this is no longer a drop-in for 0.0.21.

Commits

  1. build: python >=3.14 (was ^3.7), aiohttp >=3.14.4 (was ^3.7.4), dev group pytest >=9 and pytest-asyncio >=1.4, asyncio_mode = auto, version 0.1.0.
  2. fix: narrow two bare except: (one in controllers.read() also swallowed KeyboardInterrupt/CancelledError and dropped the cause), set the _initialized flag that nothing ever set, remove a duplicate unit property (F811). Tests: 6 to 32, coverage 6% to 65%: request envelope, the websocket connection with a regression test for upstream issue #6 (concurrent requests must never overlap on the socket), profile parsing, and the unit controller read paths.
  3. chore: example.py reads the adapter address from DAIKIN_HOST instead of a hardcoded address.
  4. chore: ruff.toml (E4/E7/E9/F, same as the other repositories) and .pre-commit-config.yaml.
  5. style: ruff format. The Python ASTs of all 11 changed modules are identical before and after.
  6. ci: test.yml, security.yml and auto-tag.yml on the shared workflow-basics actions.

Verified (Python 3.14.8, aiohttp 3.14.5)

  • 32 tests pass; ruff check and ruff format --check clean; bandit -ll clean.
  • The package installs and imports.

Not covered

  • controllers.py is at 47%: the climate-control and water-tank controllers need a device or a much larger fake.
  • Not tested against a real BRP069A62 adapter.

After merging

auto-tag creates v0.1.0 from pyproject.toml on merge. The Home Assistant integration (tim/daikin-altherma) then pins pyaltherma @ git+https://git.timstoop.nl/tim/pyaltherma.git@v0.1.0.

Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98

🤖 Generated with Claude Code

First release maintained in this fork. Upstream (tadasdanielius/pyaltherma) has been idle since February 2023: last release 0.0.21, last commit 2023-02-10, 7 open issues, one test file, no CI. Versioned **0.1.0**: the Python and dependency requirements changed, so this is no longer a drop-in for 0.0.21. ## Commits 1. **build**: `python >=3.14` (was `^3.7`), `aiohttp >=3.14.4` (was `^3.7.4`), dev group `pytest >=9` and `pytest-asyncio >=1.4`, `asyncio_mode = auto`, version 0.1.0. 2. **fix**: narrow two bare `except:` (one in `controllers.read()` also swallowed `KeyboardInterrupt`/`CancelledError` and dropped the cause), set the `_initialized` flag that nothing ever set, remove a duplicate `unit` property (F811). **Tests: 6 to 32, coverage 6% to 65%**: request envelope, the websocket connection with a regression test for upstream issue #6 (concurrent requests must never overlap on the socket), profile parsing, and the unit controller read paths. 3. **chore**: `example.py` reads the adapter address from `DAIKIN_HOST` instead of a hardcoded address. 4. **chore**: `ruff.toml` (E4/E7/E9/F, same as the other repositories) and `.pre-commit-config.yaml`. 5. **style**: ruff format. The Python ASTs of all 11 changed modules are identical before and after. 6. **ci**: `test.yml`, `security.yml` and `auto-tag.yml` on the shared workflow-basics actions. ## Verified (Python 3.14.8, aiohttp 3.14.5) - 32 tests pass; `ruff check` and `ruff format --check` clean; `bandit -ll` clean. - The package installs and imports. ## Not covered - `controllers.py` is at 47%: the climate-control and water-tank controllers need a device or a much larger fake. - Not tested against a real BRP069A62 adapter. ## After merging `auto-tag` creates `v0.1.0` from `pyproject.toml` on merge. The Home Assistant integration (tim/daikin-altherma) then pins `pyaltherma @ git+https://git.timstoop.nl/tim/pyaltherma.git@v0.1.0`. Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This fork is maintained because upstream has been idle since February
2023. Version 0.1.0 is distinct from upstream's 0.0.21 on PyPI.

- python >=3.14 (was ^3.7): what current Home Assistant runs, and the
  only version the tests run on
- aiohttp >=3.14.4 (was ^3.7.4): the version tested against
- dev group: pytest >=9 and pytest-asyncio >=1.4 (was pytest ^5.2)
- pytest asyncio_mode = auto for the new async tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
- controllers: read() used a bare except that also swallowed
  KeyboardInterrupt/CancelledError and dropped the cause. Catch
  AttributeError, TypeError and ValueError and chain the original error
- profile: AlthermaUnit.init_unit() was guarded by _initialized, which
  nothing ever set, so it re-parsed on every call. Set it after parsing.
  The explicit parse(profile) refresh path is unchanged
- profile: the bare except around consumption parsing now names the
  errors a malformed profile can raise
- controllers: remove a second, identical unit property (F811)

Tests (6 -> 32, coverage 6% -> 65%): request envelope, the websocket
connection including a regression test for upstream issue #6 (concurrent
requests must never overlap on the socket), profile parsing, and the
unit controller read paths.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
No hardcoded address in the example. Also drops an unused variable.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
Same E4/E7/E9/F rule set as the other repositories.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
Formatting only: the Python ASTs of all 11 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>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
ci: lint, test, security scan and auto-tag on the shared actions
All checks were successful
Security / Security scan (pull_request) Successful in 33s
Test / Lint and test (pull_request) Successful in 17s
8c7817e1cb
- test.yml: python-test (ruff check, ruff format --check, pytest)
- security.yml: bandit on pyaltherma, pip-audit of the installed
  environment and gitleaks over history, on PRs, main and weekly
- auto-tag.yml: tags vX.Y.Z from pyproject.toml on merge to main, so
  the tag the Home Assistant integration pins to is never forgotten

Uses tim/workflow-basics @main and the global REPO_WRITER_PAT.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jL41LP9srdcUDYggNpC98
tim merged commit df80c0a141 into main 2026-10-12 12:04:58 +00:00
tim deleted branch chore/maintenance-2026-10 2026-10-12 12:04:58 +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/pyaltherma!1
No description provided.