From edecbe6bef5e512b38978e41b59e520adb8da08b Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 20 Apr 2026 08:10:45 +0000 Subject: [PATCH] =?UTF-8?q?pdf=20json=20to=20RdSapSiteNotes=20full=20extra?= =?UTF-8?q?ct=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/documents_parser/extractor.py | 17 ++++++++++++++++- .../epc/surveys/pashub_rdsap_site_notes.py | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/backend/documents_parser/extractor.py b/backend/documents_parser/extractor.py index 280494fb..341664a4 100644 --- a/backend/documents_parser/extractor.py +++ b/backend/documents_parser/extractor.py @@ -82,7 +82,22 @@ class PasHubRdSapSiteNotesExtractor: # --- public extract methods --- def extract(self) -> PasHubRdSapSiteNotes: - raise NotImplementedError + return PasHubRdSapSiteNotes( + inspection_metadata=None, + general=self.extract_general(), + building_construction=self.extract_building_construction(), + building_measurements=self.extract_building_measurements(), + roof_space=self.extract_roof_space(), + windows=self.extract_windows(), + heating_and_hot_water=self.extract_heating_and_hot_water(), + ventilation=self.extract_ventilation(), + conservatories=self.extract_conservatories(), + renewables=self.extract_renewables(), + room_count_elements=self.extract_room_count_elements(), + water_use=self.extract_water_use(), + customer_response=self.extract_customer_response(), + addendum=self.extract_addendum(), + ) def extract_general(self) -> General: inspection_date_raw = self._get("Inspection Date:") diff --git a/datatypes/epc/surveys/pashub_rdsap_site_notes.py b/datatypes/epc/surveys/pashub_rdsap_site_notes.py index c5b3dbe4..aee4655b 100644 --- a/datatypes/epc/surveys/pashub_rdsap_site_notes.py +++ b/datatypes/epc/surveys/pashub_rdsap_site_notes.py @@ -275,7 +275,7 @@ class SurveyAddendum: @dataclass class PasHubRdSapSiteNotes: - inspection_metadata: InspectionMetadata + inspection_metadata: Optional[InspectionMetadata] general: General building_construction: BuildingConstruction building_measurements: BuildingMeasurements