mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
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:
parent
24dcd9aa71
commit
3995433816
3 changed files with 1015 additions and 2 deletions
1000
backend/epc_api/json_samples/RdSAP-Schema-17.0/corpus.jsonl
Normal file
1000
backend/epc_api/json_samples/RdSAP-Schema-17.0/corpus.jsonl
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue