Model/domain/modelling
Jun-te Kim 79f89d872e Treat solar block without array sizing as no-solar (fix KeyError)
2 modelling_e2e properties failed with KeyError: 'maxArrayPanelsCount'.

Google returns a `solarPotential` block with no array-level sizing fields
(`maxArrayPanelsCount` / `panelCapacityWatts`) for buildings with no usable
solar estimate. `SolarPotential.from_building_insights` hard-indexed those keys
and crashed the whole property.

Fix: the projection now returns Optional and yields None when those fields are
absent — the established "no solar potential" outcome (the orchestrator and
recommendation path already type it Optional and skip solar on None). Existing
callers (`_solar_potential_for`, harness) already assign to Optional.

Regression test + `assert is not None` narrowing on the valid-fixture tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 10:22:06 +00:00
..
generators measured excluded plus get geospatial nearby stuff working 2026-06-22 16:12:16 +00:00
optimisation refactor(modelling): type measure_type fields as MeasureType 2026-06-08 20:13:31 +00:00
scoring Land an override on the EPC's part at its position when the label is absent 🟩 2026-06-23 17:09:11 +00:00
__init__.py feat(modelling): Overlay Applicator folds EpcSimulation onto EpcPropertyData 2026-06-02 22:13:51 +00:00
ashp_rates.json refactor(modelling): load ASHP rates from a committed costs file 2026-06-06 23:19:53 +00:00
considered_measures.py feat(modelling): drive measure scoping from the Scenario's exclusions 2026-06-16 15:26:25 +00:00
contingencies.py feat(modelling): cost data for secondary-heating-removal (ADR-0028) 2026-06-11 13:51:16 +00:00
heating_rates.json feat(modelling): composite per-dwelling boiler + tune-up costing (ADR-0027) 2026-06-10 19:41:06 +00:00
measure_type.py feat(modelling): secondary-heating-removal generator + MeasureType (ADR-0028) 2026-06-11 13:35:14 +00:00
plan.py refactor(modelling): type measure_type fields as MeasureType 2026-06-08 20:13:31 +00:00
portfolio_goal.py refactor(modelling): move PortfolioGoal to domain/modelling/ 2026-06-03 22:44:48 +00:00
product.py feat(modelling): persist recommendation.material_id from the catalogue 2026-06-04 08:26:58 +00:00
products.py feat(modelling): composite per-dwelling boiler + tune-up costing (ADR-0027) 2026-06-10 19:41:06 +00:00
recommendation.py refactor(modelling): type measure_type fields as MeasureType 2026-06-08 20:13:31 +00:00
scenario.py feat(modelling): drive measure scoping from the Scenario's exclusions 2026-06-16 15:26:25 +00:00
simulation.py landlord override data added 2026-06-20 12:57:54 +00:00
solar_potential.py Treat solar block without array sizing as no-solar (fix KeyError) 2026-06-24 10:22:06 +00:00
solar_rates.json feat(modelling): Products.solar_bundle_cost + committed solar rate sheet 2026-06-08 12:10:27 +00:00
valuation.py feat(modelling): ValuationUplift domain class (percentage-primary) 2026-06-04 08:33:19 +00:00