Merge pull request #326 from Hestia-Homes/survey-extraction

Survey extraction
This commit is contained in:
KhalimCK 2024-07-24 16:56:31 +01:00 committed by GitHub
commit 1d642e71e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 0 deletions

View file

View file

@ -0,0 +1,3 @@
# Survey Extraction App
This app is responsible survey data from energy assessment XMLs

View file

@ -0,0 +1,9 @@
def main():
"""
This function executes the main process, which will retrieve data from the specified locations, extract the data
fields and store them to our database
:return:
"""
# TODO: Build solution to get this data from Onedrive and store what we need in S3
# In s3, we have a bucket called retrofit-energy-assessments-{stage} which

View file

@ -175,6 +175,12 @@ module "retrofit_hotwater_kwh_predictions" {
allowed_origins = var.allowed_origins
}
module "retrofit_energy_assessments" {
source = "./modules/s3"
bucketname = "retrofit-energy-assessments-${var.stage}"
allowed_origins = var.allowed_origins
}
# Set up the route53 record for the API
module "route53" {
source = "./modules/route53"

View file

@ -782,6 +782,11 @@ class Recommendations:
}
}
# Prevent from being negative
predicted_sap_points = 0 if predicted_sap_points < 0 else predicted_sap_points
predicted_co2_savings = 0 if predicted_co2_savings < 0 else predicted_co2_savings
predicted_heat_demand = 0 if predicted_heat_demand < 0 else predicted_heat_demand
if rec["type"] == "low_energy_lighting":
# For the moment, we cap the number of SAP points that can be achieved by ventilation at 2
rec["sap_points"] = min(predicted_sap_points, LightingRecommendations.SAP_LIMIT)