mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Refactors the inline `ventilation_from_inputs(...)` block in
`cert_to_inputs` into a public `ventilation_from_cert(epc)` helper that
returns the full `VentilationResult`. Same cascade path, now reachable
from tests without duplicating the cert→inputs argument plumbing.
Adds §2 cascade pins to `test_section_cascade_pins.py` at abs=1e-4:
scalar (11 line refs × 6 fixtures = 66 pins):
(8) openings_ach, (10) additional, (11) structural, (12) floor,
(13) draught_lobby, (14) % draught proofed, (15) window,
(16) infiltration_rate, (18) pressure_test, (20) shelter_factor,
(21) shelter_adjusted_ach
monthly (4 line refs × 6 × 12 months = 288 per-month assertions
across 24 parametrized cases):
(22) wind_speed, (22a) wind_factor, (22b) wind_adjusted_ach,
(25) effective_monthly_ach
integer (1 line ref × 6):
(19) sheltered_sides
96 §2 cases all PASS (108 total when including §1). The cert→inputs
ventilation cascade reproduces the U985 PDF exactly across every line
ref for every fixture — a strong floor for the downstream §3-§12
cascade.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| domain | ||
| fetchers | ||
| repos | ||
| utils | ||
| README.md | ||
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/.