Model/docs/sap-spec
Khalim Conn-Kowlessar fe04cd3a35 pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests
Parser/ETL for BRE PCDB pcdb10.dat (April 2026 revision). domain.sap.tables.pcdb.parser exposes parse_table_105 (typed GasOilBoilerRecord with brand/model/winter+summer+comparative-HW efficiency/output kW/final year) plus parse_table_raw for generic positional ingestion (pcdb_id + raw row only). etl.py runs the full ETL: reads pcdb10.dat as latin-1, writes per-table .jsonl files under docs/sap-spec/. Idempotent; runnable via PYTHONPATH=packages/domain/src python -m domain.sap.tables.pcdb.etl.

Per Q1=D grilling: all 8 tables of interest ingested — 105 (Gas/Oil Boilers, typed) plus 122/143/313/353/362/391/506 (raw). Per-table typed refinement deferred to the follow-up slices that wire each table's cert-side cascade. Per Q3=B: typed fields decode against ncm-pcdb.org.uk ground-truth records (Baxi 000098 + Potterton 000619 + Saunier Duval 000732 verified by user); full raw row preserved on every record for forensics. Per Q2 user choice: NDJSON .jsonl format chosen over indented JSON to keep diff-friendliness while halving file size (17MB total vs 31MB pretty-printed).

Edge cases handled: latin-1 encoding (manufacturer addresses carry the degree sign), `'obsolete'` status string where a year would otherwise live, `'>70kW'` range indicator on output-power fields — non-numeric values fall to None with the raw string preserved on `raw`.

Slice 2 lands the domain.sap.tables.pcdb runtime lookup module (per-table by-pcdb-id dicts loaded at import time). Slice 3 wires Table 105 into cert_to_inputs.main_heating_efficiency / water_efficiency precedence cascades per Q5=B (space heating + water heating scalar override; equation D1 monthly + Appendix N HP factor + FGHRS/WWHRS/HIU deferred).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 09:43:41 +00:00
..
CALCULATOR_DESIGN_SKETCH.md ADR-0009: pivot to deterministic SAP 10.3 calculator (Accepted) 2026-05-17 21:27:21 +00:00
HANDOVER_NEXT.md docs: handover for §8c Space cooling + 000490 SAP-score diagnostic 2026-05-20 23:03:15 +00:00
HANDOVER_SECTION_6.md docs: handover for §6 Solar gains agent 2026-05-20 19:29:30 +00:00
PARITY_FINDINGS.md Record post-P5 parity-probe baseline (2026-05-19) 2026-05-19 16:19:01 +00:00
pcdb10.dat pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_105_gas_oil_boilers.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_122_solid_fuel_boilers.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_143_micro_cogen.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_313_flue_gas_heat_recovery.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_353_waste_water_heat_recovery.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_362_heat_pumps.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_391_high_heat_retention_storage_heaters.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
pcdb_table_506_heat_interface_units.jsonl pcdb slice 1: pcdb10.dat ETL → 8 per-table NDJSON files + parser + 8 tests 2026-05-21 09:43:41 +00:00
rdsap-10-specification-2025-06-10.pdf ADR-0009: pivot to deterministic SAP 10.3 calculator (Accepted) 2026-05-17 21:27:21 +00:00
sap-10-2-full-specification-2025-03-14.pdf slice S-B9: SAP 10.2/10.3 Table 12 spec-correct prices + Table 12a fix 2026-05-18 15:14:11 +00:00
sap-10-3-full-specification-2026-01-13.pdf ADR-0009: pivot to deterministic SAP 10.3 calculator (Accepted) 2026-05-17 21:27:21 +00:00
SPEC_COVERAGE.md docs: SPEC_COVERAGE §9a row + slice progress table + PCDB gap-list update 2026-05-21 08:41:23 +00:00