SAP §3 wall heat-loss area sums each storey individually: `Σ (heat_loss_perimeter_i × room_height_i)`. Pre-fix used the short-cut `ground_perimeter × avg_height × storey_count`, which over-counts upper storeys whenever they have a smaller perimeter than the ground (set-back top floors, ground-floor additions, etc.). RdSAP §5.10 party-wall area follows the same per-storey-sum convention. Surfaced by Elmhurst 000474 Main (ground perim 7.07, first 5.27): our gross-wall over-counted by ~10 m², the (29a) W/K downstream by ~15 W/K on this cert. Documented at the time as follow-up #2; this slice closes it. The §3 partial-conformance test's gap-#2 entry is removed; gap #1 (RR sub-areas) remains. Fix lives in two parallel code paths: - dimensions.py: per-storey accumulation inside the existing fd loop - heat_transmission.py: _part_geometry now emits gross_wall_area_m2 and party_wall_area_m2 directly, dropping the avg_height + storey_count intermediate fields (no other consumer) Tests: - New: gross_wall_area_sums_per_storey_perimeter_times_height_… (2-storey main, ground 10 m / first 6 m, same height — expects Σ=40 m² not ground×avg×count=50) - New: party_wall_area_sums_per_storey_party_length_… (same shape, ground party 5 / first party 3 → Σ=20 not 25) - New: walls_w_per_k_uses_sum_of_per_storey_perimeter_… (heat- transmission counterpart: 0.6 × 40 = 24 W/K not 30) 829 tests pass. 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