The three open fixtures defined `SECTION_5_BULB_COUNT_LEL` and `SECTION_6_VERTICAL_WINDOWS` at module scope but never passed them into `make_minimal_sap10_epc(...)`. The §5 cascade therefore fell back to all three Appendix L fallbacks simultaneously: L5b (no bulb data lodged): C_L,fixed = 185 lm/m² × TFA L8c (no fixed lighting): ε_fixed = 21.30 lm/W L2b (no windows lodged): C_daylight = 1.433 (no-bonus default) Per SAP 10.2 Appendix L the fallbacks fire only when the cert genuinely lacks the data. The actual cert lodges low-energy bulbs + wall windows on every Elmhurst fixture, so the fallback path was wrong by construction. Effect on lighting kWh per yr (line 232): fixture | calc pre | calc post | PDF --------|----------|-----------|-------- 000480 | 564.5 | ~212 | 212.55 000487 | 550.4 | ~228 | 227.69 000516 | 593.3 | ~231 | 230.89 (post values inferred from the closure pattern on 000474/477/490 — those three pass `test_elmhurst_end_to_end_lighting_kwh_per_yr_ matches_u985_worksheet` at abs=1e-4.) Impact on SAP integer (Δ vs PDF): fixture | pre | post | direction --------|------|------|---------- 000480 | +5 | +7 | further from PDF 000487 | +3 | +5 | further from PDF 000516 | +4 | +7 | further from PDF Net SAP delta gets larger after this fix — the lighting fallback was over-counting kWh, which compensated for an under-application of cost elsewhere (calc total fuel cost £746 vs PDF £855 on 000480 despite calc kWh being HIGHER in every component). Less lighting kWh → less total cost → ECF down → SAP up → away from PDF. The remaining gap is cost-side (fuel price / standing charge / fuel routing). Investigated in the next slice. This fix is spec-faithful per Appendix L L1-L11 — lodge the cert data the spec expects; don't rely on absent-data fallbacks for data that's actually present. Closing the cost residual will let 000480/487/516 land at Δcont < 0.01. 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