@@ -27,11 +27,11 @@ Every change MUST include **all** of the following:
2727
2828- [ ] ** Tests** — new or updated tests covering the change with ** ≥ 95% coverage** for affected modules. Verify with:
2929 ``` bash
30- pytest --cov=ha_client --cov-report=term-missing --cov-fail-under=95
30+ pytest --cov=haclient --cov-report=term-missing --cov-fail-under=95
3131 ```
3232- [ ] ** Documentation** — update relevant files in ` docs/ ` to reflect the change (new features get a new or updated doc page).
3333- [ ] ** README.md** — update the project README if the change affects public API, installation, usage examples, or feature list.
34- - [ ] ** Lint & type-check pass** — ` ruff check . ` and ` mypy ha_client / ` must be clean.
34+ - [ ] ** Lint & type-check pass** — ` ruff check . ` and ` mypy src/haclient / ` must be clean.
3535
3636## Setup
3737
@@ -49,10 +49,10 @@ Python 3.11+ required (`.python-version` pins 3.11).
4949ruff check .
5050
5151# Type-check (strict mode)
52- mypy ha_client /
52+ mypy src/haclient /
5353
5454# Tests with coverage (target ≥95%)
55- pytest --cov=ha_client --cov-report=term-missing --cov-fail-under=95
55+ pytest --cov=haclient --cov-report=term-missing --cov-fail-under=95
5656
5757# Single test file
5858pytest tests/test_client.py
@@ -61,17 +61,17 @@ pytest tests/test_client.py
6161pytest tests/test_client.py::test_name -x
6262```
6363
64- Run order: ` ruff check . ` → ` mypy ha_client / ` → ` pytest `
64+ Run order: ` ruff check . ` → ` mypy src/haclient / ` → ` pytest `
6565
6666## Architecture
6767
68- - ` ha_client /client.py` — ` HAClient ` , the main async facade (REST + WebSocket)
69- - ` ha_client /websocket.py` — low-level WS with auth, keepalive, auto-reconnect
70- - ` ha_client /rest.py` — REST API client
71- - ` ha_client /registry.py` — entity registry (state tracking)
72- - ` ha_client /entity.py` — base ` Entity ` with state-change dispatch
73- - ` ha_client /sync.py` — ` SyncHAClient ` , blocking wrapper running event loop in background thread
74- - ` ha_client /domains/` — domain entity classes (` MediaPlayer ` , ` Light ` , ` Switch ` , ` Climate ` , ` Cover ` , ` Sensor ` , ` BinarySensor ` )
68+ - ` src/haclient /client.py` — ` HAClient ` , the main async facade (REST + WebSocket)
69+ - ` src/haclient /websocket.py` — low-level WS with auth, keepalive, auto-reconnect
70+ - ` src/haclient /rest.py` — REST API client
71+ - ` src/haclient /registry.py` — entity registry (state tracking)
72+ - ` src/haclient /entity.py` — base ` Entity ` with state-change dispatch
73+ - ` src/haclient /sync.py` — ` SyncHAClient ` , blocking wrapper running event loop in background thread
74+ - ` src/haclient /domains/` — domain entity classes (` MediaPlayer ` , ` Light ` , ` Switch ` , ` Climate ` , ` Cover ` , ` Sensor ` , ` BinarySensor ` )
7575
7676## Testing
7777
@@ -83,5 +83,5 @@ Run order: `ruff check .` → `mypy ha_client/` → `pytest`
8383
8484- Ruff line length: 100
8585- Ruff rules: E, W, F, I (isort), B (bugbear, B008 ignored), UP, C4, SIM
86- - mypy strict mode on ` ha_client /` ; tests are exempt from ` disallow_untyped_defs `
86+ - mypy strict mode on ` src/haclient /` ; tests are exempt from ` disallow_untyped_defs `
8787- Build backend: hatchling
0 commit comments