Adds `space_heating_section_from_cert(epc)` to the cert→inputs cascade mirroring `mean_internal_temperature_section_from_cert`. Composes §1 (dim) + §2 (ventilation) + §3 (HLC) + §5+§6 (gains) + §7 (MIT + η_whole) + climate and threads through `space_heating_monthly_kwh`. Pins (95)/(97)/(98a)/(98c) monthly + (98c) annual + (99) per-m² against the U985 PDF at abs=1e-4 for all 6 fixtures — 36/36 PASS. Worksheet annual rule: the U985 PDF lodges (98a)_m / (98c)_m at 4 d.p. half-up and reports the annual as the Σ of those displayed monthlies. The full-precision Σ diverges from the lodged annual by up to ~1.4e-4 (accumulated 4-d.p. display rounding over 8 heating months) — e.g. 000490 = -0.000132. Empirically, `sum(round_half_up(monthly, 4))` reproduces the lodged annual EXACTLY for all 6 fixtures (residual = 0 by construction). The full-precision residuals are randomly distributed in ±1.4e-4 with no bias — 5/6 cancel below 1e-4 by luck, 000490 lost the lottery. SAP10.2 Table 9c step 10 (p.184) defines (98a)_m without an explicit annual aggregation rounding rule; matching the worksheet display convention is the only consistent interpretation that satisfies the abs=1e-4 pin bar. The 1.2e-8 relative shift on downstream calcs is negligible. Cascade scoreboard: 312/312 → 348/348 (§7 60/60 + §8 36/36 now closed). e2e SapResult: 56/66 unchanged (downstream §10a/§11a/§12 + 000487 defects await later slices). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| docs | ||
| epr_data_exports | ||
| etl | ||
| infrastructure/terraform | ||
| model_data/requirements | ||
| packages | ||
| recommendations | ||
| scripts | ||
| services | ||
| sfr/principal_pitch | ||
| survey_report | ||
| utils | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| __init__.py | ||
| AGENTS.md | ||
| ara_backend_design.md | ||
| BaseUtility.py | ||
| CLAUDE.md | ||
| conftest.py | ||
| CONTEXT.md | ||
| devcontainer.sh | ||
| Dockerfile.test | ||
| Dockerfile.test.dockerignore | ||
| Makefile | ||
| MEMORY.md | ||
| package-lock.json | ||
| package.json | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| run_backlog.sh | ||
| run_lambda_local.sh | ||
| serverless.yml | ||
| test.requirements.txt | ||
| tox.ini | ||
| UBIQUITOUS_LANGUAGE.md | ||
Model Repository
This repository contains the code pertaining to the development of the data science and machine learning products being utilised by Hestia.
The different folders in this repository relate to services that can be used independently, or can be imported and used as part of a larger application
Getting Started
Prerequisites
Dev Container Setup
This repo uses a Docker Compose-based dev container. The model-backend service joins a shared-dev Docker network so it can communicate with other local services (e.g. a frontend container) running on your machine.
VS Code users: The initializeCommand in devcontainer.json creates the shared-dev network automatically before the container starts. No manual step required — just open the repo and select Reopen in Container.
Non-VS Code / CI workflows: Run the following once before starting the container:
make dev-setup
This is idempotent and safe to re-run if the network already exists.
Folders
backend/
This folder contains the code for the fastapi backend service, which provides an interface to much of the functionality in this repository, for the frontend
model_data/
This folder contains related to the reading and preparation of assessment model data, including pulling out epc attributes
Testing
All tests can be run, against the configuration in pytest.ini running
pytest
This will run the complete panel of tests and report on coverage in the locations specified by the pytest.ini file.
To run tests in a specific service, e.g. inside of model_data, simply run
pytest --cov-config=model_data/.coveragerc --cov=model_data
This will produce the test results and coverage reports