mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Heating: primary_sap_main_heating_code (the SAP10 heating-system enum was the single biggest missing input), primary_emitter_temperature, primary_main_heating_fraction. Hot water: immersion_heating_type, shower_outlet_count. Windows: window_pct_living, window_pct_external, window_pct_permanent_shutters (area-weighted shares parallel to existing window aggregates). Dwelling: conservatory_type, has_heated_separate_conservatory. Flat-only block (sap_flat_details): flat_level, flat_top_storey, flat_storey_count, flat_location, flat_heat_loss_corridor (int sentinels like '20+' coerce to None for the categorical features). Energy supply: meter_type, pv_connection, wind_turbines_terrain_type. Also plumbs `air_tightness` EnergyElement, `sap_flat_details` and `has_heated_separate_conservatory` through the 21.0.1 mapper path (they were silently None before). Results at N=25,000 2026 RdSAP certs: sap_score MAPE=0.044 sMAPE=0.038 R^2=0.884 (+0.045 R^2 vs 15a) co2_emissions sMAPE=0.108 R^2=0.925 peui_raw MAPE=0.092 sMAPE=0.088 R^2=0.849 peui_ucl MAPE=0.081 sMAPE=0.078 R^2=0.860 space_heating_kwh MAPE=0.111 sMAPE=0.108 R^2=0.945 hot_water_kwh MAPE=0.081 sMAPE=0.079 R^2=0.772 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/.