A 440 mm (>420 mm) solid brick AS-BUILT wall computed U = 1.70 (the 220 mm bucket default) instead of the RdSAP-correct 1.10. The §5.7 Table 13 thickness path only fired for *insulated* brick (external/ internal + thickness > 0); the as-built case fell through to the Table 6 cavity/solid age-band default. Spec: RdSAP 10 Specification (9th June 2025), §5.7 "U-values for uninsulated brick walls, age bands A to E", Table 13 (PDF p.40): ≤200 mm → 2.5, 200–280 mm → 1.7, 280–420 mm → 1.4, >420 mm → 1.1. Table 6 footnote (b) on the "Solid brick as built" row (PDF p.40): "Or from 5.7 if wall thickness is other than 200mm to 280mm" — the thickness table supersedes the flat 1.7 default whenever a documentary wall thickness is lodged (200–280 mm gives 1.7 either way). The §5.8 / Table 14 dry-lining R is added on top only when the wall is dry-lined, per the §5.7 closing sentence. Validated against the user-generated Elmhurst worksheet "simulated case 21" (replica of API cert 2818-3053-3203-2655-9204: mid-terrace, age band B, solid brick as-built 440 mm, room-in-roof). New §3 cascade pin `test_section_3_wall_u_by_thickness_case21_match_pdf` routes the Summary through the real extractor + mapper and pins: (31) 155.1000, (33) 175.6208, (36) 23.2650, (37) 198.8858 — all 1e-4. External walls Main U → 1.1000; Sheltered RR gable → 1/(1/1.10+0.5) = 0.71 (was 0.92). Pinned on §3 only (case-6 precedent): its code-908 instantaneous multi-point gas water heater has a separate §4 (219) gap. Cross-check: sim case 20 (220 mm) stays at 1.70 — unchanged. API SAP accuracy (scripts/eval_api_sap_accuracy.py, 896 computed certs): % |err| < 0.5 SAP vs lodged: 42.6% → 43.8%; mean |err| 2.045 → 2.010. Regression: tests/domain/sap10_calculator/ (1861), backend/ documents_parser/tests/ (574), datatypes/epc/ + rdsap golden fixtures all green (pre-existing test_total_floor_area excepted). pyright strict net-zero. No solid-brick fixture pin shifted (200–280 mm unchanged). 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