Model/packages
Khalim Conn-Kowlessar 0f255165d5 §10a slice 1: table_32 + table_12a + fuel_cost orchestrator
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>
2026-05-21 19:40:16 +00:00
..
domain §10a slice 1: table_32 + table_12a + fuel_cost orchestrator 2026-05-21 19:40:16 +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/.