mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
hot water cylinder added
This commit is contained in:
parent
4079c0303f
commit
652afd5fd3
2 changed files with 21 additions and 5 deletions
|
|
@ -3,7 +3,7 @@ from transform.types import (
|
|||
CompanyInfo, SurverySummaryInfo, AssessorInfo,
|
||||
PropertyDescription, PropertyDetail, Dimension,
|
||||
Walls, Roofs, Floors, Door, VentilationAndCooling,
|
||||
Lighting, WaterHeating
|
||||
Lighting, WaterHeating, HotWaterCylinder,
|
||||
)
|
||||
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_1()
|
||||
# self.get_section_16()
|
||||
# self.get_section_17()
|
||||
# self.get_section_18()
|
||||
|
|
@ -219,6 +218,9 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
# Section 15.0 Water Heating
|
||||
waterHeating = self.get_water_heating()
|
||||
|
||||
# Section 15.1 Hot Water Cylinder
|
||||
hotWaterCylinder = self.get_hot_water_cylinder()
|
||||
|
||||
self.property_description = PropertyDescription(
|
||||
built_form = get_value("Built Form"),
|
||||
detachment_or_position = get_value("Detachment/Position"),
|
||||
|
|
@ -266,6 +268,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
ventilationAndCooling=ventilationAndCooling,
|
||||
lighting=lighting,
|
||||
waterHeating=waterHeating,
|
||||
hotWaterCylinder=hotWaterCylinder,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -709,7 +712,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
fuel_type=dict_.get("fuel_type", ""),
|
||||
)
|
||||
|
||||
def get_section_15_1(self):
|
||||
def get_hot_water_cylinder(self):
|
||||
data = self.raw_data[self.raw_data.index("15.1 Hot Water Cylinder"):self.raw_data.index("16.0 Solar Water Heating")]
|
||||
sub_tites = [
|
||||
"Volume",
|
||||
|
|
@ -721,7 +724,13 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
"16.0 Solar Water Heating",
|
||||
"15.1 Hot Water Cylinder"
|
||||
]
|
||||
self.two_columns_processor(data, sub_tites, avoid, 15.1)
|
||||
dict_ = self.two_columns_processor(data, sub_tites, avoid)
|
||||
return HotWaterCylinder(
|
||||
volume=dict_.get("volume", ""),
|
||||
insulation_type=dict_.get("insulation_type", ""),
|
||||
insulation_thickness=dict_.get("insulation_thickness", ""),
|
||||
thermostat=True if dict_.get("thermostat", "NO").upper() == "YES" else False,
|
||||
)
|
||||
|
||||
def get_section_16(self):
|
||||
data = self.raw_data[self.raw_data.index("16.0 Solar Water Heating"):self.raw_data.index("17.0 Waste Water Heat Recovery System")]
|
||||
|
|
|
|||
|
|
@ -114,6 +114,12 @@ class WaterHeating(BaseModel):
|
|||
heating_type: str
|
||||
fuel_type: str
|
||||
|
||||
class HotWaterCylinder(BaseModel):
|
||||
volume: str
|
||||
insulation_type: str
|
||||
insulation_thickness: str
|
||||
thermostat: bool
|
||||
|
||||
class PropertyDetail(BaseModel):
|
||||
age_band: str
|
||||
dimensions: List[Dimension] = []
|
||||
|
|
@ -144,4 +150,5 @@ class PropertyDescription(BaseModel):
|
|||
door: Optional[Door]
|
||||
ventilationAndCooling: Optional[VentilationAndCooling]
|
||||
lighting: Optional[Lighting]
|
||||
waterHeating: Optional[WaterHeating]
|
||||
waterHeating: Optional[WaterHeating]
|
||||
hotWaterCylinder: Optional[HotWaterCylinder]
|
||||
Loading…
Add table
Reference in a new issue