mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
restructured app to move property to backend
This commit is contained in:
parent
3e5d6cc4b4
commit
39f954a088
11 changed files with 17 additions and 8 deletions
|
|
@ -3,7 +3,7 @@ from backend.app.dependencies import validate_token
|
|||
from backend.app.plan.schemas import PlanTriggerRequest
|
||||
from backend.app.utils import read_csv_from_s3
|
||||
from backend.app.config import get_settings
|
||||
from model_data.Property import Property
|
||||
from backend.Property import Property
|
||||
from epc_api.client import EpcClient
|
||||
from utils.logger import setup_logger
|
||||
from recommendations.FloorRecommendations import FloorRecommendations
|
||||
|
|
|
|||
|
|
@ -18,4 +18,3 @@ statsmodels
|
|||
scikit-learn
|
||||
pyspellchecker
|
||||
textblob
|
||||
xgboost
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
xgboost
|
||||
statsmodels
|
||||
scikit-learn
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import math
|
||||
from typing import List
|
||||
from model_data.BaseUtility import BaseUtility
|
||||
from model_data.Property import Property
|
||||
from backend.Property import Property
|
||||
from model_data.rdsap_tables import default_wall_thickness, age_band_data
|
||||
from recommendations.recommendation_utils import (
|
||||
r_value_per_mm_to_u_value, calculate_u_value_uplift, is_diminishing_returns, update_lowest_selected_u_value,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import itertools
|
||||
import math
|
||||
|
||||
from model_data.Property import Property
|
||||
from backend.Property import Property
|
||||
from model_data.BaseUtility import BaseUtility
|
||||
from recommendations.recommendation_utils import (
|
||||
r_value_per_mm_to_u_value, calculate_u_value_uplift, is_diminishing_returns, update_lowest_selected_u_value,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from copy import deepcopy
|
||||
from model_data.Property import Property
|
||||
from backend.Property import Property
|
||||
from statistics import mean
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -5,6 +5,17 @@ from unittest.mock import Mock
|
|||
from recommendations.FloorRecommendations import FloorRecommendations
|
||||
|
||||
|
||||
# with open(
|
||||
# os.path.abspath(os.path.dirname(__file__)) + "/recommendations/tests/test_data/input_properties.pkl", "rb"
|
||||
# ) as f:
|
||||
# input_properties = pickle.load(f)
|
||||
#
|
||||
# with open(
|
||||
# os.path.abspath(os.path.dirname(__file__)) + "/recommendations/tests/test_data/uvalue_estimates.pkl", "rb"
|
||||
# ) as f:
|
||||
# uvalue_estimates = pickle.load(f)
|
||||
|
||||
|
||||
class TestWallRecommendations:
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -106,7 +117,7 @@ class TestWallRecommendations:
|
|||
recommender.recommend()
|
||||
assert not recommender.property.floor["is_suspended"]
|
||||
assert recommender.property.floor["is_solid"]
|
||||
assert recommender.estimated_u_value == 0.7361642182695053
|
||||
assert recommender.estimated_u_value == 0.7528014214215474
|
||||
assert recommender.recommendations
|
||||
|
||||
types = {part["type"] for x in recommender.recommendations for part in x["parts"]}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import numpy as np
|
|||
from unittest.mock import Mock, MagicMock
|
||||
from recommendations.WallRecommendations import WallRecommendations
|
||||
from model_data.analysis.UvalueEstimations import UvalueEstimations
|
||||
from model_data.Property import Property
|
||||
from backend.Property import Property
|
||||
from recommendations.recommendation_utils import is_diminishing_returns
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue