fix broken imports and rename mapper class

This commit is contained in:
Daniel Roth 2026-04-13 16:36:13 +00:00
parent 6415980384
commit 7523012e24
3 changed files with 3 additions and 34 deletions

View file

@ -1,31 +0,0 @@
from .dwelling import (
Dwelling,
FloorDimensions,
FloorDetails,
HotWaterSystem,
LightingDetails,
MainHeatingSystem,
PropertyDetails,
RenewablesDetails,
RoofDetails,
SecondaryHeatingSystem,
VentilationDetails,
WallDetails,
WindowDetails,
)
__all__ = [
"Dwelling",
"FloorDimensions",
"FloorDetails",
"HotWaterSystem",
"LightingDetails",
"MainHeatingSystem",
"PropertyDetails",
"RenewablesDetails",
"RoofDetails",
"SecondaryHeatingSystem",
"VentilationDetails",
"WallDetails",
"WindowDetails",
]

View file

@ -20,7 +20,7 @@ AnyRdSapSchema = Union[
]
class DwellingMapper:
class EpcPropertyDataMapper:
@staticmethod
def from_site_notes(survey: PasHubRdSapSiteNotes) -> EpcPropertyData:

View file

@ -5,7 +5,7 @@ from typing import Any, Dict
import pytest
from datatypes.epc.domain import Dwelling
from datatypes.epc.domain.mapper import DwellingMapper
from datatypes.epc.domain.mapper import EpcPropertyDataMapper
from datatypes.epc.schema.rdsap_schema_21_0_1 import RdSapSchema21_0_1
from datatypes.epc.schema.tests.helpers import from_dict
@ -25,7 +25,7 @@ class TestFromRdSapSchema21_0_1:
@pytest.fixture
def dwelling(self) -> Dwelling:
schema = from_dict(RdSapSchema21_0_1, load("21_0_1.json"))
return DwellingMapper.from_rdsap_schema(schema)
return EpcPropertyDataMapper.from_rdsap_schema(schema)
# --- property_details ---