From 5ed3bf73e80d15a68f7e00984e74e96d6067e36f Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 2 Jun 2026 12:54:12 +0000 Subject: [PATCH] evidence categories plus typehinting --- backend/pashub_fetcher/evidence_categories.py | 63 +++++++++++++++++++ backend/pashub_fetcher/pashub_client.py | 4 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 backend/pashub_fetcher/evidence_categories.py diff --git a/backend/pashub_fetcher/evidence_categories.py b/backend/pashub_fetcher/evidence_categories.py new file mode 100644 index 00000000..4e412364 --- /dev/null +++ b/backend/pashub_fetcher/evidence_categories.py @@ -0,0 +1,63 @@ +EVIDENCE_CATEGORIES = [ + "Advice report", + "Air Tests - BGV", + "Air Tightness Strategy", + "Assessment report", + "Blue Site Notes (PAS Assessment)", + "Building Assessment report", + "Building Condition report", + "Building Regulations Sign-off", + "Claim of compliance PAS2030", + "Claim of compliance PAS2035", + "Commissioning checklist", + "Condition report", + "Contract / Invoice", + "Electrical Certificate", + "Energy report", + "Evidence of submission to CPS", + "Floor Plan", + "Full Property Assessment", + "Gas Appliance Benchmarking Certificate", + "Gas Appliance Commissioning Checklist", + "Gas Inspection Certificate", + "Handover and Commissioning Documents", + "Handover Documents", + "Handover documents for client", + "Heat Demand Calculations", + "Heritage Impact Assessment", + "Improvement option evaluation", + "Installation Guides", + "Insurance guarantee", + "Intended outcomes", + "MCS Compliance Certificate", + "Medium term improvement plan", + "Medium term low carbon plan", + "Mid Photo", + "Mid-Install Inspection", + "Minor Works Electrical Certificate", + "Monitoring and evaluation outcomes", + "Occupancy assessment", + "Other", + "Other commissioning certificates", + "Photo", + "Post Energy Performance Report (EPR)", + "Post installation RdSAP", + "Post Photo", + "Pre Energy Performance Report (EPR)", + "Pre installation RdSAP", + "Pre Photo", + "Pre-Design Building Survey", + "Pre-Installation Building Inspection", + "Product Data sheets", + "Product warranty", + "Property Assessment", + "Qualifications", + "Retrofit design", + "Risk assessment", + "Significance survey", + "Site Note (Green /Blue) and Certificate(s)", + "Ventilation Assessment", + "Ventilation Assessment Checklist", + "Ventilation Report", + "Welsh - Checklist", +] diff --git a/backend/pashub_fetcher/pashub_client.py b/backend/pashub_fetcher/pashub_client.py index 45767874..9969227b 100644 --- a/backend/pashub_fetcher/pashub_client.py +++ b/backend/pashub_fetcher/pashub_client.py @@ -52,7 +52,9 @@ class PashubClient: if not evidence_list: return DownloadedFiles(core=[], other=[]) - grouped = self._group_into_core_and_other_files(evidence_list) + grouped: _EvidenceFileGroups = self._group_into_core_and_other_files( + evidence_list + ) core_paths: List[str] = [] for _, evidence in grouped.core.items():