mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Establishes the SAP10.2 §10a fuel-cost worksheet block per the Table 32 (RdSAP10 prices, PDF page 95) + Table 12a (high-rate fractions, PDF page 191) rewrite scoped in the §10a handover. - tables/table_32.py: 28 fuel rows pinned verbatim; standing charges per fuel; API-enum → Table 32 translation; note (a) gating in `additional_standing_charges_gbp` (gas use + off-peak electricity rules). - tables/table_12a.py: `Tariff` enum (incl. TEN_HOUR for spec completeness — RdSAP cert flow doesn't route here); `Table12aSystem` + `OtherUse` enums; `space_heating_high_rate_ fraction` / `water_heating_high_rate_fraction` / `other_use_high_ rate_fraction` lookups; `tariff_from_meter_type` cert resolver (Unknown → STANDARD per the spec-faithful policy). - worksheet/fuel_cost.py: 32-field `FuelCostResult` (line refs (240)..(255)) + kwargs `fuel_cost` orchestrator. Off-peak split via `_split` helper applied to main 1 / main 2 / secondary / water-heating rows; pumps/fans/lighting/cooling/instant-shower at single rate (per-row Table 12a split deferred); (252) PV credit negative; (255) clamped to >= 0. 130 synthetic unit tests pinned. CalculatorInputs wiring + cert_ to_inputs rewrite + 6-fixture conformance follow in slice 2. 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/.