diff --git a/model_data/BaseUtility.py b/model_data/BaseUtility.py index 2474e517..c6934da1 100644 --- a/model_data/BaseUtility.py +++ b/model_data/BaseUtility.py @@ -8,6 +8,7 @@ class BaseUtility: # Invalid reports are where the value provided is out of bounds, e.g. a negative energy rating of -1199 or a # non-integer, there is no valid energy band for this, so it is marked as INVALID! "INVALID", + "INVALID!", # When the energy certificate was first lodged on the register there was no requirement to lodge this data # item, i.e. a non-mandatory item. "NO DATA!", diff --git a/model_data/app.py b/model_data/app.py index 90dc158a..289b2a67 100644 --- a/model_data/app.py +++ b/model_data/app.py @@ -122,10 +122,10 @@ def handler(): [{"address1": p.address1, **p.walls} for p in input_properties] ) - input_properties[6].data["address1"] - input_properties[6].data["postcode"] - walls_df["address1"].values[6] - walls_df["original_description"].values[6] + input_properties[7].data["address1"] + input_properties[7].data["postcode"] + walls_df["address1"].values[7] + walls_df["original_description"].values[7] from model_data.recommendations.WallRecommendations import WallRecommendations self = WallRecommendations(property_instance=input_properties[7], uvalue_estimates=uvalue_estimates) diff --git a/model_data/recommendations/WallRecommendations.py b/model_data/recommendations/WallRecommendations.py index f92421ea..95942007 100644 --- a/model_data/recommendations/WallRecommendations.py +++ b/model_data/recommendations/WallRecommendations.py @@ -237,9 +237,8 @@ class WallRecommendations(BaseUtility): band = [int(x) for x in re.findall(r'\b\d{4}\b', self.property.data["construction-age-band"])] return band[0] - # - - raise NotImplementedError("Implement me!") + # We don't know when the property was built + return None def recommend(self): # if building built after 1990 + we're able to identify U-value + @@ -262,7 +261,7 @@ class WallRecommendations(BaseUtility): # Recommend insulation self.find_insulation(u_value) - if is_solid_brick and insulation_thickness == "none": + if is_solid_brick: if insulation_thickness == "none": # This is an estimated figure based on industry standards