Calculator fix in heat_transmission.py: Detailed §3.10 RR gable_wall surfaces are routed to `party` at U=0.25 per Table 4, so their area sits on worksheet line (32) — NOT on (26)-(30). The slice 13 loop summed every detailed surface (including gable_wall) into `rr_detailed_area`, overcounting LINE_31 by Σ A_gable and inflating (36) thermal bridging by `y × A_gable`. Pinned by a new unit test `test_room_in_roof_detailed_gable_wall_ excluded_from_line_31_external_area` — synthetic dwelling with one RR detailed surface of each kind asserts LINE_31 matches the worksheet's (26)-(30) sum, excluding the gable_wall area. 000477 fixture cleanup (cohort consistency per [[feedback-no-misleading-insulation-type]]): - door_count 1 → 2. Worksheet line 42 lodges total door area 3.70 m² = 2 × _DEFAULT_DOOR_AREA_M2 (1.85). "Doors uninsulated 1" in the worksheet is a single entry but the area resolves to 2 physical doors (front + back, typical mid-terrace). The slice-14 door_count=1 closure was a workaround that masked the gable_wall LINE_31 bug — now closed properly. - `insulation_type="mineral_wool"` stripped from the 2 uninsulated slope panels. Per the no-misleading-insulation convention, uninsulated surfaces (thickness=0) leave `insulation_type` unset. Impact (e2e): 000477 SAP integer 65 = PDF (Δ=0 maintained); continuous 64.526 vs PDF 65.005 = 0.479 (within the existing <=0.5 ceiling, tightens in S19). The two corrections (door_count +5.55 W/K, bridging fix −2.27 W/K) nearly cancel; the residual ~0.9 W/K LINE_33 undershoot is the per-window mixed-U-value lodgement gap (Ticket 3 windows). Remaining for 000480 closure (separate ticket): §3 LINE_33/LINE_37 now match PDF exactly (223.61 / 243.41 vs 223.62 / 243.42). But SAP=66 vs PDF=61 because downstream residuals — lighting kWh +165% (565 vs 213), hot_water kWh +38% (3345 vs 2424), main_heating fuel kWh +23% (15472 vs 12580) — cascade into a -13% total-fuel-cost gap that the prior gable_wall bug was masking. Investigation deferred to a new follow-up. 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