Model/datatypes/epc/domain
Khalim Conn-Kowlessar 28634e8ae5 S0380.222: map API roof_construction codes 6 (thatched) + 7 (dwelling
above) → None

The 2026 sample lodges roof_construction=6 (1 cert, "Thatched, with
additional insulation") and =7 (6 certs, "(same dwelling above)" /
"(another dwelling above)"), both raising UnmappedApiCode and blocking
the cert. roof_construction_type is read ONLY for the §3 "sloping
ceiling" cos(30°) inclined-surface factor (Slice 89); the base roof
U-value comes from the global roofs[].description. Neither code is a
sloping ceiling:
  - 6 = thatched — U set by the description, not this field;
  - 7 = same/another dwelling above — an internal ceiling with no roof
    heat loss (the roof-side analogue of floor_construction code 0,
    governed by the roof_heat_loss / description path).

Map both to None: carries no information the cascade consumes here and
correctly avoids the cos(30°) false-trigger. Empirically inert and
validated — roof W/K is byte-identical whether 6/7 map to None or to an
explicit pitched string across all code-6/7 certs in the sample. 5 of
the 7 now compute (e.g. thatched cert 2276 SAP 62.8 vs lodged 63); the
other 2 also carry a gable_wall_type 2/3 raise (separate, worksheet-
backed slice).

Dict value type widened to Optional[str]. §4 suite 2392 passed; mapper.py
pyright unchanged at 32; new tests suppress reportPrivateUsage (net-zero).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:16:49 +00:00
..
tests S0380.222: map API roof_construction codes 6 (thatched) + 7 (dwelling 2026-06-04 15:16:49 +00:00
__init__.py fix broken imports and rename mapper class 2026-04-13 16:36:13 +00:00
epc.py added ucl corrected peui 2026-05-16 14:39:24 +00:00
epc_codes.csv slice 8a: window physics and orientation aggregates 2026-05-16 15:32:45 +00:00
epc_property_data.py S0380.217: capture wall_insulation_thermal_conductivity (was dropped) 2026-06-04 11:57:00 +00:00
field_mappings.py insulation thickness can be string 🟥 2026-04-15 14:26:09 +00:00
historic_epc.py demo generated for use in address2uprn 2026-05-08 14:48:15 +00:00
historic_epc_matching.py rank address similiarity 2026-05-12 16:02:01 +00:00
mapper.py S0380.222: map API roof_construction codes 6 (thatched) + 7 (dwelling 2026-06-04 15:16:49 +00:00