mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Lands real-cert ground-truth conformance tests for the SAP10.2 worksheet, asserting our §1 dimensions, §2 ventilation, and §3 heat-transmission output line-by-line against six Elmhurst-lodged worksheets (000474, 000477, 000480, 000487, 000490, 000516). Each fixture covers a distinct shape: with/without room-in-roof, single-part vs main+extensions, age A and B, party-wall U=0.0 vs U=0.25, 1/2/3 sheltered sides, varying draught-proofing %, and the (12) suspended-timber quirk. §1/§2/§3 module updates back the new line-refs (LINE_31 external-element area, LINE_33 fabric loss, LINE_37 total fabric loss; per-fixture (12) floor / (15) window / (21) shelter-adjusted ach; SapRoomInRoof storey contribution via the 2.45 m §3.9.1 convention). The §3 test currently asserts invariants only ((33) = Σ per-element, (37) = (33) + (36)) because SapRoomInRoof only carries floor_area — gable/slope/stud/flat-ceiling sub-areas the worksheet itemizes are not yet modelled. LINE_3* constants capture the worksheet ground truth for when that gap closes. Adds a SAP-domain README with a step-by-step guide for adding new Elmhurst fixtures from the assessor's PDF pair (Summary + worksheet), including the field-by-field cert → EpcPropertyData mapping table and the gotchas surfaced across the six fixtures (storey-height +0.25 convention, party-wall U code mapping, has_suspended_timber_floor flag truth table, (25) effective-ach formula, Energy Rating vs EPC Costs wind-speed trap). 366 tests pass (was 360 pre-pairs 5-6). 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/.