Golden cert 6035's residual (SAP -2 / PE +19.16 / CO2 +0.42t) was a real API-mapper bug, NOT lodged divergence (prior claim retracted). The API `room_in_roof_type_1` block lodges gable walls by length only (no height). The mapper carried just the scalar `gable_*_length_m`, and the cascade's `_part_geometry` gable formula silently drops height-less gables (needs a height) -> the whole A_RR shell `12.5√(A_RR_floor/1.5)` billed as roof at U_RR=2.30 instead of the §3.9.1(e) residual `A_RR − Σ gables`. On 6035 that over-counted roof by 22.78 m² × 2.30 = +52.4 W/K (roof 130.73 -> 78.33, matching the site-notes case-4 replica at 1e-4 — cross-mapper parity). RdSAP 10 §3.9.1(e) (PDF p.21): "the area of the room-in-roof gable walls ... is deducted from A_RR to give the residual roof area." Fix: route the Type 1 gables through `detailed_surfaces` (gable area = L × the §3.9.1 default RR storey height 2.45 m; gable_wall_type 0=Party->gable_wall U=0.25, 1=Exposed->gable_wall_external "as common wall" per Table 4 p.22) so the cascade's Detailed-RR residual fires — the same path the site-notes mapper already uses. Re-pinned golden residuals: - 6035: SAP -2 -> +0 (exact), PE +19.16 -> +1.84, CO2 +0.42 -> +0.01 - 0240: same fix applies (2 Party gables L=6.4); PE +5.80 -> +3.91, CO2 +0.32 -> +0.22, SAP integer unchanged Also corrected the stale "gable_wall_type 0 = external" schema comment (6035's Summary proves 0=Party, 1=Exposed) and added a strict UnmappedApiCode raise for unknown gable_wall_type codes. Suite: 2342 passed, 1 skipped. New code: 0 pyright errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| applications | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| deployment/terraform | ||
| docs | ||
| domain | ||
| epr_data_exports | ||
| etl | ||
| infrastructure | ||
| model_data/requirements | ||
| orchestration | ||
| recommendations | ||
| repositories | ||
| sap worksheets | ||
| scripts | ||
| sfr/principal_pitch | ||
| survey_report | ||
| tests | ||
| utilities | ||
| utils | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| __init__.py | ||
| 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_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