diff --git a/applications/landlord_description_overrides/handler.py b/applications/landlord_description_overrides/handler.py index 1a99aea6..4020bc51 100644 --- a/applications/landlord_description_overrides/handler.py +++ b/applications/landlord_description_overrides/handler.py @@ -7,16 +7,16 @@ import boto3 from applications.landlord_description_overrides.landlord_description_overrides_trigger_body import ( LandlordDescriptionOverridesTriggerBody, ) -from domain.epc.built_form_type import BuiltFormType -from domain.epc.construction_age_band import ConstructionAgeBand -from domain.epc.glazing_type import GlazingType -from domain.epc.main_fuel_type import MainFuelType -from domain.epc.main_heating_system_type import MainHeatingSystemType -from domain.epc.property_type import PropertyType -from domain.epc.roof_type import RoofType -from domain.epc.water_heating_type import WaterHeatingType -from domain.epc.wall_type import WallType -from domain.epc.wall_type_construction_dates import ( +from domain.epc.property_overrides.built_form_type import BuiltFormType +from domain.epc.property_overrides.construction_age_band import ConstructionAgeBand +from domain.epc.property_overrides.glazing_type import GlazingType +from domain.epc.property_overrides.main_fuel_type import MainFuelType +from domain.epc.property_overrides.main_heating_system_type import MainHeatingSystemType +from domain.epc.property_overrides.property_type import PropertyType +from domain.epc.property_overrides.roof_type import RoofType +from domain.epc.property_overrides.water_heating_type import WaterHeatingType +from domain.epc.property_overrides.wall_type import WallType +from domain.epc.property_overrides.wall_type_construction_dates import ( wall_type_construction_date_prompt_hint, ) from infrastructure.chatgpt.chatgpt import ChatGPT diff --git a/domain/epc/property_overrides/__init__.py b/domain/epc/property_overrides/__init__.py new file mode 100644 index 00000000..e11710a4 --- /dev/null +++ b/domain/epc/property_overrides/__init__.py @@ -0,0 +1,4 @@ +"""Landlord property-override classifier vocabulary — the category enums a +landlord description resolves into, plus their value→code helpers. The classifier +target for the property_overrides chain (mirrors the property_overrides table / +override_component pgEnum). Distinct from the EPC-context types of the same name.""" diff --git a/domain/epc/built_form_type.py b/domain/epc/property_overrides/built_form_type.py similarity index 100% rename from domain/epc/built_form_type.py rename to domain/epc/property_overrides/built_form_type.py diff --git a/domain/epc/construction_age_band.py b/domain/epc/property_overrides/construction_age_band.py similarity index 100% rename from domain/epc/construction_age_band.py rename to domain/epc/property_overrides/construction_age_band.py diff --git a/domain/epc/glazing_type.py b/domain/epc/property_overrides/glazing_type.py similarity index 100% rename from domain/epc/glazing_type.py rename to domain/epc/property_overrides/glazing_type.py diff --git a/domain/epc/main_fuel_type.py b/domain/epc/property_overrides/main_fuel_type.py similarity index 100% rename from domain/epc/main_fuel_type.py rename to domain/epc/property_overrides/main_fuel_type.py diff --git a/domain/epc/main_heating_system_type.py b/domain/epc/property_overrides/main_heating_system_type.py similarity index 100% rename from domain/epc/main_heating_system_type.py rename to domain/epc/property_overrides/main_heating_system_type.py diff --git a/domain/epc/override_code_mapping.py b/domain/epc/property_overrides/override_code_mapping.py similarity index 100% rename from domain/epc/override_code_mapping.py rename to domain/epc/property_overrides/override_code_mapping.py diff --git a/domain/epc/property_type.py b/domain/epc/property_overrides/property_type.py similarity index 100% rename from domain/epc/property_type.py rename to domain/epc/property_overrides/property_type.py diff --git a/domain/epc/roof_type.py b/domain/epc/property_overrides/roof_type.py similarity index 100% rename from domain/epc/roof_type.py rename to domain/epc/property_overrides/roof_type.py diff --git a/domain/epc/wall_type.py b/domain/epc/property_overrides/wall_type.py similarity index 100% rename from domain/epc/wall_type.py rename to domain/epc/property_overrides/wall_type.py diff --git a/domain/epc/wall_type_construction_dates.py b/domain/epc/property_overrides/wall_type_construction_dates.py similarity index 97% rename from domain/epc/wall_type_construction_dates.py rename to domain/epc/property_overrides/wall_type_construction_dates.py index 0eccc44c..04deda23 100644 --- a/domain/epc/wall_type_construction_dates.py +++ b/domain/epc/property_overrides/wall_type_construction_dates.py @@ -27,7 +27,7 @@ from __future__ import annotations from dataclasses import dataclass from typing import Mapping, Optional -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.wall_type import WallType @dataclass(frozen=True) diff --git a/domain/epc/water_heating_type.py b/domain/epc/property_overrides/water_heating_type.py similarity index 100% rename from domain/epc/water_heating_type.py rename to domain/epc/property_overrides/water_heating_type.py diff --git a/infrastructure/postgres/landlord_built_form_type_override_table.py b/infrastructure/postgres/landlord_built_form_type_override_table.py index ec93ba27..5f343613 100644 --- a/infrastructure/postgres/landlord_built_form_type_override_table.py +++ b/infrastructure/postgres/landlord_built_form_type_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.built_form_type import BuiltFormType +from domain.epc.property_overrides.built_form_type import BuiltFormType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_construction_age_band_override_table.py b/infrastructure/postgres/landlord_construction_age_band_override_table.py index 91eec66e..0c8f9119 100644 --- a/infrastructure/postgres/landlord_construction_age_band_override_table.py +++ b/infrastructure/postgres/landlord_construction_age_band_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.construction_age_band import ConstructionAgeBand +from domain.epc.property_overrides.construction_age_band import ConstructionAgeBand from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_glazing_override_table.py b/infrastructure/postgres/landlord_glazing_override_table.py index f42a48d2..b25dea54 100644 --- a/infrastructure/postgres/landlord_glazing_override_table.py +++ b/infrastructure/postgres/landlord_glazing_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.glazing_type import GlazingType +from domain.epc.property_overrides.glazing_type import GlazingType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_main_fuel_override_table.py b/infrastructure/postgres/landlord_main_fuel_override_table.py index c046453b..3012a2e9 100644 --- a/infrastructure/postgres/landlord_main_fuel_override_table.py +++ b/infrastructure/postgres/landlord_main_fuel_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.main_fuel_type import MainFuelType +from domain.epc.property_overrides.main_fuel_type import MainFuelType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_main_heating_system_override_table.py b/infrastructure/postgres/landlord_main_heating_system_override_table.py index a06c35c4..d9862089 100644 --- a/infrastructure/postgres/landlord_main_heating_system_override_table.py +++ b/infrastructure/postgres/landlord_main_heating_system_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.main_heating_system_type import MainHeatingSystemType +from domain.epc.property_overrides.main_heating_system_type import MainHeatingSystemType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_property_type_override_table.py b/infrastructure/postgres/landlord_property_type_override_table.py index ae9377cd..2718fb34 100644 --- a/infrastructure/postgres/landlord_property_type_override_table.py +++ b/infrastructure/postgres/landlord_property_type_override_table.py @@ -14,7 +14,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.property_type import PropertyType +from domain.epc.property_overrides.property_type import PropertyType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_roof_type_override_table.py b/infrastructure/postgres/landlord_roof_type_override_table.py index 58bd61ff..659c5c64 100644 --- a/infrastructure/postgres/landlord_roof_type_override_table.py +++ b/infrastructure/postgres/landlord_roof_type_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.roof_type import RoofType +from domain.epc.property_overrides.roof_type import RoofType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_wall_type_override_table.py b/infrastructure/postgres/landlord_wall_type_override_table.py index b5097164..7a3c70ae 100644 --- a/infrastructure/postgres/landlord_wall_type_override_table.py +++ b/infrastructure/postgres/landlord_wall_type_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.wall_type import WallType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/infrastructure/postgres/landlord_water_heating_override_table.py b/infrastructure/postgres/landlord_water_heating_override_table.py index c69a41d2..039b5a62 100644 --- a/infrastructure/postgres/landlord_water_heating_override_table.py +++ b/infrastructure/postgres/landlord_water_heating_override_table.py @@ -16,7 +16,7 @@ from sqlalchemy import BigInteger, Column, UniqueConstraint from sqlalchemy import Enum as SAEnum from sqlmodel import Field, SQLModel -from domain.epc.water_heating_type import WaterHeatingType +from domain.epc.property_overrides.water_heating_type import WaterHeatingType from infrastructure.postgres.landlord_override_enums import override_source_sa_enum diff --git a/orchestration/bulk_upload_finaliser_orchestrator.py b/orchestration/bulk_upload_finaliser_orchestrator.py index 4aa49ab8..1d707a8d 100644 --- a/orchestration/bulk_upload_finaliser_orchestrator.py +++ b/orchestration/bulk_upload_finaliser_orchestrator.py @@ -14,10 +14,10 @@ from typing import Any, Optional from uuid import UUID -from domain.epc.built_form_type import BuiltFormType -from domain.epc.property_type import PropertyType -from domain.epc.roof_type import RoofType -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.built_form_type import BuiltFormType +from domain.epc.property_overrides.property_type import PropertyType +from domain.epc.property_overrides.roof_type import RoofType +from domain.epc.property_overrides.wall_type import WallType from repositories.bulk_upload.bulk_upload_status_writer import BulkUploadStatusWriter from repositories.landlord_overrides.landlord_override_reader import ( LandlordOverrideReader, diff --git a/repositories/property/override_backed_prediction_attributes_reader.py b/repositories/property/override_backed_prediction_attributes_reader.py index 5befd3b3..1c5a4b71 100644 --- a/repositories/property/override_backed_prediction_attributes_reader.py +++ b/repositories/property/override_backed_prediction_attributes_reader.py @@ -13,7 +13,7 @@ from __future__ import annotations from typing import Optional -from domain.epc.override_code_mapping import ( +from domain.epc.property_overrides.override_code_mapping import ( built_form_to_code, property_type_to_code, ) diff --git a/tests/domain/epc/test_construction_age_band_overlay.py b/tests/domain/epc/test_construction_age_band_overlay.py index 3408900b..5ae822e6 100644 --- a/tests/domain/epc/test_construction_age_band_overlay.py +++ b/tests/domain/epc/test_construction_age_band_overlay.py @@ -14,7 +14,7 @@ from datatypes.epc.domain.epc_property_data import ( EpcPropertyData, SapBuildingPart, ) -from domain.epc.construction_age_band import ConstructionAgeBand +from domain.epc.property_overrides.construction_age_band import ConstructionAgeBand from domain.epc.property_overlays.construction_age_band_overlay import ( age_band_overlay_for, ) diff --git a/tests/domain/epc/test_glazing_overlay.py b/tests/domain/epc/test_glazing_overlay.py index c7ba72a8..3182d79c 100644 --- a/tests/domain/epc/test_glazing_overlay.py +++ b/tests/domain/epc/test_glazing_overlay.py @@ -9,7 +9,7 @@ from __future__ import annotations import pytest -from domain.epc.glazing_type import GlazingType +from domain.epc.property_overrides.glazing_type import GlazingType from domain.epc.property_overlays.glazing_overlay import glazing_overlay_for from domain.modelling.scoring.overlay_applicator import apply_simulations from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import ( diff --git a/tests/domain/epc/test_main_fuel_overlay.py b/tests/domain/epc/test_main_fuel_overlay.py index 161078fb..9a1b1335 100644 --- a/tests/domain/epc/test_main_fuel_overlay.py +++ b/tests/domain/epc/test_main_fuel_overlay.py @@ -8,7 +8,7 @@ from __future__ import annotations import pytest -from domain.epc.main_fuel_type import MainFuelType +from domain.epc.property_overrides.main_fuel_type import MainFuelType from domain.epc.property_overlays.main_fuel_overlay import fuel_overlay_for from domain.modelling.scoring.overlay_applicator import apply_simulations from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import ( diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 8b901616..8ccde2b9 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -8,7 +8,7 @@ from __future__ import annotations import pytest -from domain.epc.main_heating_system_type import MainHeatingSystemType +from domain.epc.property_overrides.main_heating_system_type import MainHeatingSystemType from domain.epc.property_overlays.main_fuel_overlay import fuel_overlay_for from domain.epc.property_overlays.main_heating_system_overlay import ( main_heating_overlay_for, diff --git a/tests/domain/epc/test_override_code_mapping.py b/tests/domain/epc/test_override_code_mapping.py index b22ad0a5..5e462e08 100644 --- a/tests/domain/epc/test_override_code_mapping.py +++ b/tests/domain/epc/test_override_code_mapping.py @@ -12,12 +12,12 @@ from typing import Optional import pytest -from domain.epc.built_form_type import BuiltFormType -from domain.epc.override_code_mapping import ( +from domain.epc.property_overrides.built_form_type import BuiltFormType +from domain.epc.property_overrides.override_code_mapping import ( built_form_to_code, property_type_to_code, ) -from domain.epc.property_type import PropertyType +from domain.epc.property_overrides.property_type import PropertyType def test_house_maps_to_gov_code_zero() -> None: diff --git a/tests/domain/epc/test_water_heating_overlay.py b/tests/domain/epc/test_water_heating_overlay.py index 12e6e8be..a1955aa7 100644 --- a/tests/domain/epc/test_water_heating_overlay.py +++ b/tests/domain/epc/test_water_heating_overlay.py @@ -11,7 +11,7 @@ import pytest from domain.epc.property_overlays.water_heating_overlay import ( water_heating_overlay_for, ) -from domain.epc.water_heating_type import WaterHeatingType +from domain.epc.property_overrides.water_heating_type import WaterHeatingType from domain.modelling.scoring.overlay_applicator import apply_simulations from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import ( build_epc, diff --git a/tests/infrastructure/chatgpt/test_chatgpt_column_classifier.py b/tests/infrastructure/chatgpt/test_chatgpt_column_classifier.py index 425d2625..0070af49 100644 --- a/tests/infrastructure/chatgpt/test_chatgpt_column_classifier.py +++ b/tests/infrastructure/chatgpt/test_chatgpt_column_classifier.py @@ -5,8 +5,8 @@ from typing import Optional import pytest from domain.data_transformation.column_classifier import ClassificationError -from domain.epc.property_type import PropertyType -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.property_type import PropertyType +from domain.epc.property_overrides.wall_type import WallType from infrastructure.chatgpt.chatgpt import ChatGPT from infrastructure.chatgpt.chatgpt_column_classifier import ( ChatGptColumnClassifier, diff --git a/tests/orchestration/test_landlord_description_overrides_orchestrator.py b/tests/orchestration/test_landlord_description_overrides_orchestrator.py index bf5b13ce..2339c615 100644 --- a/tests/orchestration/test_landlord_description_overrides_orchestrator.py +++ b/tests/orchestration/test_landlord_description_overrides_orchestrator.py @@ -4,9 +4,9 @@ from enum import Enum from typing import Any, Optional from domain.addresses.unstandardised_address import AddressList, UnstandardisedAddress -from domain.epc.built_form_type import BuiltFormType -from domain.epc.property_type import PropertyType -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.built_form_type import BuiltFormType +from domain.epc.property_overrides.property_type import PropertyType +from domain.epc.property_overrides.wall_type import WallType from domain.postcode import Postcode from domain.data_transformation.column_classifier import ColumnClassifier from orchestration.classifiable_column import ClassifiableColumn diff --git a/tests/repositories/landlord_overrides/postgres/test_landlord_overrides_postgres_repository.py b/tests/repositories/landlord_overrides/postgres/test_landlord_overrides_postgres_repository.py index 1ce4e997..31ca2b17 100644 --- a/tests/repositories/landlord_overrides/postgres/test_landlord_overrides_postgres_repository.py +++ b/tests/repositories/landlord_overrides/postgres/test_landlord_overrides_postgres_repository.py @@ -25,8 +25,8 @@ import pytest from sqlalchemy import Engine, Table from sqlmodel import Session, SQLModel, select -from domain.epc.property_type import PropertyType -from domain.epc.wall_type import WallType +from domain.epc.property_overrides.property_type import PropertyType +from domain.epc.property_overrides.wall_type import WallType from infrastructure.landlord_overrides.landlord_overrides_postgres_repository import ( LandlordOverridesRepository, )