mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Add a `source` discriminator (lodged | predicted) to the EPC store so a Property holds a lodged EPC and a predicted one (EPC Prediction gap-fill) at once (ADR-0031). EpcRepository.save gains source="lodged"; idempotent delete is now per-source (a predicted save no longer wipes lodged, and vice versa); get_for_property/get_for_properties filter lodged; new get_predicted_for_property / get_predicted_for_properties read predicted. PropertyPostgresRepository.get + get_many hydrate Property.predicted_epc, so the predicted picture reaches the modelling read (both load via get_many). FakeEpcRepo mirrors the dual slot. EpcPropertyModel gains `source` (default "lodged"); the test DB builds from the SQLModel mirror so this is exercised without the prod migration. The matching Drizzle change (column + per-(property_id,source) uniqueness) is the team's to action before merge — docs/MIGRATION_NOTE_predicted_epc_source.md. 3 store tests (coexist, idempotent predicted re-save leaves lodged, lodged-only has no predicted) + property-repo wiring; 85 pass across affected suites; new code pyright-clean (2 pre-existing wwhrs errors in epc_property_table untouched). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| modelling | ||
| __init__.py | ||
| bulk_address_upload_table.py | ||
| config.py | ||
| engine.py | ||
| epc_property_table.py | ||
| landlord_built_form_type_override_table.py | ||
| landlord_override_enums.py | ||
| landlord_property_type_override_table.py | ||
| landlord_roof_type_override_table.py | ||
| landlord_wall_type_override_table.py | ||
| magic_plan_tables.py | ||
| product_table.py | ||
| property_baseline_performance_table.py | ||
| property_details_spatial_table.py | ||
| property_override_table.py | ||
| property_table.py | ||
| solar_table.py | ||
| subtask_table.py | ||
| task_table.py | ||
| uploaded_file_table.py | ||