Model/datatypes/epc/domain
Khalim Conn-Kowlessar 29ab80b0e5 Slice 47: Summary_000474 chain pins SAP at 1e-4 vs worksheet PDF
Two diffs closed against the hand-built `_elmhurst_worksheet_000474`
target (SAP 62.2584):

1. `pumps_fans_kwh_per_yr` (130 → 160). The cascade keys §4f pumps+fans
   electricity on `MainHeatingDetail.main_heating_category` (gas-fired
   boilers = cat 2 → 160 kWh/yr). `from_elmhurst_site_notes` wasn't
   populating the field, so it fell through to the default 130. Added
   `_elmhurst_main_heating_category` deriving cat 2 for the gas/LPG-
   PCDB-boiler branch; other categories deferred until a fixture
   exercises them (consistent with the cascade lookup).

2. Window [4] orientation `East-South` → `East` and window [5]
   orientation `''` → `South-East`. The layout-style parser's
   `before_start = prev_manuf + 7` / `after_end = next_data` rule was
   over-grabbing prefix tokens of W_{k+1} as suffix tokens of W_k
   ('South' from W_5's prefix bled into W_4's suffix). Replaced with
   a symmetric partition on the first glazing-type-start token
   (`Single`/`Double`/`Triple`/`Secondary`) within the cross-window
   gap, used as the upper bound of W_k's suffix and the lower bound
   of W_{k+1}'s prefix. Same boundary on both sides — prefix tokens
   of the next window can no longer be attributed as suffix of the
   current one.

After both fixes, Summary_000474 → ElmhurstSiteNotes → EpcPropertyData
→ cascade → SAP matches the worksheet PDF's unrounded line 257 value
to 1e-4 tolerance. All 754 datatypes/epc/ + backend/documents_parser/
tests green; pyright net-zero on touched files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 19:01:38 +00:00
..
tests Slice 44: flat_roof_insulation_thickness mapper fix — surface lodged value on SapBuildingPart 2026-05-24 15:28:10 +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 Slice 25b: 000487 §4 closure (7/8) — has_electric_shower routes Nbath 2026-05-23 22:44:40 +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 Slice 47: Summary_000474 chain pins SAP at 1e-4 vs worksheet PDF 2026-05-24 19:01:38 +00:00