ADR-0010 §1: the file was a SAP 10.2 prices + SAP 10.3 CO2 hybrid,
incorrectly labelled "SAP 10.3" throughout. Realigns the CO2 column
to SAP 10.2 PDF page 189 — the table the calculator's Validation
Cohort certs were emitted against.
CO2 corrections (kg CO2e per kWh delivered):
- Mains gas: 0.214 → 0.210
- LPG (2, 3, 5, 9): 0.24 → 0.241 (precision restore)
- Biogas (7): 0.029 → 0.024
- HVO (71): 0.041 → 0.036
- FAME (73): 0.058 → 0.018
- B30K (75): 0.226 → 0.214
- Bioethanol (76): 0.072 → 0.105
- Coal / anthracite (11, 15): 0.398 → 0.395
- Smokeless (12): 0.398 → 0.366
- Wood logs (20): 0.023 → 0.028
- Wood pellets (22, 23): 0.048 → 0.053
- Wood chips (21): 0.018 → 0.023
- Dual fuel (10): 0.084 → 0.087
- Standard electricity (all grid tariffs):
0.086 → 0.136 (biggest swing — the
annual-average factor changes between
SAP 10.2 and 10.3 by -37%)
- Heat-network variants realigned to match their parent fuels
- _DEFAULT_CO2_KG_PER_KWH: 0.214 → 0.210
Header docstring rewritten:
- Re-labelled "SAP 10.2 (14-03-2025 amendment)"
- Dropped the misleading "+25% shift from SAP 10.2" block — those
13.19 → 16.49 figures were SAP 10.1 → SAP 10.2, not 10.2 → 10.3
- Notes the SAP 10.3 re-pointing trigger (corpus migration)
New test file packages/domain/src/domain/sap/tests/test_table_12.py
locks SAP 10.2 values for mains gas, standard electricity, 7h low,
24h heating, bulk LPG, heating oil, default, plus sanity checks
on the unchanged unit price + PE factor columns.
All 161 SAP + ml_training_data tests pass. CO2 corrections don't
affect SAP score (cost-driven) or PEUI (PEF-driven), so golden
fixtures and probe pinned values remain green.
P2 complete:
P2.1 (
|
||
|---|---|---|
| .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