Map RdSAP-Schema-17.0 certs to EpcPropertyData 🟥

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-12 12:40:04 +00:00
parent 24dcd9aa71
commit 3995433816
3 changed files with 1015 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -66,6 +66,19 @@ def test_supported_schemas_map(cert: dict[str, Any]) -> None:
assert isinstance(result, EpcPropertyData)
def test_rdsap_17_0_maps() -> None:
# Arrange
certs = _load("RdSAP-Schema-17.0")
if not certs:
pytest.skip("no RdSAP-Schema-17.0 corpus harvested")
# Act
result = EpcPropertyDataMapper.from_api_response(certs[0])
# Assert
assert isinstance(result, EpcPropertyData)
def test_rdsap_19_0_synthesises_windows_for_windowless_cert() -> None:
"""ADR-0028 Reduced-Field Synthesis: a reduced 19.0 cert lodges no
per-window geometry, only a glazed_area band the mapper synthesises a

View file

@ -52,8 +52,8 @@ SOURCES: list[tuple[str, str, int]] = [
# 17.0 dominant in certificates-2015.json (~89%); 2016 a fallback.
# ("certificates-2018.json", "RdSAP-Schema-18.0", 1000),
# ("certificates-2017.json", "RdSAP-Schema-17.1", 1000),
("certificates-2020.json", "RdSAP-Schema-19.0", 1000),
# ("certificates-2015.json", "RdSAP-Schema-17.0", 1000),
# ("certificates-2020.json", "RdSAP-Schema-19.0", 1000),
("certificates-2015.json", "RdSAP-Schema-17.0", 1000),
]