mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
LINE_91 in the worksheet is `living_area / (4)`, where living_area itself is the §15-rounded materialisation of `Table 27 fraction × TFA`. RdSAP §9.2 (p.52): "The living area is then the fraction multiplied by the total floor area." §15 (p.66) lists "All internal floor areas and living area: 2 d.p." So the actual LINE_91 fed to the §7 zone blend is `round_half_up(Table_27 × TFA, 2) / TFA`, not the raw Table 27 entry. The roundtrip explains why the 4 holdout fixtures lodge LINE_91 = 0.3001 or 0.2501 instead of the Table 27 values 0.30 / 0.25: 000474: 0.30 × 56.79 → 17.04 / 56.79 = 0.3001 000477: 0.25 × 77.58 → 19.40 / 77.58 = 0.2501 000490: 0.25 × 66.06 → 16.52 / 66.06 = 0.2501 `_living_area_fraction` now takes TFA and materialises + rounds + divides; `_living_area_fraction_default` retains the bare Table 27 lookup. Existing `_round_half_up` from heat_transmission is the right utility (same §15 boundary, same half-up convention). Scoreboard: §7 cascade pins 52/60 → 60/60 (closes LINE_92/93 on 000474, 000477, 000480, 000490 — and tightens the already-passing 000487/000516 combinations). Full cascade: 304/312 → 312/312 (100%). e2e SapResult: 27/66 → 56/66 (continuous SAP, ECF, fuel cost, space heating kWh now close on 5/6 fixtures; 000487 still has unrelated downstream defects, all 6 CO2 fails await §12). 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/.