mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added `solar_gains_section_from_cert` and 12 strict pin cases for §6 LINE_83 (total solar W) and LINE_84 (total internal + solar gains). Extended SapRoofWindow with the solar attrs needed for line (82) roof- window monthly gain: `orientation` (SAP10.2 code 1..8), `pitch_deg`, `g_perpendicular`, `frame_factor`. Defaults match the modal RdSAP roof window (45° pitch, DG g⊥=0.76, PVC FF=0.70, N). 000516 lodges orientation=2 (NE) + pitch=45 from the U985 cert. Plumbed `_roof_windows_for_solar_gains` through both `solar_gains_ section_from_cert` and the internal `cert_to_inputs` cascade so the production §6 cascade now picks up 000516's NE roof window contribution to (82). Exposed `ORIENTATION_BY_SAP10_CODE` from solar_gains for the SAP10.2 code → Orientation enum mapping the cascade needs. §6 cascade (LINE_83 monthly): fixture | LINE_83 | LINE_84 000474 | ✓ | ✓ 000477 | ✓ | ✗ (cascaded §4 LINE_65 → §5 LINE_72/73) 000480 | ✓ | ✓ 000487 | ✓ | ✗ (cascaded HW lodgement defect, slice 25) 000490 | ✓ | ✓ 000516 | ✓ | ✓ (roof window now feeding (82)) Scoreboard: section_cascade_pins: 220 → 230 PASS (+10; 12 new tests, 2 fail) e2e SapResult: 30 → 32 PASS (+2, downstream of §6 closure) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src/domain | ||
| pyproject.toml | ||
| README.md | ||
domna-domain
Shared domain types — Property, Properties, BaselinePerformance, Plan, PlanPhase, Scenario, ScenarioPhase, ScenarioSnapshot, Recommendation, OptimisedPackage, EpcPropertyData, etc.
Boundary: types only. No persistence, no IO, no business logic. Other packages and services depend on domna-domain; this package depends on nothing internal.
Domain definitions live in ../../CONTEXT.md. New types added here must match the glossary terms.
Layout
src/domain/
├── __init__.py
├── property.py # Property, Properties, PropertyIdentity
├── site_notes.py
├── landlord_overrides.py
├── baseline_performance.py # lodged + effective pair (ADR-0004)
├── plan.py # Plan, PlanPhase, OptimisedPackage
├── scenario.py # Scenario, ScenarioPhase, ScenarioSnapshot (ADR-0005)
├── recommendation.py
├── geospatial.py
├── solar.py
├── anomaly_flags.py
└── ml/
├── __init__.py
├── transform.py # EpcMlTransform (versioned per §8.3)
└── schema.py
When datatypes/epc/domain/ folds in, the EPC schema types move under src/domain/epc/.