mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Product(measure_type, unit_cost_per_m2, contingency_rate). ProductRepository is the DDD port abstracting the catalogue source; ProductPostgresRepository reads the externally-owned material table (defensive SQLModel view MaterialRow) and maps an active row to a Product — total_cost becomes the fully-loaded unit_cost_per_m2 — joining the per-measure-type contingency (contingencies.py, mirrors Costs.CONTINGENCIES; cavity 0.10). Strict-raise on missing/inactive row. A JSON-backed impl will follow behind the same port for ETL-gap costs. Two DB tests against an ephemeral Postgres (map active row; raise on inactive-only). Toward #1155 cost (4b). Also generalises the CONTEXT Simulation Overlay wording: windows are targeted by index, building-part association carried via window_location (_window_bp_index). pyright clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| chatgpt | ||
| epc_client | ||
| landlord_overrides | ||
| openai | ||
| postgres | ||
| s3 | ||
| solar | ||
| __init__.py | ||
| address2uprn_queue_client.py | ||
| sqs_client.py | ||