Commit graph

406 commits

Author SHA1 Message Date
Khalim Conn-Kowlessar
5a3be9d672 feat(ingestion): relocate EpcClientService to infrastructure + SolarRepo (#1133)
Move the EpcClientService package (client + _retry + exceptions + tests) from
the dying backend/ tree to infrastructure/epc_client/ as the New-EPC-API Fetcher;
update the two callers (address2UPRN, a script). All 14 client tests pass.

Add SolarRepository port + SolarPostgresRepository persisting Google Solar
building insights as JSONB (solar_building_insights table), one row per Property.
The EPC repo half of this slice already landed in #1129. pyright strict clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:28:48 +00:00
Khalim Conn-Kowlessar
460970af39 feat(property): Property aggregate + PropertyRepository (#1132)
Add the Ara modelling aggregate root (ADR-0002): domain/property/ with
PropertyIdentity, SiteNotes, Property, Properties. Property.source_path
implements the two disjoint source paths + Recency Tie-Break (ADR-0001;
survey wins on an equal date); effective_epc resolves to the surveyed data
(Site Notes path) or the public EPC (epc_with_overlay path — Landlord
Overrides overlay is a later slice). Pure dataclasses, no infrastructure imports.

PropertyRepository port + PropertyPostgresRepository hydrate the aggregate
whole from a defensive view of the FE-owned 'property' table (identity columns)
plus the EPC slice via EpcRepository.get_for_property. Reads only from repos
(ADR-0003). 8 domain + 1 hydration test; pyright strict clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:28:48 +00:00
Khalim Conn-Kowlessar
3e1d3acfbf feat(epc): persist renewable_heat_incentive — full round-trip equality (#1137)
Add epc_renewable_heat_incentive table (space_heating_kwh, water_heating_kwh +
the three insulation-impact kWh fields), wired into EpcPostgresRepository
save/get. This is the P0 gap: RenewableHeatIncentive carries the baseline
space-heating/hot-water kWh that EPC Energy Derivation consumes.

The round-trip test now asserts full deep-equality (dropped the
renewable_heat_incentive exclusion) and passes for RdSAP 21.0.0 + 21.0.1.
DB migration for the new table documented in
docs/migrations/epc-property-round-trip-fidelity.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:28:48 +00:00
Khalim Conn-Kowlessar
8291f29721 docs(ara): composable stage-orchestrator design (ADR-0011 + ADR-0003 amend + CONTEXT)
Records the grill-with-docs outcomes for the ara_first_run rebuild: three
composable stage orchestrators (Ingestion/Baseline/Modelling), one lambda per
use case chaining them through repos (not in-memory), and the Fetcher-vs-Repo
data-source taxonomy. Amends ADR-0003's chaining rule to generalise beyond
RefreshOrchestrator. Adds the pipeline-composition + First Run vocabulary to
CONTEXT.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:28:48 +00:00
Daniel Roth
81ac2e71ab GoogleSolarApiClient raises BuildingInsightsNotFoundError on 404 entity-not-found 🟩 2026-06-01 16:28:47 +00:00
Daniel Roth
4af5d5b515 GoogleSolarApiClient retries on transient HTTP errors 🟩 2026-06-01 16:28:47 +00:00
Daniel Roth
9e22a4237c GoogleSolarApiClient fetches building insights from the Solar API 🟩 2026-06-01 16:28:47 +00:00
Daniel Roth
fe463f7eea GoogleSolarApiClient fetches building insights from the Solar API 🟥 2026-06-01 16:28:47 +00:00
Jun-te Kim
5470fa1d93 move landlord overrides 2026-06-01 15:46:46 +00:00
Jun-te Kim
8a9d14a45c landlord overrids moved into one repo 2026-06-01 15:16:23 +00:00
Jun-te Kim
3845ac10b0 moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
Jun-te Kim
0febf0e6d5 classifier 2026-06-01 14:30:09 +00:00
Jun-te Kim
c9a9620527 pr review, move domain and orhcestration 2026-06-01 14:00:31 +00:00
Jun-te Kim
3e30b4af40 tests wrong environemnt 2026-05-29 16:17:06 +00:00
Jun-te Kim
36f4c32904 added roofs 2026-05-26 16:18:26 +00:00
Jun-te Kim
8422041215 landlord overrid orchestration 2026-05-26 15:27:45 +00:00
Jun-te Kim
96aeed4f2e Remove EPC and asset_list changes unrelated to SAL handler
This branch's objective is the SAL ingestion handler
(applications/SAL/handler.py) and its dependency tree. Drop work
that crept in but is unreferenced by it:

- EPC feature: domain/epc, infrastructure/epc (gov_uk + historical
  clients), tests/infrastructure/epc
- datatypes/epc edits (instantaneous_wwhrs Optional) reverted to main
- asset_list/app.py local data-file/column tweak reverted to main

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 15:36:46 +00:00
Jun-te Kim
a747534f37 refactored to allow multiple column types 2026-05-22 15:28:26 +00:00
Jun-te Kim
11a498ba4e Map an unrecognised classification reply to UNKNOWN 🟥 2026-05-22 14:55:01 +00:00
Jun-te Kim
d0e5aa9e3f Classify a landlord description into a SAL property type 🟩 2026-05-22 14:53:31 +00:00
Jun-te Kim
c887153292 renamed to chatgpt 2026-05-22 14:07:10 +00:00
Jun-te Kim
675aa089c9 updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
Jun-te Kim
8baa4c82aa save correct progress 2026-05-21 16:57:14 +00:00
Jun-te Kim
e5583aac1f some excel files are formatted differently 2026-05-20 17:36:20 +00:00
Jun-te Kim
d0cf3d14ad get rid of comments 2026-05-20 13:21:11 +00:00
Jun-te Kim
914a8ed51e postcode splliter working e2e 2026-05-20 11:07:40 +00:00
Jun-te Kim
7b00a33cd2 infrastructure: typed S3/SQS clients (S3Client, CsvS3Client, SqsClient, Address2UprnQueueClient)
Slice 3/6 of the postcode_splitter refactor (Hestia-Homes/Model#1101).
Introduces a thin typed infrastructure layer wrapping boto3 for the AWS
side of the splitter. S3Client/SqsClient are bucket-/queue-bound byte
adapters; CsvS3Client subclasses S3Client to round-trip CSV row dicts
via the existing parse_s3_uri helper in utils/s3.py; Address2UprnQueueClient
subclasses SqsClient to publish the typed {task_id, sub_task_id, s3_uri}
fan-out body the downstream consumer expects. moto[s3,sqs] is pulled into
test.requirements.txt and the new tests/infrastructure/ suite exercises
each client against the moto backend (S3 round-trip, CSV round-trip,
SQS send + body inspection, typed publish + body inspection). pyright
--strict is clean on the new modules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:12:21 +00:00
Jun-te Kim
54a674b5c8 added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
Jun-te Kim
bc8ca3ead3 deployment from infrastructure 2026-05-19 12:55:30 +00:00
Daniel Roth
3a7a00051d add new variables to deployment pipeline 2026-05-18 11:09:44 +00:00
Daniel Roth
a477561bbc correct tfstate bucket name 2026-05-12 13:03:04 +00:00
Daniel Roth
ec7acabaf8 reinstate deleted policy so it can be unattached from entities 2026-05-12 11:48:39 +00:00
Daniel Roth
aadf73ed87 combine s3 write policies into one and apply to pashub and magicplan lambdas 2026-05-08 15:44:14 +00:00
Daniel Roth
1243690d10 give handler permission to write to s3 bucket 2026-05-08 15:41:12 +00:00
Daniel Roth
feaa1ea680 Add MagicPlan Lambda Dockerfile, CI/CD jobs, and SQS IAM wiring in hubspot_deal_etl 2026-05-08 13:12:13 +00:00
Daniel Roth
fd77fa51fd magic plan client terraform 2026-05-08 13:07:53 +00:00
Daniel Roth
ed68a10127 magic plan client terraform 2026-05-08 13:07:36 +00:00
Daniel Roth
1ddbb9a79d typo 2026-05-08 11:56:21 +00:00
Daniel Roth
ebf807713c magicplan client ECR 2026-05-08 11:54:17 +00:00
Daniel Roth
f799466325 make versioning optional on all s3 buckets, default false 2026-04-28 10:05:38 +00:00
Daniel Roth
e533943085 add versioning to retrofit-energy-assessments-dev bucket 2026-04-28 09:41:46 +00:00
Daniel Roth
6d888f3189 grant pashub to ara lambda permission to write to s3 2026-04-24 08:36:50 +00:00
Daniel Roth
920dbb7ddb Merge branch 'main' into feature/pashub-to-ara 2026-04-23 09:49:27 +00:00
Daniel Roth
996a8b9459 include sharepoint tenant id in lambda environment 2026-04-23 09:48:37 +00:00
Jun-te Kim
296bbcc626 added logic to add to serverless 2026-04-22 12:39:44 +00:00
Daniel Roth
5966757051 add reserved_concurrent_executions to template lambda terraform 2026-04-21 08:58:51 +00:00
Daniel Roth
bd0edd1fac Merge branch 'main' into feature/pashub-to-ara 2026-04-21 08:36:20 +00:00
Daniel Roth
30ac251705 limit pashub lambda concurrency to 1 2026-04-21 08:35:52 +00:00
Jun-te Kim
37a6a9d9b2
Merge pull request #1016 from Hestia-Homes/feature/address_trigger_from_frontend
forgot to add stage
2026-04-20 18:12:41 +01:00
Jun-te Kim
735368c312 forgot to add stage 2026-04-20 17:00:27 +00:00