refactored floor class

This commit is contained in:
Khalim Conn-Kowlessar 2023-06-13 12:57:40 +01:00
parent f97566cba1
commit 3d395ed5bb
8 changed files with 311 additions and 347 deletions

View file

@ -40,11 +40,11 @@ def handler():
cleaner.clean()
# For testing:
from epc_data.attributes.RoofAttributes import RoofAttributes
from epc_data.attributes.FloorAttributes import FloorAttributes
descriptions = {x["floor-description"] for x in data}
out = []
for description in descriptions:
res = RoofAttributes(description).process()
res = FloorAttributes(description).process()
out.append(
{
"original_description": description,

View file

@ -1,5 +1,5 @@
from typing import Dict, Union, Optional
from epc_data.attributes.attribute_utils import extract_thermal_transmittence, search_split_description
from epc_data.attributes.attribute_utils import extract_thermal_transmittance, extract_component_types
class FloorAttributes:
@ -15,37 +15,29 @@ class FloorAttributes:
raise ValueError('Invalid description')
def process(self) -> Dict[str, Union[str, bool, int, None]]:
result: Dict[str, Union[float, str, bool, None]] = {}
description = self.description
is_suspended = any(ft in description for ft in self.FLOOR_TYPES)
is_solid = "solid" in description
to_unheated_space = "to unheated space" in description
to_external_air = "to external air" in description
assumed = "assumed" in description
has_dwelling_below = any(db in description for db in self.DWELLING_BELOW_TYPES)
is_valid = "invalid" not in description
insulation_thickness = self._find_insulation_thickness(description) if any(
it in description for it in self.INSULATION_TERMS) else None
thermal_transmittence, thermal_transmittence_unit = extract_thermal_transmittence(
description) if "thermal transmittance" in description else (None, None)
# thermal transmittance
result, description = extract_thermal_transmittance(result, description)
return {
"is_valid": is_valid,
"has_dwelling_below": has_dwelling_below,
"thermal_transmittence": thermal_transmittence,
"thermal_transmittence_unit": thermal_transmittence_unit,
"to_unheated_space": to_unheated_space,
"to_external_air": to_external_air,
"is_suspended": is_suspended,
"is_solid": is_solid,
"assumed": assumed,
"insulation_thickness": insulation_thickness
# floor type
result, description = extract_component_types(result, description, list_of_components=self.FLOOR_TYPES)
thickness_map = {
"external insulation": "average",
"internal insulation": "average",
"limited insulation": "below average",
"partial insulation": "below average",
"no insulation": "none",
"additional insulation": "above average",
"insulated": "average"
}
for key, value in thickness_map.items():
if key in description:
result['insulation_thickness'] = value
break
else:
result['insulation_thickness'] = None
def _find_insulation_thickness(self, description) -> str:
split_term = next((ex for ex in self.EXPOSURE_TYPES if ex in description), None) or \
next((ft for ft in self.FLOOR_TYPES if ft in description), None)
if split_term is not None:
desc_split = description.split(f"{split_term},")[-1].strip().split("(assumed)")[0].strip()
return search_split_description(desc_split)
raise NotImplementedError("Insulation thickness handling for this description is not implemented")
return result

View file

@ -1,6 +1,6 @@
import re
from typing import Dict, Union
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittence
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
class RoofAttributes:
@ -25,7 +25,7 @@ class RoofAttributes:
description = self.description
# thermal transmittance
result, description = extract_thermal_transmittence(result, description)
result, description = extract_thermal_transmittance(result, description)
# roof type
result, description = extract_component_types(result, description, list_of_components=self.ROOF_TYPES)

View file

@ -1,6 +1,6 @@
import re
from typing import Dict, Union
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittence
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
class WallAttributes:
@ -18,7 +18,7 @@ class WallAttributes:
description = self.description.lower()
# thermal transmittance - it can be negative which is errneous however we'll still pull it out
result, description = extract_thermal_transmittence(result, description)
result, description = extract_thermal_transmittance(result, description)
# wall type
result, description = extract_component_types(result, description, list_of_components=self.WALL_TYPES)

View file

@ -5,17 +5,18 @@ THERMAL_TRANSMITTENCE_STR = r"average thermal transmittance (-?\d+\.\d+)\s(w/m-
THERMAL_TRANSMITTANCE_REGEX = re.compile(THERMAL_TRANSMITTENCE_STR)
def extract_thermal_transmittence(result: dict, description: str) -> Tuple[
def extract_thermal_transmittance(result: dict, description: str) -> Tuple[
Dict[str, Union[None, str, float]], str
]:
"""
Extracts thermal transmittance from the description.
Extracts thermal transmittance from the description and updates the result dictionary.
:param result: Dictionary to store the result in.
:param description: Lowercase description.
:return: Tuple of r
:param description: Lowercase description string.
:return: A tuple containing the updated result dictionary and the description with the thermal transmittance part
removed.
"""
# thermal transmittance
match = THERMAL_TRANSMITTANCE_REGEX.search(description)
if match:
result['thermal_transmittance'] = float(match.group(1))
@ -33,11 +34,14 @@ def extract_component_types(result: dict, description: str, list_of_components:
Dict[str, Union[None, str, float]], str
]:
"""
Extracts component types from the description.
:param result:
:param description:
:param list_of_components:
:return:
Extracts component types from the description, updates the result dictionary, and removes the matched component
types from the description.
:param result: Dictionary to store the results in.
:param description: Lowercase description string.
:param list_of_components: List of component types to extract from the description.
:return: A tuple containing the updated result dictionary and the description with the matched component types
removed.
"""
for component in list_of_components:
result[f'is_{component.replace(" ", "_")}'] = component in description

View file

@ -1,7 +1,7 @@
from epc_data.attributes.attribute_utils import extract_thermal_transmittence
from epc_data.attributes.attribute_utils import extract_thermal_transmittance
def test_extract_thermal_transmittance():
description = "average thermal transmittance 2.3 w/m-¦k"
assert extract_thermal_transmittence({}, description) == (
assert extract_thermal_transmittance({}, description) == (
{'thermal_transmittance': 2.3, 'thermal_transmittance_unit': 'w/m-¦k'}, '')

View file

@ -1,241 +1,267 @@
clean_floor_cases = [
{'original_description': 'Average thermal transmittance 0.11 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.11, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.19 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.19, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.10 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.1, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.12 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.12, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.90 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.9, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.24 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.24, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.30 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.3, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.14 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.14, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.29 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.29, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': '(other premises below)', 'is_valid': True, 'has_dwelling_below': True,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'To external air, insulated (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': True, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'average'},
{'original_description': 'Average thermal transmittance 0.63 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.63, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Suspended, no insulation (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': True, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'none'},
{'original_description': 'Average thermal transmittance 0.08 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.08, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.17 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.17, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Solid, insulated', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': True, 'assumed': False,
'insulation_thickness': 'average'},
{'original_description': 'Average thermal transmittance 0.44 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.44, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.13 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.13, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.07 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.07, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Solid, limited insulation (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': True, 'assumed': True,
'insulation_thickness': 'below average'},
{'original_description': 'Average thermal transmittance 0.42 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.42, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.35 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.35, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.36 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.36, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.23 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.23, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.21 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.21, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.20 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.2, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.66 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.66, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.15 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.15, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.28 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.28, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.43 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.43, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.59 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.59, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'To external air, limited insulation (assumed)', 'is_valid': True,
'has_dwelling_below': False, 'thermal_transmittence': None, 'thermal_transmittence_unit': None,
'to_unheated_space': False, 'to_external_air': True, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'below average'},
{'original_description': 'Average thermal transmittance 0.34 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.34, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.47 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.47, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'To external air, no insulation (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': True, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'none'},
{'original_description': 'Average thermal transmittance 0.48 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.48, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.32 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.32, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.50 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.5, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.09 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.09, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.33 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.33, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.25 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.25, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.72 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.72, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.55 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.55, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': '(another dwelling below)', 'is_valid': True, 'has_dwelling_below': True,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.18 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.18, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.16 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.16, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'To unheated space, limited insulation (assumed)', 'is_valid': True,
'has_dwelling_below': False, 'thermal_transmittence': None, 'thermal_transmittence_unit': None,
'to_unheated_space': True, 'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'below average'},
{'original_description': 'Suspended, insulated', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': True, 'is_solid': False, 'assumed': False,
'insulation_thickness': 'average'},
{'original_description': 'Solid, insulated (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': True, 'assumed': True,
'insulation_thickness': 'average'},
{'original_description': 'Average thermal transmittance 0.31 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.31, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Solid, no insulation (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': True, 'assumed': True,
'insulation_thickness': 'none'},
{'original_description': 'Average thermal transmittance 0.22 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.22, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'To unheated space, no insulation (assumed)', 'is_valid': True,
'has_dwelling_below': False, 'thermal_transmittence': None, 'thermal_transmittence_unit': None,
'to_unheated_space': True, 'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'none'},
{'original_description': 'Average thermal transmittance 0.27 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.27, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Suspended, limited insulation (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': True, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'below average'},
{'original_description': 'To unheated space, insulated', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': True,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': 'average'},
{'original_description': 'To unheated space, insulated (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': True,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'average'},
{'original_description': 'Average thermal transmittance 0.05 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.05, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.49 W/m-¦K', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': 0.49, 'thermal_transmittence_unit': 'w/m-¦k', 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': False, 'is_solid': False, 'assumed': False,
'insulation_thickness': None},
{'original_description': 'Suspended, insulated (assumed)', 'is_valid': True, 'has_dwelling_below': False,
'thermal_transmittence': None, 'thermal_transmittence_unit': None, 'to_unheated_space': False,
'to_external_air': False, 'is_suspended': True, 'is_solid': False, 'assumed': True,
'insulation_thickness': 'average'}]
{'original_description': '(another dwelling below)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': '(other premises below)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None,
'is_assumed': False, 'is_to_unheated_space': False, 'is_to_external_air': False, 'is_suspended': False,
'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.04 W/m-¦K', 'thermal_transmittance': 0.04,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.05 W/m-¦K', 'thermal_transmittance': 0.05,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.06 W/m-¦K', 'thermal_transmittance': 0.06,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.07 W/m-¦K', 'thermal_transmittance': 0.07,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.08 W/m-¦K', 'thermal_transmittance': 0.08,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.09 W/m-¦K', 'thermal_transmittance': 0.09,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.10 W/m-¦K', 'thermal_transmittance': 0.1,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.11 W/m-¦K', 'thermal_transmittance': 0.11,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.12 W/m-¦K', 'thermal_transmittance': 0.12,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.13 W/m-¦K', 'thermal_transmittance': 0.13,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.14 W/m-¦K', 'thermal_transmittance': 0.14,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.15 W/m-¦K', 'thermal_transmittance': 0.15,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.16 W/m-¦K', 'thermal_transmittance': 0.16,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.17 W/m-¦K', 'thermal_transmittance': 0.17,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.18 W/m-¦K', 'thermal_transmittance': 0.18,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.19 W/m-¦K', 'thermal_transmittance': 0.19,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.20 W/m-¦K', 'thermal_transmittance': 0.2,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.21 W/m-¦K', 'thermal_transmittance': 0.21,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.22 W/m-¦K', 'thermal_transmittance': 0.22,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.23 W/m-¦K', 'thermal_transmittance': 0.23,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.24 W/m-¦K', 'thermal_transmittance': 0.24,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.25 W/m-¦K', 'thermal_transmittance': 0.25,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.26 W/m-¦K', 'thermal_transmittance': 0.26,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.27 W/m-¦K', 'thermal_transmittance': 0.27,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.28 W/m-¦K', 'thermal_transmittance': 0.28,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.29 W/m-¦K', 'thermal_transmittance': 0.29,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.30 W/m-¦K', 'thermal_transmittance': 0.3,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.31 W/m-¦K', 'thermal_transmittance': 0.31,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.32 W/m-¦K', 'thermal_transmittance': 0.32,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.33 W/m-¦K', 'thermal_transmittance': 0.33,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.34 W/m-¦K', 'thermal_transmittance': 0.34,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.35 W/m-¦K', 'thermal_transmittance': 0.35,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.36 W/m-¦K', 'thermal_transmittance': 0.36,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.37 W/m-¦K', 'thermal_transmittance': 0.37,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.38 W/m-¦K', 'thermal_transmittance': 0.38,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.41 W/m-¦K', 'thermal_transmittance': 0.41,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.42 W/m-¦K', 'thermal_transmittance': 0.42,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.43 W/m-¦K', 'thermal_transmittance': 0.43,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.44 W/m-¦K', 'thermal_transmittance': 0.44,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.47 W/m-¦K', 'thermal_transmittance': 0.47,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.48 W/m-¦K', 'thermal_transmittance': 0.48,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.49 W/m-¦K', 'thermal_transmittance': 0.49,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.50 W/m-¦K', 'thermal_transmittance': 0.5,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.51 W/m-¦K', 'thermal_transmittance': 0.51,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.52 W/m-¦K', 'thermal_transmittance': 0.52,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.53 W/m-¦K', 'thermal_transmittance': 0.53,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.55 W/m-¦K', 'thermal_transmittance': 0.55,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.58 W/m-¦K', 'thermal_transmittance': 0.58,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.59 W/m-¦K', 'thermal_transmittance': 0.59,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.60 W/m-¦K', 'thermal_transmittance': 0.6,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.63 W/m-¦K', 'thermal_transmittance': 0.63,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.66 W/m-¦K', 'thermal_transmittance': 0.66,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.67 W/m-¦K', 'thermal_transmittance': 0.67,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.72 W/m-¦K', 'thermal_transmittance': 0.72,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.90 W/m-¦K', 'thermal_transmittance': 0.9,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 0.95 W/m-¦K', 'thermal_transmittance': 0.95,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.00 W/m-¦K', 'thermal_transmittance': 1.0,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.05 W/m-¦K', 'thermal_transmittance': 1.05,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.13 W/m-¦K', 'thermal_transmittance': 1.13,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.18 W/m-¦K', 'thermal_transmittance': 1.18,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.21 W/m-¦K', 'thermal_transmittance': 1.21,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.26 W/m-¦K', 'thermal_transmittance': 1.26,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.27 W/m-¦K', 'thermal_transmittance': 1.27,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.29 W/m-¦K', 'thermal_transmittance': 1.29,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.30 W/m-¦K', 'thermal_transmittance': 1.3,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.33 W/m-¦K', 'thermal_transmittance': 1.33,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.38 W/m-¦K', 'thermal_transmittance': 1.38,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.39 W/m-¦K', 'thermal_transmittance': 1.39,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 1.41 W/m-¦K', 'thermal_transmittance': 1.41,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Average thermal transmittance 3.56 W/m-¦K', 'thermal_transmittance': 3.56,
'thermal_transmittance_unit': 'w/m-¦k', 'is_assumed': False, 'is_to_unheated_space': False,
'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'insulation_thickness': None},
{'original_description': 'Solid, insulated', 'thermal_transmittance': None, 'thermal_transmittance_unit': None,
'is_assumed': False, 'is_to_unheated_space': False, 'is_to_external_air': False, 'is_suspended': False,
'is_solid': True, 'insulation_thickness': 'average'},
{'original_description': 'Solid, insulated (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': True, 'insulation_thickness': 'average'},
{'original_description': 'Solid, limited insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': True, 'insulation_thickness': 'below average'},
{'original_description': 'Solid, no insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': True, 'insulation_thickness': 'none'},
{'original_description': 'Suspended, insulated', 'thermal_transmittance': None, 'thermal_transmittance_unit': None,
'is_assumed': False, 'is_to_unheated_space': False, 'is_to_external_air': False, 'is_suspended': True,
'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'Suspended, insulated (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': True, 'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'Suspended, limited insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': True, 'is_solid': False, 'insulation_thickness': 'below average'},
{'original_description': 'Suspended, no insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': True, 'is_solid': False, 'insulation_thickness': 'none'},
{'original_description': 'To external air, insulated', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': False, 'is_to_unheated_space': False, 'is_to_external_air': True,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'To external air, insulated (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': True,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'To external air, limited insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': True,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'below average'},
{'original_description': 'To external air, no insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': True,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'none'},
{'original_description': 'To unheated space, insulated', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': False, 'is_to_unheated_space': True, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'To unheated space, insulated (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': True, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'average'},
{'original_description': 'To unheated space, limited insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': True, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'below average'},
{'original_description': 'To unheated space, no insulation (assumed)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': True, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'none'}
]

View file

@ -1,66 +1,8 @@
import pytest
from epc_data.tests.test_data.test_floor_attributes_cases import clean_floor_cases
from epc_data.attributes.FloorAttributes import FloorAttributes
from unittest.mock import patch
class TestEpcClean:
class TestCleanFloor:
@patch('epc_data.attributes.attribute_utils.search_split_description')
def test_find_insulation_thickness_to_unheated_space(self, mock_search_split_description):
# Set up the mock to return a specific value
mock_search_split_description.return_value = 'average'
# clean_floor = CleanFloor('description to unheated space')
insulation_thickness = FloorAttributes._find_insulation_thickness(
'to unheated space, insulated', True, False, False, False
)
assert insulation_thickness == 'average'
@patch('epc_data.attributes.attribute_utils.search_split_description')
def test_find_insulation_thickness_to_external_air(self, mock_search_split_description):
# Set up the mock to return a specific value
mock_search_split_description.return_value = 'below average'
# clean_floor = CleanFloor('To external air, limited insulation')
insulation_thickness = FloorAttributes._find_insulation_thickness(
'to external air, limited insulation', False, True, False, False
)
assert insulation_thickness == 'below average'
@patch('epc_data.attributes.attribute_utils.search_split_description')
def test_find_insulation_thickness_is_suspended(self, mock_search_split_description):
# Set up the mock to return a specific value
mock_search_split_description.return_value = 'none'
# clean_floor = CleanFloor('description suspended')
insulation_thickness = FloorAttributes._find_insulation_thickness(
'suspended, no insulation', False, False, True, False
)
assert insulation_thickness == 'none'
@patch('epc_data.attributes.attribute_utils.search_split_description')
def test_find_insulation_thickness_is_solid(self, mock_search_split_description):
# Set up the mock to return a specific value
mock_search_split_description.return_value = 'none'
# clean_floor = CleanFloor('description solid')
insulation_thickness = FloorAttributes._find_insulation_thickness(
'solid, no insulation (assumed)', False, False, False, True
)
assert insulation_thickness == 'none'
def test_find_insulation_thickness_not_handled(self):
clean_floor = FloorAttributes('description not handled')
with pytest.raises(NotImplementedError):
clean_floor._find_insulation_thickness(
'description not handled', False, False, False, False
)
class TestCleanFloor:
def test_clean_floor(self):
for test_case in clean_floor_cases: