mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Surfaces the SAP10.2 Appendix L L1-L12 annual lighting kWh as a public free fn alongside lighting_monthly_w. Refactors lighting_monthly_w to compose it. One source of truth shared by the §5 gains side and the forthcoming cost side (inputs.lighting_kwh_per_yr) — slice 2 wires internal_gains_from_cert + cert_to_inputs. Synthetic L1-L12 test pins a hand-computed dwelling (TFA=100, N=2.0, C_L=10000, ε=100, D=1.0) at 189.152079 kWh, abs=1e-3. 6-fixture LINE_67 conformance tests (Elmhurst 000474..000516) act as a regression check on the monthly cosine + 0.85 internal-fraction composition — all green. 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/.