debugging xml extraction for grove mansions

This commit is contained in:
Khalim Conn-Kowlessar 2024-09-04 14:02:01 +01:00
parent 50fa3f7ad2
commit a5bd856bad

View file

@ -107,6 +107,7 @@ class XmlParser:
BUILT_FORM_MAP = {
"1": "Detached",
"4": "Mid-Terrace",
}
GLAZED_AREA_MAP = {
@ -122,7 +123,8 @@ class XmlParser:
}
TENURE_MAP = {
'1': "Owner-occupied"
'1': "Owner-occupied",
"2": "Rented (social)"
}
TARIFF_MAP = {
@ -421,9 +423,17 @@ class XmlParser:
}
cylinder_insulation_type = {
None: "",
"1": "Foam",
}
cylinder_insulation_thickness = int(
self.get_node_value('Cylinder-Insulation-Thickness')
) if self.get_node_value('Cylinder-Insulation-Thickness') else None
cylinder_thermostat = boolean_lookup[self.get_node_value('Cylinder-Thermostat')] \
if self.get_node_value('Cylinder-Thermostat') else None
self.additional_data = {
"file_location": self.filekey,
"surveyor_name": self.surveyor_name,
@ -445,8 +455,8 @@ class XmlParser:
"percent_draftproofed": int(self.get_node_value('Percent-Draughtproofed')),
"has_hot_water_cylinder": boolean_lookup[self.get_node_value('Has-Hot-Water-Cylinder')],
"cylinder_insulation_type": cylinder_insulation_type[self.get_node_value('Cylinder-Insulation-Type')],
"cylinder_insulation_thickness": int(self.get_node_value('Cylinder-Insulation-Thickness')),
"cylinder_thermostat": boolean_lookup[self.get_node_value('Cylinder-Thermostat')],
"cylinder_insulation_thickness": cylinder_insulation_thickness,
"cylinder_thermostat": cylinder_thermostat,
"main_dwelling_ground_floor_area": float(main_dwelling_ground_floor_area),
"number_of_windows": int(number_of_windows),
"windows_area": float(windows_area),