Commit graph

268 commits

Author SHA1 Message Date
Daniel Roth
19e40ff049 rename mcs_certificate to mcs_compliance_certificate to match existing db enum value 2026-06-03 09:00:01 +00:00
Daniel Roth
ca224515f9 MCS cert identified by evidence_category in get_core_file_type 🟥 2026-06-02 14:20:35 +00:00
Daniel Roth
1a1f9f2e6a Upload other files to S3 when get_other_files is True 🟥 2026-06-02 09:35:12 +00:00
Khalim Conn-Kowlessar
5f0a3b8f65 feat(epc): EPC persistence round-trip fidelity + JSONB code columns (Slice 1 #1129)
Relocate EpcPropertyModel + child tables from the dying backend/ tree to
infrastructure/postgres/epc_property_table.py (re-export shim keeps
documents_parser working). Add EpcRepository port + EpcPostgresRepository with
a full reverse mapper (epc_property tables -> EpcPropertyData).

Round-trip test surfaced two fidelity gaps:
 1. Union[int,str] SAP code fields were str()-coerced on save, losing the int
    (API) vs str (Site Notes) distinction. Now stored as JSONB (type-preserving).
 2. The schema was a partial projection. Closed the cheap gaps on the model
    (heating shower/bath counts, roof_construction_type, curtain_wall_age,
    addendum, mechanical_vent_duct_insulation_level, SAP 10.2 §2 ventilation
    fields + a ventilation_present flag). Structural gaps tracked as follow-ups;
    renewable_heat_incentive (P0, #1137) excluded from the assertion until landed.

Round-trip passes for RdSAP-Schema-21.0.0 and 21.0.1; pyright strict clean.
Migration inventory for the DB: docs/migrations/epc-property-round-trip-fidelity.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 19:26:18 +00:00
Jun-te Kim
17016b299a booking status 2026-05-28 12:15:37 +00:00
Jun-te Kim
2b29b4b458 hubspot projects data is scraped 2026-05-28 10:54:15 +00:00
Jun-te Kim
0a99c92eb4 added batch description and nonfunded measures 2026-05-27 10:30:19 +00:00
Khalim Conn-Kowlessar
87b6045c97 fixed merge conflicts from main 2026-05-26 11:21:09 +00:00
Khalim Conn-Kowlessar
883028c89e P6.1 follow-on: unbox BuildingPartIdentifier at backend boundaries
Threads the strict BuildingPartIdentifier type (introduced in a8b443f6)
through the two remaining backend touchpoints:

- EpcBuildingPartModel.from_*: SQLModel column expects a string, so
  unbox the enum with .identifier.value before binding to the DB.
- documents_parser end-to-end tests: swap bare-string equality
  ("main" / "extension_1") for identity checks against the enum
  members (BuildingPartIdentifier.MAIN / EXTENSION_1).

Documents_parser test pack passes (105/105). No dedicated SQLModel test
covers EpcBuildingPartModel.from_*; the .value line is exercised
transitively via db_writer.py / local_runner.py in production.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:58:23 +00:00
Daniel Roth
dc3543ac5f Coordination Hub fallback stores correct file_source in DB 🟥 2026-05-19 11:07:41 +00:00
Khalim Conn-Kowlessar
0ffda529ec slice 15a: add wall/floor/roof + demand scalar features for retrofit simulation
15 new features wired through schema -> domain -> mapper -> transform:

Main Dwelling fabric (11):
  - wall_insulation_type, wall_insulation_thickness_mm, wall_dry_lined,
    wall_thickness_mm, party_wall_construction
  - roof_insulation_location, roof_insulation_thickness_mm
  - floor_construction, floor_insulation, floor_insulation_thickness_mm,
    floor_heat_loss

Dwelling-level scalars (4):
  - multiple_glazed_proportion, number_baths, number_baths_wwhrs,
    extract_fans_count

Thickness strings like '50mm'/'NI'/'ND' parsed via _parse_thickness_mm; NI
(no insulation) lands as 0mm so the model sees the physical zero rather than
a missing value. Categorical sentinels ('NA'/'NI'/'ND') become None.

Also fixed long-standing typo `multiple_glazed_propertion` -> `_proportion`
in domain dataclass + its lone DB-model usage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 22:08:27 +00:00
Daniel Roth
c98fc8452f
Merge pull request #1086 from Hestia-Homes/feature/pashub-additional-files
Fetch coordination and design documents from pashub
2026-05-14 11:59:43 +01:00
Daniel Roth
e315966565 add coordination and design document types to enums 2026-05-13 12:29:25 +00:00
Daniel Roth
265be9849b Store uploaded_file_id on magic_plan_plan row 🟥 2026-05-13 10:50:28 +00:00
Jun-te Kim
e458f0a2b7 task and sub tasks imrpvoed 2026-05-12 16:24:11 +00:00
Daniel Roth
7c9cb5b161 Upload gzip-compressed MagicPlan JSON to S3 🟥 2026-05-08 14:14:42 +00:00
Daniel Roth
f56dba4ad1 use pytest-postgresql in db tests instead of mocking and checking sql strings 2026-05-08 10:13:44 +00:00
Daniel Roth
6b29086a1e typing and renaming 🟪 2026-05-07 13:26:49 +00:00
Daniel Roth
2f8e08a676 save_plan persisting domain Plan to magic_plan_* tables 🟩 2026-05-07 13:09:09 +00:00
Daniel Roth
5ec0fa5d04 save_plan persisting domain Plan to magic_plan_* tables 🟥 2026-05-07 13:01:04 +00:00
Daniel Roth
7ff7e90307 SQLModel ORM layer for magic_plan_plan/floor/room/window/door tables 🟩 2026-05-07 12:56:12 +00:00
KhalimCK
b4ee59c82e
Merge pull request #1042 from Hestia-Homes/feature/khalim-additional-db-features
Feature/khalim additional db features
2026-05-01 10:54:28 +01:00
Khalim Conn-Kowlessar
9e3f5a2205 Adding use model for storage of users 2026-04-30 18:53:15 +00:00
Khalim Conn-Kowlessar
b056deb5ee added additional columns to db 2026-04-30 17:10:00 +01:00
Daniel Roth
1bc8343738 identify site notes files after file upload so we can save them to epc_property table 2026-04-28 16:33:53 +00:00
Daniel Roth
51bd18e0d7 Rename window frame material column 🟩 2026-04-27 16:11:32 +00:00
Daniel Roth
5940977bb2 tweak window transmission data source type 2026-04-27 14:11:33 +00:00
Daniel Roth
3ba4947330 remove foreign key constraints on sqlmodel classes 2026-04-24 12:49:00 +00:00
Daniel Roth
5aa86a8610 address fields are not optional 2026-04-24 10:22:41 +00:00
Daniel Roth
997cd0f1d3 SQLModel classes to match drizzle schema 2026-04-23 16:22:50 +00:00
Jun-te Kim
a6849b28b3 added backend funciton to functions 2026-04-22 14:21:39 +00:00
Jun-te Kim
d7b8ca34bf made everything complete not compelted 2026-04-21 20:37:34 +00:00
Jun-te Kim
b0a4a98063 get rid of dependency 2026-04-21 20:27:03 +00:00
Jun-te Kim
c4f6d77845 implemented onboarding 2026-04-21 20:23:33 +00:00
Jun-te Kim
686d1f2c80
Merge pull request #1010 from Hestia-Homes/feature/address_trigger_from_frontend
added bulk address uprn route
2026-04-20 17:39:07 +01:00
Jun-te Kim
902e5cd8df added more deal properties 2026-04-20 15:44:54 +00:00
Jun-te Kim
42ea70e60f added additional deal properties 2026-04-20 15:23:38 +00:00
Jun-te Kim
7caa7c476a added bulk address uprn route 2026-04-20 13:06:31 +00:00
Jun-te Kim
ec4c870465 added bulk address 2 uprn lmabda 2026-04-17 19:08:34 +00:00
Daniel Roth
545b93dc16 add hubspot_deal_id to db record. new file to trigger handler locally from address list file. switch lambda dockerfile to point to correct handler 2026-04-16 16:34:20 +00:00
Daniel Roth
155eab86e4 update Dimensions.xlsx with XML contents 2026-04-15 13:31:40 +00:00
Daniel Roth
fa3e276dc4 define new domain object 2026-04-13 16:18:17 +00:00
Daniel Roth
d4d9b03511
Merge pull request #964 from Hestia-Homes/feature/hubspot-trigger-orchestrator
Trigger PasHub to Ara Lambda from Hubspot to DB ETL
2026-04-10 11:03:12 +01:00
Daniel Roth
38305e558b
Merge pull request #962 from Hestia-Homes/feature/ecmk-to-ara
ECMK to Sharepoint, S3 and database
2026-04-10 11:02:31 +01:00
Khalim Conn-Kowlessar
2fb14858eb reduced freshness down to 14 days 2026-04-09 17:17:41 +01:00
Khalim Conn-Kowlessar
fbf23bc898 added env impact scores to db 2026-04-09 16:31:50 +01:00
Khalim Conn-Kowlessar
3380b6cbc8 hacky fix to pick up lmk key or epc cert # 2026-04-09 16:01:33 +01:00
Daniel Roth
bd891a7a85 address JTK review comments 2026-04-09 14:41:14 +00:00
Daniel Roth
36aaabb3cf diff checker for db load trigger 🟩 2026-04-09 11:19:33 +00:00
Daniel Roth
125527baa9 move HubspotDealData object to dedicated file 2026-04-09 10:46:52 +00:00