loft space

This commit is contained in:
Jun-te Kim 2025-08-26 10:55:02 +00:00
parent a21d0f2a9e
commit bb878cd6c8
3 changed files with 24 additions and 1 deletions

View file

@ -200,7 +200,8 @@ def handler(event, context):
print("Downloading file locally for extraction...")
local_path = download_private_s3_file(file_uri)
local_path = os.path.join(os.path.join(os.getcwd(), "../..", "home/Downloads/67-Aylestone-Road-1.pdf"))
# Local development of file, please comment out for prod
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/67-Aylestone-Road-1.pdf"))

View file

@ -497,6 +497,16 @@ class WarmHomesConditionReport(SiteNotesExtractor):
return LoftSpace(
is_the_main_loft_space_accessible=self.get_next_value(data, "Is the main loft space accessible?"),
is_there_more_than_one_loft_space=True if self.get_next_value(data, "extension)?").lower() == "yes" else False,
overall_condition_of_the_loft_space=self.get_next_value(data, "Overall condition of the loft space"),
are_there_visible_signs_of_condesnation_on_the_roof_lining_or_insualtion_layer=self.get_next_value(data, "insulation layer?"),
does_the_loft_space_have_any_defects=self.get_next_value(data, "cracking in walls, etc.)"),
existing_depth_of_loft_insulation=self.get_next_value(data, "Existing Depth of Loft Insulation"),
is_the_insulation_layer_even_across_the_loft=self.get_next_value(data, "Is the insulation layer even across the loft?"),
is_the_loft_boarded_in_any_area=self.get_next_value(data, "Is the loft boarded in any area?"),
condition_of_existing_roof_lining=self.get_next_value(data, "Condition of existing roof lining"),
is_there_an_existing_heating_system_or_plumbing_located_in_the_loft=self.get_next_value(data, "the loft?"),
is_there_any_open_flue_heating_applicanes_within_the_room=self.get_next_value(data, "Is there any open flue heating appliances within the room?"),
is_it_accessible=self.get_next_value(data, "Is it accessible?"),
)
def get_room_in_roof(self):

View file

@ -147,6 +147,18 @@ class Bathroom(BaseModel):
class LoftSpace(BaseModel):
is_the_main_loft_space_accessible: str
is_there_more_than_one_loft_space: bool
overall_condition_of_the_loft_space: Optional[str]
are_there_visible_signs_of_condesnation_on_the_roof_lining_or_insualtion_layer: Optional[str]
does_the_loft_space_have_any_defects: Optional[str]
existing_depth_of_loft_insulation: Optional[str]
is_the_insulation_layer_even_across_the_loft: Optional[str]
is_the_loft_boarded_in_any_area: Optional[str]
condition_of_existing_roof_lining: Optional[str]
is_there_an_existing_heating_system_or_plumbing_located_in_the_loft: Optional[str]
is_there_any_open_flue_heating_applicanes_within_the_room: Optional[str]
is_it_accessible: Optional[str]
class RoomInRoof(BaseModel):
is_there_a_room_in_roof: bool