mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Adds `fuel_cost_section_from_cert(epc)` (delegates to `cert_to_inputs` which already wires `_fuel_cost` with full upstream context). Pins (240a)..(255) — 32 line refs × 6 fixtures = 192 cascade pins, all PASS. Three calculator changes needed for closure: 1. Electric shower (247a) — for 000487 the cert lodges 1 electric shower and the PDF reports (247a) = 79.3036 GBP (= (64a)m × std electricity price). The §4 cascade already computes electric-shower kWh via App J step 8 (slice 25d); now exposed on `WaterHeatingResult` as `electric_shower_kwh_per_yr` and plumbed into `_fuel_cost`. The instant-shower input was previously hardcoded to 0. 2. (241a/241b) main 2 + (242a/242b) secondary fractions — when a row's kWh is zero the PDF reports BOTH high/low fractions as 0 (not 1/0). `_split` in fuel_cost now zeros both fractions when kwh_per_yr <= 0. Cost columns already collapse via multiplication, so this is presentation-only. 3. (242a/242b) secondary fractions for 000474 — same pattern: when no secondary system is lodged, both fractions = 0. Adds §10a LINE_ constants to all 6 fixtures. Extracted from `sap worksheets/U985-0001-NNNNNN.txt` PDF blocks. Cascade scoreboard: 468/468 → 660/660 (§7..§10a closed). e2e SapResult: 6 remaining failures (all `co2_kg_per_yr`, 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/.