Closes 22 of the remaining 23 mapper-vs-hand-built load-bearing
divergences on cohort cert 000487. All 11 `_FIXTURE_PINS["000487"]`
SapResult pins remain GREEN at 1e-4 against worksheet `SAP value
61.6431` (cascade-equivalent — see per-change rationale).
(1) RIR `detailed_surfaces` reorder to match the mapper's per-row
Summary §3.10 extraction order:
was: [gable_wall, gable_wall_external(u=0.86), flat_ceiling,
stud_wall(100mm/min.wool), slope(0mm)]
now: [flat_ceiling, stud_wall, slope, gable_wall,
gable_wall_external(u=0.86)]
The cascade reads these surfaces as a set (sums U × area per kind),
so list order is cascade-inert. Confirmed: all 11 cohort 000487
cascade pins GREEN post-reorder. Per-surface insulation_thickness_mm
and u_value are unchanged from the prior encoding (matches mapper).
(2) Alt-wall `_WC_TIMBER_FRAME` constant: **8 → 5**.
The prior `_WC_TIMBER_FRAME = 8` was a mislabel — SAP10 code 8 is
"Park home" per `_ELMHURST_WALL_CODE_TO_SAP10`. The mapper extracts
"TI Timber Frame" → SAP10 code **5** (Timber frame). Both codes
happen to cascade to U=1.9 at age band B (different default paths),
so the prior encoding produced the right cascade output despite the
wrong semantic; switching to 5 mirrors the cert truth and the mapper.
Dropped the alt-wall's `wall_insulation_thickness='150'` workaround
and `u_value=1.90` explicit pin — the cascade for `wall_construction
=5` at age B resolves to U=1.9 from the age-band default; mapper
passes None for both fields and the cascade computes them.
Remaining diff: 1 (`sap_windows: LEN 5 vs 2`) — Slice 80.
Pyright net-zero on the touched fixture.
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