Model/tests/repositories/product
Khalim Conn-Kowlessar cc0bb8f9bb feat(modelling): ProductJsonRepository behind the ProductRepository port
Adds the file-backed Product catalogue — the stopgap source for costs
the ETL does not yet supply, behind the same ProductRepository port as
ProductPostgresRepository. The JSON file maps each Measure Type to its
fully-loaded unit cost; the per-Measure-Type contingency is joined from
config (not stored in the file), so config stays the single source of
truth for contingency — mirroring the Postgres repo's mapping.

Strict-raises (ValueError) on an absent measure type, a non-object
entry, or a missing/non-numeric unit_cost_per_m2, matching the
repo-wide strict-no-silent-default convention. tmp_path-backed tests,
no DB fixture needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 09:49:02 +00:00
..
__init__.py feat(modelling): ProductRepository + Postgres materials-table source 2026-06-03 08:32:38 +00:00
test_product_json_repository.py feat(modelling): ProductJsonRepository behind the ProductRepository port 2026-06-03 09:49:02 +00:00
test_product_postgres_repository.py feat(modelling): ProductRepository + Postgres materials-table source 2026-06-03 08:32:38 +00:00