Khalim Conn-Kowlessar
b97d06882f
feat(modelling): drop the plan_recommendations m2m
...
Stop writing the m2m (remove create_plan_recommendations + its call, the bulk
link insert and the now-dead plan_ids_by_index, and the plan_recommendations
delete in delete_property_batch) and remove the PlanRecommendationRow model +
its shim alias and the test_export fixture inserts. Measures now link to their
Plan solely via recommendation.plan_id (writers set it, readers join on it).
The live drop of the plan_recommendations table is the FE-owned Drizzle
migration documented in docs/migrations/recommendation-plan-id.md, sequenced
after the read-cut + backfill.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:13:00 +00:00
Khalim Conn-Kowlessar
27fcc5b184
feat(modelling): legacy writers set recommendation.plan_id (dual-write)
...
upload_recommendations and bulk_upload_recommendations_and_materials now set
plan_id on each recommendation row (the plan id is already in scope), while
still writing the plan_recommendations m2m — the dual-write that lets readers
move onto plan_id with no breakage during the transition (ADR-0017 amendment /
docs/migrations/recommendation-plan-id.md). The m2m write is removed in a later
slice once no reader depends on it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:01:56 +00:00
Daniel Roth
5646376d1e
pass min and max IDs to consider to processor and db functions
2026-02-24 09:59:42 +00:00
Daniel Roth
31cfa47d8f
dont worry about default scenarios
2026-02-20 17:10:53 +00:00
Daniel Roth
96fbd7f24c
ensure all defaults are unset before setting new ones, refactor of processor
2026-02-20 15:26:40 +00:00
Daniel Roth
ec01e1d190
only get most recently added plans for scenario
2026-02-20 13:39:07 +00:00
Daniel Roth
9d12eef0e5
Remove unused db functions
2026-02-19 12:22:19 +00:00
Daniel Roth
dae74d2f8b
Fix bug where default plans were not being unset if they weren't included in scenarios to be considered
2026-02-19 12:18:22 +00:00
Daniel Roth
475b3d0e13
input is list of scenarios to consider not list of plans
2026-02-18 17:19:38 +00:00
Daniel Roth
490c8946d7
Unset existing default before setting new one
2026-02-18 17:11:00 +00:00
Daniel Roth
cc901d999b
option to only consider a specific list of plans
2026-02-18 11:54:55 +00:00
Daniel Roth
fac418adbe
Don't re-get scenarios for every plan
2026-02-17 15:25:51 +00:00
Daniel Roth
bd9e553e35
bulk update of plans
2026-02-13 14:50:48 +00:00
Daniel Roth
16386173af
get update_plan working
2026-02-13 13:39:38 +00:00
Daniel Roth
e0e50d696a
fixes so it runs (as far as the database update), plus some temp prints
2026-02-13 12:26:31 +00:00
Daniel Roth
61d9e64e1b
also update scenario when updating plan
2026-02-13 09:44:35 +00:00
Daniel Roth
f34a6269f7
Move updating of is_default to domain rather than database layer
2026-02-13 09:39:25 +00:00
Daniel Roth
4b07310d6b
define database methods
2026-02-12 17:36:47 +00:00
Daniel Roth
f955184260
refactor processor
2026-02-12 14:25:35 +00:00
Daniel Roth
b3fa7c3051
rename Plan and Scenario to PlanModel and ScenarioModel
2026-02-12 12:01:39 +00:00
Daniel Roth
e7f941d5e4
use sqlalchemy 2.0 typing in recommendations , and write processing logic
2026-02-12 10:00:47 +00:00
Daniel Roth
598a612b40
define db methods
2026-02-12 09:23:47 +00:00
Khalim Conn-Kowlessar
3fe102c385
added rebaselining for installed measures
2026-01-10 18:52:26 +00:00
Khalim Conn-Kowlessar
808a5122ee
added re-baselining to the property model
2026-01-10 14:59:46 +00:00
Khalim Conn-Kowlessar
ef942ef18a
allow double glazing if no restrictions but confirmed performance of secondary glazing
2026-01-10 11:40:49 +00:00
Khalim Conn-Kowlessar
fb6fca8966
added additional loggging into engine
2026-01-08 12:18:40 +00:00
Khalim Conn-Kowlessar
3fc1e69e50
debugging some failed runs
2026-01-02 17:39:48 +08:00
Khalim Conn-Kowlessar
860645e30e
handling db bug for trigger api
2026-01-01 14:02:09 +08:00
Khalim Conn-Kowlessar
f06676f15a
completed database upload refactor
2025-12-22 18:46:19 +08:00
Khalim Conn-Kowlessar
9c34e202bc
refactoring db requests to run in bulk
2025-12-19 09:43:13 +08:00
Khalim Conn-Kowlessar
395ab0e083
minor debugging
2025-12-13 22:13:09 +08:00
Khalim Conn-Kowlessar
c7b3a6af9b
fixing typing issue
2025-12-08 20:16:07 +00:00
Khalim Conn-Kowlessar
85b05563ba
allow optional contingency
2025-12-08 19:52:59 +00:00
Khalim Conn-Kowlessar
d4a45a5cce
added additional fields to db and fixed flat roof recommendations bug
2025-12-08 18:45:46 +00:00
Khalim Conn-Kowlessar
c20b26881d
fixed stupid bug converting db data to float
2025-12-05 18:55:27 +00:00
Khalim Conn-Kowlessar
c10bf032dc
debugging fuel code
2025-12-05 14:59:47 +00:00
Khalim Conn-Kowlessar
753ef66f48
allowing us not to retrieve find my epc data, when we very clearly don't have the right epc
2025-12-01 13:40:07 +00:00
Khalim Conn-Kowlessar
f75c630dd1
actually removed tqdm
2025-11-30 22:14:48 +00:00
Khalim Conn-Kowlessar
6c8b65f3fb
removing tqdm
2025-11-30 22:01:03 +00:00
Khalim Conn-Kowlessar
b84dc3a6a8
put in some placeholder code for fast deletes
2025-11-30 21:40:10 +00:00
Khalim Conn-Kowlessar
852420a8fa
handling more cases
2025-11-30 20:12:50 +00:00
Khalim Conn-Kowlessar
4f6a9fdc07
minor on batch portfolio delete
2025-11-30 18:59:16 +00:00
Khalim Conn-Kowlessar
5a9e018b19
fixed ashp non invasic rec bug
2025-11-30 18:57:13 +00:00
Khalim Conn-Kowlessar
8a8389a4bb
handling already installed ashp and removing loft only eco4 packaged
2025-11-03 22:18:17 +00:00
Khalim Conn-Kowlessar
9963151944
debugging upload of funding data to db
2025-08-21 18:53:43 +01:00
Khalim Conn-Kowlessar
3e13b37086
adding pytz to requirements
2025-07-22 18:22:23 +01:00
Khalim Conn-Kowlessar
0af0e3a22a
cmabridge done for now
2025-01-14 14:29:04 +00:00
Khalim Conn-Kowlessar
a2c61395de
new environment working
2024-10-21 18:34:18 +01:00
Khalim Conn-Kowlessar
4ef2f0af28
completed mds outputs for the moment
2024-10-03 12:10:45 +01:00
Khalim Conn-Kowlessar
2a75a6db17
adding heat demand to mds outputs
2024-10-02 20:19:25 +01:00