Adds the user-simulated 001431 case (the cert that drove S0380.189/.190) as an Elmhurst-only e2e fixture: Summary PDF → extractor → mapper → calculator, every Block-1 SapResult field pinned against the P960-0001-001431 worksheet at abs=1e-4. All 11 pins pass with zero residual — the case is clean, confirming the S0380.190 gas-combi fuel derivation closes the Summary path natively. Verified the handover's flagged "+0.0007 SAP" was a target artifact, not a cascade gap: the worksheet displays ECF (257) rounded to 1.6047 and integer SAP (258)=78; the cascade's continuous SAP is computed from the UNROUNDED ECF = (255)*(256)/((4)+45) = 660.9750*0.4200/173.0, giving 77.6147 — which matches the worksheet's own unrounded value. Pinning the continuous SAP from the display-rounded ECF (→ 77.6144) was the wrong target. Block-1 line refs all match exactly: (211) 10699.7225, (219) 3327.1592, (231) 86.0, (232) 283.2229, (255) 660.9750, (272) 3000.1664, Σ(98) 8987.7669. Summary mirrored into the tracked fixtures dir as Summary_001431_gas_combi.pdf (distinct name — the corpus reuses cert 001431 across every heating variant); source Summary + worksheet tracked under sap worksheets/golden fixture debugging/ as the pin ground truth. 2302 passed (+11), 0 failed; pyright net-zero on new/changed files. 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