mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Closes 31 of 32 mapper-vs-hand-built load-bearing divergences by populating fields the Elmhurst mapper extracts from Summary_000480. pdf but the original cohort hand-built left at their `make_minimal_ sap10_epc` / dataclass-default values. Every change is cascade- equivalent — none alter `_FIXTURE_PINS["000480"]` SapResult fields (all 11 1e-4 pins remain GREEN against worksheet `SAP value 61.2986`). Mirrors the Slice 64 / 72 pattern. 000480-specific deltas vs 000477: - Two SapBuildingParts (Main + Ext1) → Cat A descriptive fields applied per-bp; Ext1 floor is "Above unheated space" (not "Ground floor") because the extension hangs over an open passageway (the cert's `is_exposed_floor=True` for the lowest Ext1 floor). - `roof_insulation_thickness=300` on Main — cascade-inert because the RR (19.83 m²) is larger than the Main storey footprint (15.28 m²), so Main has no external roof line; set for field parity with the mapper, which extracts the §8 Main row's 300 mm regardless. - `extensions_count=1` — was 0 by default; the mapper extracts it from `len(survey.extensions)` (Slice 54 fix). Standard Cat A additions (per Slice 72 pattern): floor descriptive fields, roof_insulation_location, 6 ventilation zero counts, draught_lobby=True, pressure_test="Not available", top-level descriptive strings + booleans + number_of_storeys=3, shower_outlets, central_heating_pump_age_str. Diff count: 32 → **1**. Remaining diff is structural: - `sap_windows: LEN 7 vs 2` — closed via the next-slice 1:1 expansion. 11 cohort 000480 cascade pins still GREEN; pyright net-zero on the touched fixture. 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/.