Model/packages
Khalim Conn-Kowlessar 8ec9da4742 §7 slice 4: calculator + cert_to_inputs wired to §7 orchestrator (atomic)
Adds CalculatorInputs.mean_internal_temp_monthly_c (93)m and
CalculatorInputs.utilisation_factor_monthly (94)m. _solve_month indexes
directly into both — the 2-pass η fixed-point loop is gone (SAP10.2 §7
Table 9c is sequential, not iterative).

cert_to_inputs computes per-month HTC = transmission HLC + 0.33·V·(25)m,
sums (73)m + (83)m for total gains, and calls
mean_internal_temperature_monthly to populate both new fields. Single
codepath for all callers.

Synthetic test fixtures (_baseline_inputs, _baseline_dwelling) compute
their MIT + η via the §7 orchestrator too — preserves consistency with
the cert path while keeping the BRE worked-example trace asserting the
new spec-correct per-zone η values.

Atomic with cert_to_inputs (originally planned as slice 4 + slice 5):
introducing the calculator fields without populating them in cert_to_inputs
would break every cert-driven test. e2e SAP-score tests (000490 within 1
point, 000474 within 7 points) still pass with the new sequential η path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 21:43:55 +00:00
..
domain §7 slice 4: calculator + cert_to_inputs wired to §7 orchestrator (atomic) 2026-05-20 21:43:55 +00:00
fetchers added potential file scaffolding: 2026-05-15 10:56:53 +00:00
repos added potential file scaffolding: 2026-05-15 10:56:53 +00:00
utils added potential file scaffolding: 2026-05-15 10:56:53 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

Shared packages

Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).

Package Purpose
domain/ Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic.
repos/ Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain.
fetchers/ External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes.
utils/ Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers.

Adding a new shared package

Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.

See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.