Two compensating Summary-extractor bugs surfaced by simulated case 43 (a 2-BP mid-terrace with a detailed room-in-roof + a dry-lined extension wall). Their fabric errors nearly cancelled (walls net −0.76 W/K), hiding both behind a deceptively small +0.05 SAP delta. Bug 1 — main/extension wall dry-lining never read. The §7 "Dry-lining: Yes/No" line was parsed only for ALTERNATIVE walls; the main/extension WallDetails dropped it, so a dry-lined solid wall was billed at its un-adjusted base U. RdSAP 10 §5.8 + Table 14: a dry-lined uninsulated wall adds R=0.17 → U = 1/(1/U_base + 0.17). Case 43 Ext1: solid brick 1.70 → 1.32. Added `WallDetails.dry_lined`, read it in the extractor (both the main-wall builder and the As-Main copy), threaded it to the domain `wall_dry_lined` (emit None when undried — cascade-equivalent to False, keeps the field absent for the non-dry-lined majority). Bug 2 — the LAST room-in-roof surface row's U over-read. The per-row token scan stops at the next RIR-row name; the final surface (no successor) over- read into the following section, shifting the trailing-token slotting and silently zeroing its `default_u` (case 43 Common Wall 2: 1.90 → 0.00 → the 2.4 m² common wall billed at U=0 instead of the main-wall 1.90). Stop the scan at the row's natural end — the "Yes"/"No" u_value_known flag plus the trailing u_value numeric. Case 43 now reproduces the P960 EXACTLY: (29a) walls 74.5800, (33) fabric 172.7844, continuous SAP 73.2332 = (258), CO2 3518.30 = (272), all <1e-4 (was SAP +0.0455 / CO2 −8.04). Harness 47/47 0 raised; regression = the 3 pre-existing fails; pyright net-zero (51=51). 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 | ||
| harness | ||
| 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 | ||
| next_claude_prompt.txt | ||
| 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