Model/repositories
Khalim Conn-Kowlessar 53d9f21f73 fix(modelling): offer ASHP when the catalogue has no ASHP row
The ASHP bundle is priced from the rate sheet (ADR-0025); the catalogue
row is read only for its material id, which is nullable end-to-end. The
live `material` catalogue has no `air_source_heat_pump` row, so
`products.get` raised `ValueError: no active product` and aborted every
ASHP-eligible property.

Add `ProductNotFound(ValueError)` + a concrete `ProductRepository
.get_optional`, raise the typed error from both repos, and have
`_ashp_option` look the row up optionally — a missing row now yields an
ASHP Option with `material_id=None` rather than crashing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 14:55:41 +00:00
..
bulk_upload tests files 2026-06-04 11:47:42 +00:00
comparable_properties refactor(epc-prediction): PR review — rename ComparableProperty, relocate PredictionTarget 2026-06-16 13:34:44 +00:00
epc feat(epc-prediction): slice-5c predicted-EPC persistence slot 2026-06-16 03:50:19 +00:00
fuel_rates feat(fuel-rates): FuelRates snapshot + repository foundation (ADR-0014) 2026-06-04 15:40:26 +00:00
geospatial feat(geospatial): batch coordinates_for_uprns lookup (#1227) 2026-06-15 14:35:32 +00:00
landlord_overrides property override 2026-06-05 12:18:13 +00:00
magic_plan correct imports in postgres repo 2026-06-09 14:25:29 +00:00
materials feat(first-run): FirstRunPipeline E2E — Ingestion → Baseline → Modelling (#1136) 2026-06-01 16:28:48 +00:00
plan refactor(modelling): rename the cluster SQLModel classes …Row → …Model 2026-06-03 22:42:21 +00:00
product fix(modelling): offer ASHP when the catalogue has no ASHP row 2026-06-16 14:55:41 +00:00
property feat(epc-prediction): slice-5d target assembly + eligibility gate 2026-06-16 03:56:57 +00:00
property_baseline refactor(property-baseline): rename baseline → property_baseline aggregate (PR #1139 review) 2026-06-01 16:28:48 +00:00
scenario refactor(modelling): consolidate scenario + installed_measure into the subpackage 2026-06-03 22:52:35 +00:00
solar 17.1 and 18 done by claude 2026-06-12 12:52:36 +00:00
spatial feat(spatial): per-UPRN cache repo for the OS spatial reference 2026-06-04 17:15:51 +00:00
tasks added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
unstandardised_address updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
uploaded_file UploadedFilePostgresRepository returns latest uploaded file by deal ID and type 🟩 2026-06-09 11:54:14 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
postgres_unit_of_work.py feat(property): hydrate planning restrictions from the spatial cache 2026-06-04 17:35:39 +00:00
unit_of_work.py feat(repositories): expose the spatial cache repo on the Unit of Work 2026-06-04 17:20:39 +00:00