wate rheating

This commit is contained in:
Jun-te Kim 2025-03-16 16:49:44 +00:00
parent 23d83605fb
commit f0c02bd035
2 changed files with 17 additions and 4 deletions

View file

@ -3,7 +3,7 @@ from transform.types import (
CompanyInfo, SurverySummaryInfo, AssessorInfo,
PropertyDescription, PropertyDetail, Dimension,
Walls, Roofs, Floors, Door, VentilationAndCooling,
Lighting
Lighting, WaterHeating
)
from datetime import datetime
@ -48,7 +48,6 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
# These one are quick fixes can be done on train or one at a time
# self.get_section_15_0()
# self.get_section_15_1()
# self.get_section_16()
# self.get_section_17()
@ -214,8 +213,12 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
# Section 12
ventilationAndCooling = self.get_ventilation_and_cooling()
# Section 13
lighting = self.get_lighting()
# Section 15.0 Water Heating
waterHeating = self.get_water_heating()
self.property_description = PropertyDescription(
built_form = get_value("Built Form"),
detachment_or_position = get_value("Detachment/Position"),
@ -262,6 +265,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
door=door,
ventilationAndCooling=ventilationAndCooling,
lighting=lighting,
WaterHeating=waterHeating,
)
@ -688,7 +692,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
]
self.two_columns_processor(data, sub_titles, avoid, 14.2)
def get_section_15_0(self):
def get_water_heating(self):
data = self.raw_data[self.raw_data.index("15.0 Water Heating"):self.raw_data.index("15.1 Hot Water Cylinder")]
sub_titles = [
"Heating Type",
@ -698,7 +702,12 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
"15.0 Water Heating",
"15.1 Hot Water Cylinder",
]
self.two_columns_processor(data, sub_titles, avoid, 15.0)
dict_ = self.two_columns_processor(data, sub_titles, avoid)
return WaterHeating(
heating_type=dict_.get("heating_type", ""),
fuel_type=dict_.get("fuel_type", ""),
)
def get_section_15_1(self):
data = self.raw_data[self.raw_data.index("15.1 Hot Water Cylinder"):self.raw_data.index("16.0 Solar Water Heating")]

View file

@ -110,6 +110,10 @@ class MainHeating(BaseModel):
model_qualifer: str
controls: MainHeatingSystemControls
class WaterHeating(BaseModel):
heating_type: str
fuel_type: str
class PropertyDetail(BaseModel):
age_band: str
dimensions: List[Dimension] = []