mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
35 lines
830 B
Python
35 lines
830 B
Python
from typing import Any, List, Optional, TypedDict
|
|
|
|
from etl.xml_survey_extraction.XmlParser import PROPERTY_TYPE_LOOKUP
|
|
|
|
|
|
class Floor(TypedDict):
|
|
area_m2: float
|
|
height_m: float
|
|
heat_loss_perimeter_m: float
|
|
party_wall_length_m: float
|
|
|
|
|
|
class Roof(TypedDict, total=False):
|
|
construction: int # TODO: map to str
|
|
insulation_location: int # TODO: map to str
|
|
insulation_thickness_mm: float
|
|
|
|
|
|
class BuildingPart(TypedDict):
|
|
identifier: str # e.g. "Main Dwelling", "Extension"
|
|
floors: List[Floor]
|
|
roof: Optional[Roof]
|
|
|
|
|
|
class SapPropertyDetails(TypedDict):
|
|
address: str
|
|
property_type: str
|
|
building_parts: List[BuildingPart]
|
|
|
|
|
|
# This file should ultimately live somewhere different, probably
|
|
def parse_rdsap(
|
|
xml_string: str,
|
|
) -> SapPropertyDetails:
|
|
raise NotImplementedError
|