mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
A SAP-16.x cohort cert (9258-4062-7265-2844-7954) lodges a bare int building- part identifier (the second part as `1` after "Main Dwelling"). `BuildingPartIdentifier.from_api_string` regex-matched it assuming a string and raised "TypeError: expected string or bytes-like object, got 'int'", failing the whole property. Fix: guard the match on `isinstance(api_identifier, str)` so a non-string identifier falls to OTHER, matching the documented "anything unrecognised -> OTHER" contract. The baseline SAP fabric sums all building parts regardless of identifier, so OTHER is SAP-neutral; the identifier only labels parts for measure targeting. Fixes every mapper (all route through from_api_string). Cert now maps + calculates (sap 63). Regression test added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| applications | ||
| datatypes | ||
| domain | ||
| e2e | ||
| fixtures/epc_prediction | ||
| harness | ||
| infrastructure | ||
| lambdas | ||
| magic_plan | ||
| orchestration | ||
| repositories | ||
| scripts | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_lambda_packaging.py | ||