LINE_91 in the worksheet is `living_area / (4)`, where living_area itself is the §15-rounded materialisation of `Table 27 fraction × TFA`. RdSAP §9.2 (p.52): "The living area is then the fraction multiplied by the total floor area." §15 (p.66) lists "All internal floor areas and living area: 2 d.p." So the actual LINE_91 fed to the §7 zone blend is `round_half_up(Table_27 × TFA, 2) / TFA`, not the raw Table 27 entry. The roundtrip explains why the 4 holdout fixtures lodge LINE_91 = 0.3001 or 0.2501 instead of the Table 27 values 0.30 / 0.25: 000474: 0.30 × 56.79 → 17.04 / 56.79 = 0.3001 000477: 0.25 × 77.58 → 19.40 / 77.58 = 0.2501 000490: 0.25 × 66.06 → 16.52 / 66.06 = 0.2501 `_living_area_fraction` now takes TFA and materialises + rounds + divides; `_living_area_fraction_default` retains the bare Table 27 lookup. Existing `_round_half_up` from heat_transmission is the right utility (same §15 boundary, same half-up convention). Scoreboard: §7 cascade pins 52/60 → 60/60 (closes LINE_92/93 on 000474, 000477, 000480, 000490 — and tightens the already-passing 000487/000516 combinations). Full cascade: 304/312 → 312/312 (100%). e2e SapResult: 27/66 → 56/66 (continuous SAP, ECF, fuel cost, space heating kWh now close on 5/6 fixtures; 000487 still has unrelated downstream defects, all 6 CO2 fails await §12). 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