mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
ECF reconstruction per SAP10 §20.1 (Mid physics, ADR-0008): total_cost_gbp = (space_kwh*p_space + dhw_kwh*p_dhw + light_kwh*p_elec) / 100 ECF = 0.42 * total_cost / (TFA + 45) log10_ecf = log10(ECF) [0 for non-positive] p_* are Table 32 unit prices via fuel_unit_price_p_per_kwh. Standing charges deliberately omitted (constant fuel-mix offset; ADR-0008). predicted_sap_score is NOT emitted as a feature (ADR-0008 Mid not Deep): the model is left to learn the piecewise log/linear transform from log10_ecf -> SAP itself, keeping the data layer SAP-version-agnostic. VERSION 0.3.0 -> 0.4.0 (MINOR). |
||
|---|---|---|
| .. | ||
| 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/.