The newer Elmhurst Summary export lodges a gas combi as §14.0 "Fuel Type" empty + "Main Heating SAP Code" 104 (EES "BGW"), with no fuel string. The site-notes mapper left `main_fuel_type=''`, so `cert_to_inputs` raised `MissingMainFuelType` — blocking the whole gas-combi Summary path (reproduced on the simulated 001431 case). SAP 10.2 Table 4b (PDF p.168) rows 101-119 are "Gas boilers (including mains gas, LPG and biogas)": the code fixes the boiler type/efficiency but NOT the carrier, so 104 alone can't distinguish mains gas from LPG. The disambiguator is §15.0 "Water Heating Fuel Type" — a combi/boiler heats space + water from one appliance — exactly mirroring the existing liquid-fuel (codes 120-141) fallback. `_elmhurst_gas_boiler_main_fuel` adopts the §15.0 carrier only when the SAP code is in 101-119 AND §15.0 resolves to a gas/LPG fuel, so a regular boiler + electric immersion (§15.0 = "Electricity") still strict-raises rather than mis-billing gas as electric. 2291 passed (+1), 0 failed; pyright net-zero on both 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/heating systems examples | ||
| 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