Model/tests/infrastructure
Khalim Conn-Kowlessar e136e937d6 fix(heat-transmission): match roof description per part by kind (RdSAP 10 §5.11)
The deduplicated `epc.roofs[]` list cannot be indexed 1:1 against the
building parts (190/329 multi-part certs have len(roofs) != len(parts)),
so every part's `u_roof` consumed a SINGLE join of all roof descriptions.
That leaked one part's insulation state onto another: a "Flat, no
insulation" extension dragged a "Pitched, insulated (assumed)" main roof
to the uninsulated 2.30, ~3x over-stating its heat loss. 3-part certs
systematically under-rated (56% within-0.5, mean -0.79 SAP).

Partition the non-RR roof descriptions into flat vs pitched/sloping and
match each part to its own kind (`_main_roof_descriptions_by_kind`),
falling back to the global join when a part's kind has no matching entry.

Corpus cert 100010129331: roof 110.5 -> 31.3 W/K, +13.10 -> -0.05 SAP.
RdSAP-21.0.1 within-0.5 68.8% -> 69.5% (MAE 0.888 -> 0.859; PE 13.9 ->
13.6); 3-part cohort 56% -> 61%. Floors/ceilings ratcheted. Pinned in
test_heat_transmission (by_kind split + mixed-roof no-contamination).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 00:48:50 +00:00
..
chatgpt moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
epc_client fix(heat-transmission): match roof description per part by kind (RdSAP 10 §5.11) 2026-06-17 00:48:50 +00:00
magic_plan define MagicPlanConfig class to get environment variables 2026-06-05 15:46:32 +00:00
postgres UploadedFile, FileTypeEnum, FileSourceEnum importable from infrastructure.postgres.uploaded_file_table 🟥 2026-06-09 11:42:53 +00:00
solar GoogleSolarApi translates BuildingInsightsNotFoundError to sentinel dict 🟩 2026-06-01 16:28:47 +00:00
__init__.py get rid of comments 2026-05-20 13:21:11 +00:00
conftest.py get rid of comments 2026-05-20 13:21:11 +00:00
test_address2uprn_queue_client.py tests framework completed 2026-05-20 14:00:19 +00:00
test_csv_s3_client.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_s3_client.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_s3_uri.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_sqs_client.py tests framework completed 2026-05-20 14:00:19 +00:00