mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Replaces the SAP 10.3 §13 rating constants in `worksheet/rating.py` with SAP 10.2 values per ADR-0010 (active spec target is SAP 10.2, 14-03-2025; spec changed to SAP 10.3 only as of 13-01-2026 which hasn't been adopted): Energy Cost Deflator 0.36 → 0.42 Linear branch slope 16.21 → 13.95 (SAP = 100 − slope × ECF) Log branch intercept 108.8 → 117.0 (SAP = intercept − slope × log10(ECF)) Log branch slope 120.5 → 121.0 The two errors were near-cancelling on the Elmhurst cohort (low-cost combi-gas dwellings on the linear branch): the wrong deflator made our ECF ~14% low, and the wrong linear slope made our SAP drop per unit ECF ~16% high. Their product was close to the spec but not exactly — leaving 000490 stuck 1 SAP integer over PDF after the other component closures (Appendix L, secondary heating, ventilation, pumps_fans) had brought cost to within £0.04 of PDF. Final cohort SAP integer status — **both fixtures hit delta=0**: 000474: integer 62 = PDF 62 (continuous 61.91 vs PDF 62.26, Δ -0.35) 000490: integer 57 = PDF 57 (continuous 57.40 vs PDF 57.40, Δ -0.002) 000490 e2e SAP integer ceiling tightened 1 → 0. Updated 8 internal rating + calculator tests that pinned the SAP 10.3 constants (test_rating.py, test_calculator.py, test_bre_worked_ examples.py). All 685 tests green; 0 xfail. 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/.