Closes the final 49 → 0 diffs in two moves:
1. **Filter non-load-bearing SapWindow sub-fields from the diff.** The
Elmhurst mapper surfaces Summary §11 strings (window_type='Window',
glazing_type='Double between 2002 and 2021', glazing_gap='12 mm',
data_source='Manufacturer', permanent_shutters_present='None')
while the cohort `make_window` helper produces API-style int codes
for the same fields. None of these affect the SAP cascade — it
reads only window_width / window_height / orientation /
window_location / frame_factor / window_transmission_details.
{u_value, solar_transmittance}. Adding `_NON_LOAD_BEARING_WINDOW_
SUBFIELDS` + `_is_excluded_path` to the diff helper drops them
from the comparison without changing the load-bearing scope. Per
the user's earlier "load-bearing only" decision — encoding noise
that doesn't change the cascade output is excluded.
2. **`make_window` helper now defaults `frame_factor=0.7`.** The
SAP10.2 Table 6c PVC default (and the modal value the Elmhurst
mapper surfaces from Summary §11). Previously the helper left it
`None`, which the cascade resolves to 0.7 internally; setting it
explicitly is cascade-equivalent and closes the last 7 diffs.
Diff count for cohort 000474:
Slice 63 baseline: 50
Slice 64 (Cat A): 14
Slice 65 (HW): 12
Slice 66+67 (mapper): 5
Slice 68 (party-wall): 1
Slice 69 (windows): 49 (encoding-noise surface)
Slice 70 (filter): **0** — diff test now GREEN
`test_from_elmhurst_site_notes_matches_hand_built_000474` PASSES.
First cohort cert fully validated at the EpcPropertyData load-
bearing-field level. All 66 cohort cascade pins remain GREEN at
1e-4. Pyright net-zero (0 errors on touched files).
Next slices: parametrize the diff test over the 5 other cohort
certs (000477, 000480, 000487, 000490, 000516) — each may have
its own bulk-update + mapper-tweak pattern, but the toolchain
(diff helper, exclusion list, _LOAD_BEARING_FIELDS, helper
defaults) is in place. Then 001479 (after Slice 62 hand-built
hits 1e-4). Then the API mapper diff test (currently the API
mapper has its own gaps — Slice 58/59/60 cascade fixes closed
golden cert residuals but field-level cross-mapper parity isn't
asserted yet).
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