mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
from typing import List
|
|
from backend.Property import Property
|
|
from recommendations.Costs import Costs
|
|
|
|
|
|
class WindowsRecommendations:
|
|
|
|
def __init__(self, property_instance: Property, materials: List):
|
|
self.property = property_instance
|
|
self.costs = Costs(self.property)
|
|
|
|
self.recommendations = []
|
|
|
|
self.glazing_materials = [
|
|
material for material in materials if material["type"] == "window_glazing"
|
|
]
|
|
|
|
# TODO: This will be populated with the works associated to upgrading glazing. This will involve removal of
|
|
# previous glazing and installation of new glazing. This will not include the cost of the windows material
|
|
# themselfs
|
|
self.glazing_works_materials = []
|
|
|
|
def recommend(self):
|
|
"""
|
|
This method will recommend the best possible glazing options for a property.
|
|
|
|
In order to do this, we need to estimate the number of windows that the home has. This information will be
|
|
stored in the property object, under property.number_of_windows
|
|
:return:
|
|
"""
|
|
|
|
if not self.property.number_of_windows:
|
|
raise ValueError("Number of windows not specified")
|