Model/domain/property_baseline
Khalim Conn-Kowlessar f179950519 feat(baseline): wire BillDerivation into the orchestrator and persist the Bill (ADR-0014)
The PropertyBaselineOrchestrator now reads the current Fuel Rates snapshot
once per batch, builds a BillDerivation, and prices each scored property's
SapResult -> EnergyBreakdown into a Bill carried on PropertyBaselinePerformance
(None only on the stub no-calculator path). The Bill is flattened onto nullable
bill_* flat columns (per-section kwh+cost, standing charges, SEG credit, total)
on the postgres table, with bill_total_annual_bill_gbp as the not-null
discriminator on read-back. Section absent from the bill stays None, not 0.

Updated all four orchestrator construction sites to inject the FuelRatesRepository
port (handler + three test sites), and the FE migration doc to reflect the
prefixed columns and that they are now populated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:51:18 +00:00
..
__init__.py refactor(property-baseline): rename baseline → property_baseline aggregate (PR #1139 review) 2026-06-01 14:54:59 +00:00
bill.py feat(baseline): EnergyBreakdown.from_sap_result + COOLING section 2026-06-02 18:28:22 +00:00
bill_derivation.py feat(baseline): BillDerivation prices an energy breakdown at Fuel Rates (ADR-0014) 2026-06-02 09:38:44 +00:00
calculator_rebaseliner.py feat(baseline): Rebaseliner returns RebaselineResult carrying the SapResult 2026-06-02 18:37:13 +00:00
performance.py refactor(baseline): Performance.from_sap_result replaces the loose mapper 2026-06-02 13:59:25 +00:00
property_baseline_performance.py feat(baseline): wire BillDerivation into the orchestrator and persist the Bill (ADR-0014) 2026-06-02 18:51:18 +00:00
rebaseliner.py feat(baseline): Rebaseliner returns RebaselineResult carrying the SapResult 2026-06-02 18:37:13 +00:00
sap_fuel.py feat(baseline): sap_code_to_fuel normalizes via the calculator's own helper 2026-06-02 18:24:39 +00:00