From bb878cd6c8c02cee4feefe0a3fd1b07e4a6422a1 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Tue, 26 Aug 2025 10:55:02 +0000 Subject: [PATCH] loft space --- deployment/lambda/extractor_and_loader/docker/app.py | 3 ++- etl/fileReader/sitenotes.py | 10 ++++++++++ etl/transform/conditionReportTypes.py | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/deployment/lambda/extractor_and_loader/docker/app.py b/deployment/lambda/extractor_and_loader/docker/app.py index 2da0228..d345df2 100644 --- a/deployment/lambda/extractor_and_loader/docker/app.py +++ b/deployment/lambda/extractor_and_loader/docker/app.py @@ -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")) diff --git a/etl/fileReader/sitenotes.py b/etl/fileReader/sitenotes.py index 736dec4..425c5a3 100644 --- a/etl/fileReader/sitenotes.py +++ b/etl/fileReader/sitenotes.py @@ -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): diff --git a/etl/transform/conditionReportTypes.py b/etl/transform/conditionReportTypes.py index fe0d816..ee3c091 100644 --- a/etl/transform/conditionReportTypes.py +++ b/etl/transform/conditionReportTypes.py @@ -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