Model/backend/app/db
Khalim Conn-Kowlessar 883028c89e P6.1 follow-on: unbox BuildingPartIdentifier at backend boundaries
Threads the strict BuildingPartIdentifier type (introduced in a8b443f6)
through the two remaining backend touchpoints:

- EpcBuildingPartModel.from_*: SQLModel column expects a string, so
  unbox the enum with .identifier.value before binding to the DB.
- documents_parser end-to-end tests: swap bare-string equality
  ("main" / "extension_1") for identity checks against the enum
  members (BuildingPartIdentifier.MAIN / EXTENSION_1).

Documents_parser test pack passes (105/105). No dedicated SQLModel test
covers EpcBuildingPartModel.from_*; the .value line is exercised
transitively via db_writer.py / local_runner.py in production.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 09:58:23 +00:00
..
functions use pytest-postgresql in db tests instead of mocking and checking sql strings 2026-05-08 10:13:44 +00:00
models P6.1 follow-on: unbox BuildingPartIdentifier at backend boundaries 2026-05-20 09:58:23 +00:00
__init__.py Adding database connection to fastapi 2023-07-31 11:02:22 +01:00
base.py fixing typing issues 2026-02-26 12:45:52 +00:00
connection.py map survey to model 🟥 2026-01-28 18:06:18 +00:00
utils.py uploading plan and recommendations wip 2023-08-10 18:26:41 +01:00