mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
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> |
||
|---|---|---|
| .. | ||
| CALCULATOR_DESIGN_SKETCH.md | ||
| HANDOVER_NEXT.md | ||
| HANDOVER_SECTION_6.md | ||
| PARITY_FINDINGS.md | ||
| pcdb10.dat | ||
| pcdb_table_105_gas_oil_boilers.jsonl | ||
| pcdb_table_122_solid_fuel_boilers.jsonl | ||
| pcdb_table_143_micro_cogen.jsonl | ||
| pcdb_table_313_flue_gas_heat_recovery.jsonl | ||
| pcdb_table_353_waste_water_heat_recovery.jsonl | ||
| pcdb_table_362_heat_pumps.jsonl | ||
| pcdb_table_391_high_heat_retention_storage_heaters.jsonl | ||
| pcdb_table_506_heat_interface_units.jsonl | ||
| rdsap-10-specification-2025-06-10.pdf | ||
| sap-10-2-full-specification-2025-03-14.pdf | ||
| sap-10-3-full-specification-2026-01-13.pdf | ||
| SPEC_COVERAGE.md | ||