Files
houseplan-card/tests_backend/requirements.txt
T
Codex 323b7803e0 feat: measurable backend engineering quality — stage 1 (#42)
Tooling: requirements_test.txt becomes the single source of backend CI
dependencies; pyproject.toml configures ruff (E/F/B/I, E501 excluded by
decision) and mypy strict for a grow-only allowlist of six pure modules
(junction_limits annotated to pass). The 42 substantive ruff findings
are fixed — the B023 loop-variable closures bind their variables as
parameter defaults instead of hiding behind noqa, and every remaining
noqa carries a reason (guarded by a test).

Errors: const.ERROR_CODES / ERROR_CODE_FAMILIES formalise the stable
contract; the scanner test proves every emitted code across BOTH paths
(send_error literals; class attrs, literal and variable-passed
MarkerControlError codes, f-string families) is registered and has a
localized message — 22 missing backup.error.* keys added in all four
languages. invalid_passage_fields / invalid_partition_opening_jamb_margin
ship structured JSON details (legacy format read-compat for one beta),
and _errText renders code-first: unknown codes localize, raw English
messages go to the console.

CI: the backend job lints with ruff, refuses a silently skipped HA
harness (import + collect threshold), measures branch coverage over
pure+harness, fails below the committed baseline and uploads
coverage.xml. quality_scale: docs-troubleshooting/examples honestly
done, test-coverage/strict-typing carry staged progress.

User-Visible: yes
Issue: #42
2026-08-30 21:34:31 +03:00

35 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Зависимости HA-харнесса, закреплённые точно (issue #392).
#
# Было так: `pip install pytest voluptuous pytest-homeassistant-custom-component
# home-assistant-frontend` без единой версии. Резолвер выбирал набор сам, и
# выбор зависел не от нашего коммита, а от того, что в этот день лежит на PyPI.
# По SHA нельзя было сказать, чем его проверяли.
#
# Хуже того, выбирал он молча и неудачно. Все релизы phcc начиная с 0.13.348
# (25.07.2026) требуют Python >= 3.14, а job стоял на 3.13 — резолвер уезжал на
# 0.13.316, а та тянет homeassistant 2026.2.3. Интеграция полгода проверялась
# против февральского Home Assistant, и никакой гейт об этом не сообщал.
#
# Переход на актуальный HA оказался бесплатным: замер на ветке
# experiment/392-py314 дал `450 passed, 2 skipped` — ровно то же, что на старом
# наборе. Полугодовой дрейф API нашей интеграции не задел.
#
# Почему 0.13.357, а не последняя. Она — последняя, которая пинует стабильный
# homeassistant 2026.8.3; начиная с 0.13.358 пинуются беты (2026.9.0bN).
# Гейт на бете держать нельзя: её могут перевыпустить под тем же номером, и
# «зелёный» перестанет быть воспроизводимым.
#
# pytest не закреплён намеренно: phcc сам задаёт совместимый диапазон, а жёсткий
# пин с ним конфликтует (проверено — ResolutionImpossible на 9.0.0).
#
# Менять версии здесь можно, но только вместе с прогоном полного набора: это не
# косметика, а смена того, что означает зелёный backend.
voluptuous==0.15.2
pytest-homeassistant-custom-component==0.13.357
home-assistant-frontend==20260826.1
# Ставится транзитивно из phcc; закреплён явно, чтобы версия была видна тому,
# кто читает этот файл, а не только тому, кто читает лог.
homeassistant==2026.8.3
# #42: линт бэкенда (шаг «Линт бэкенда» в validate.yml ставится отсюда же).
ruff==0.16.5