mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
The 21.0.1 mapper produced EpcPropertyData with sap_ventilation=None, so the cert→inputs cascade defaulted every ventilation count to zero even when the cert lodged extract fans (most schema-21 certs do). extract_fans_count was double-mapped — surfaced as a top-level field the calculator never reads, but missing from the SapVentilation slice the cascade does read. Fix: populate sap_ventilation in from_rdsap_schema_21_0_1 with extract_fans_count. Drives ~⅓ of the rating-cohort drift on a clean no-PV no-secondary gas-combi cert. Refactored test_golden_fixtures.py from global tolerance ceilings (±13 SAP / ±35 PE) to per-cert pinned residuals at abs SAP=0, PE=0.01 kWh/m², CO2=0.001 t/yr. Each cert's _GoldenExpectation now records the actual current residual (SAP/PE/CO2 — CO2 newly pinned via the postcode-cascade environmental section). Drift in either direction fires the test: tighten the pin on improvement, document on regression. Recorded residuals reflect known remaining mapper gaps (RR room-in- roof extraction on cert 0240, oil cascade on 0390, etc.) — tracked in each cert's notes: field, not acceptance bounds. 930/930 Elmhurst cascade pins unchanged (site-notes EPCs already populate sap_ventilation). 257/257 mapper tests green. 10/10 golden cohort green under the new pins. Pyright net-zero (34 errors before and after). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| domain | ||
| fetchers | ||
| repos | ||
| utils | ||
| README.md | ||
Shared packages
Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).
| Package | Purpose |
|---|---|
domain/ |
Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic. |
repos/ |
Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain. |
fetchers/ |
External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes. |
utils/ |
Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers. |
Adding a new shared package
Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.
See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.