From 8f021cb266d56bf3d6b7f49540589e13debe1969 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 11 Sep 2023 14:53:02 +0100 Subject: [PATCH] welsh translations --- model_data/app.py | 2 +- .../epc_attributes/HotWaterAttributes.py | 1 + .../epc_attributes/MainheatAttributes.py | 5 +- .../MainheatControlAttributes.py | 3 +- .../test_hot_water_attributes_cases.py | 10 ++++ .../test_mainheat_attributes_cases.py | 48 +++++++++++++++++++ .../test_mainheat_control_attributes_cases.py | 3 ++ 7 files changed, 69 insertions(+), 3 deletions(-) diff --git a/model_data/app.py b/model_data/app.py index 5106a0e4..e0ca5cc7 100644 --- a/model_data/app.py +++ b/model_data/app.py @@ -36,7 +36,7 @@ def app(): cleaner = EpcClean([]) epc_directories = [entry for entry in EPC_DIRECTORY.iterdir() if entry.is_dir()] - for directory in tqdm(epc_directories): + for directory in tqdm(epc_directories[140:]): data = pd.read_csv(directory / "certificates.csv", low_memory=False) # Rename the columns to the same format as the api returns data.columns = [c.replace("_", "-").lower() for c in data.columns] diff --git a/model_data/epc_attributes/HotWaterAttributes.py b/model_data/epc_attributes/HotWaterAttributes.py index e6bc27e8..0442b65d 100644 --- a/model_data/epc_attributes/HotWaterAttributes.py +++ b/model_data/epc_attributes/HotWaterAttributes.py @@ -108,6 +108,7 @@ class HotWaterAttributes(Definitions): "popty estynedig olew, dim thermostat ar y silindr": "oil range cooker, no cylinder thermostat", "cynllun cymunedol": "community scheme", "nwy wrth fwy nag un pwynt": "gas multipoint", + "popty estynedig olew": "oil range cooker" } def __init__(self, description: str): diff --git a/model_data/epc_attributes/MainheatAttributes.py b/model_data/epc_attributes/MainheatAttributes.py index d2bc3b11..74028ab1 100644 --- a/model_data/epc_attributes/MainheatAttributes.py +++ b/model_data/epc_attributes/MainheatAttributes.py @@ -39,7 +39,10 @@ class MainHeatAttributes(Definitions): "bwyler a rheiddiaduron, logiau coed": 'boiler and radiators, wood logs', "bwyler a rheiddiaduron, tanwydd di-fwg": "boiler and radiators, smokeless fuel", "bwyler a rheiddiaduron, b30k": "boiler and radiators, b30k", - "dim system ar gael, rhagdybir bod gwresogyddion trydan": "no system present, electric heaters assumed" + "bwyler a rheiddiaduron, glo": "boiler and radiators, coal", + "dim system ar gael, rhagdybir bod gwresogyddion trydan": "no system present, electric heaters assumed", + "gwresogyddion ystafell, glo carreg": "room heaters, coal", + "pwmp gwres sygçön tarddu yn yr awyr, rheiddiaduron, trydan": "air source heat pump, radiators, electric", } REMAP = { diff --git a/model_data/epc_attributes/MainheatControlAttributes.py b/model_data/epc_attributes/MainheatControlAttributes.py index ba5e97b5..5448e01d 100644 --- a/model_data/epc_attributes/MainheatControlAttributes.py +++ b/model_data/epc_attributes/MainheatControlAttributes.py @@ -98,7 +98,8 @@ class MainheatControlAttributes(Definitions): "heating, " "room thermostat " "only", - "dim": "none" + "dim": "none", + "dim rheolaeth thermostatig ar dymheredd yr ystafell": "no thermostatic control of room temperature" } def __init__(self, description: str): diff --git a/model_data/tests/test_data/test_hot_water_attributes_cases.py b/model_data/tests/test_data/test_hot_water_attributes_cases.py index 88f92928..aa78d709 100644 --- a/model_data/tests/test_data/test_hot_water_attributes_cases.py +++ b/model_data/tests/test_data/test_hot_water_attributes_cases.py @@ -196,4 +196,14 @@ hotwater_cases = [ 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None, 'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None, 'assumed': False, "appliance": None}, + {'original_description': 'Oil range cooker', 'heater_type': None, 'system_type': None, + 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, + 'tariff_type': None, + 'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None, + 'assumed': False, "appliance": "oil range cooker"}, + {'original_description': 'Popty estynedig olew', 'heater_type': None, 'system_type': None, + 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, + 'tariff_type': None, + 'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None, + 'assumed': False, "appliance": "oil range cooker"}, ] diff --git a/model_data/tests/test_data/test_mainheat_attributes_cases.py b/model_data/tests/test_data/test_mainheat_attributes_cases.py index 3f6c2911..597fa8e8 100644 --- a/model_data/tests/test_data/test_mainheat_attributes_cases.py +++ b/model_data/tests/test_data/test_mainheat_attributes_cases.py @@ -1359,4 +1359,52 @@ mainheat_cases = [ 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': True, 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False, "has_micro-cogeneration": False}, + {'original_description': 'Gwresogyddion ystafell, glo carreg', 'has_radiators': False, 'has_fan_coil_units': False, + 'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False, + 'has_pipes_in_concrete_slab': False, 'has_boiler': False, 'has_air_source_heat_pump': False, + 'has_room_heaters': True, 'has_electric_storage_heaters': False, 'has_warm_air': False, + 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False, + 'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False, + 'has_water_source_heat_pump': False, 'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False, + 'has_LPG': False, 'has_coal': True, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False, + 'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, + 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, + "has_electric_heat_pumps": False, + "has_micro-cogeneration": False}, + {'original_description': 'Pwmp gwres syGÇÖn tarddu yn yr awyr, rheiddiaduron, trydan', 'has_radiators': True, + 'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False, + 'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False, + 'has_air_source_heat_pump': True, 'has_room_heaters': False, 'has_electric_storage_heaters': False, + 'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, + 'has_community_scheme': False, 'has_ground_source_heat_pump': False, 'has_no_system_present': False, + 'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': True, + 'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False, 'has_oil': False, + 'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False, + 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False, + 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False, + "has_micro-cogeneration": False}, + {'original_description': 'Boiler and radiators, coal', 'has_radiators': True, 'has_fan_coil_units': False, + 'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False, + 'has_pipes_in_concrete_slab': False, 'has_boiler': True, 'has_air_source_heat_pump': False, + 'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False, + 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False, + 'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False, + 'has_water_source_heat_pump': False, 'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False, + 'has_LPG': False, 'has_coal': True, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False, + 'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, + 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, + "has_electric_heat_pumps": False, + "has_micro-cogeneration": False}, + {'original_description': 'Bwyler a rheiddiaduron, glo', 'has_radiators': True, 'has_fan_coil_units': False, + 'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False, + 'has_pipes_in_concrete_slab': False, 'has_boiler': True, 'has_air_source_heat_pump': False, + 'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False, + 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, 'has_community_scheme': False, + 'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False, + 'has_water_source_heat_pump': False, 'has_electric': False, 'has_mains_gas': False, 'has_wood_logs': False, + 'has_LPG': False, 'has_coal': True, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False, + 'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, + 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, + "has_electric_heat_pumps": False, + "has_micro-cogeneration": False}, ] diff --git a/model_data/tests/test_data/test_mainheat_control_attributes_cases.py b/model_data/tests/test_data/test_mainheat_control_attributes_cases.py index 696771b4..a13826d0 100644 --- a/model_data/tests/test_data/test_mainheat_control_attributes_cases.py +++ b/model_data/tests/test_data/test_mainheat_control_attributes_cases.py @@ -198,4 +198,7 @@ mainheat_control_cases = [ {'original_description': 'Dim', 'thermostatic_control': None, 'charging_system': None, 'switch_system': None, 'no_control': 'none', 'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None}, + {'original_description': 'Dim rheolaeth thermostatig ar dymheredd yr ystafell', 'thermostatic_control': None, + 'charging_system': None, 'switch_system': None, 'no_control': 'no thermostatic control', 'dhw_control': None, + 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None}, ]