mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #86 from Hestia-Homes/main
getting deployment working
This commit is contained in:
commit
24e35b4b99
8 changed files with 77 additions and 15 deletions
|
|
@ -24,5 +24,4 @@ typing_extensions==4.7.1
|
||||||
uvicorn==0.22.0
|
uvicorn==0.22.0
|
||||||
uvloop==0.17.0
|
uvloop==0.17.0
|
||||||
watchfiles==0.19.0
|
watchfiles==0.19.0
|
||||||
websockets==11.0.3
|
websockets==11.0.3
|
||||||
boto3
|
|
||||||
23
make_serverless_requirements.sh
Normal file
23
make_serverless_requirements.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# This script combines the requirements from base.txt and requirements.txt into serverless_requirements.txt
|
||||||
|
|
||||||
|
# Navigate to the directory containing this script
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
cd "$DIR"
|
||||||
|
|
||||||
|
# Concatenate the requirements files with a newline character in between
|
||||||
|
cat backend/requirements/base.txt > serverless_requirements.txt
|
||||||
|
echo "" >> serverless_requirements.txt
|
||||||
|
cat model_data/requirements/requirements.txt >> serverless_requirements.txt
|
||||||
|
|
||||||
|
# Identify duplicates
|
||||||
|
duplicates=$(sort serverless_requirements.txt | uniq -d)
|
||||||
|
|
||||||
|
if [ -n "$duplicates" ]; then
|
||||||
|
echo "Warning: Duplicate entries found:"
|
||||||
|
echo "$duplicates"
|
||||||
|
echo "Please resolve these conflicts manually in the combined requirements file."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Print a success message
|
||||||
|
echo "Combined requirements files into serverless_requirements.txt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import pandas as pd
|
from datetime import datetime
|
||||||
import re
|
import re
|
||||||
from epc_api.client import EpcClient
|
from epc_api.client import EpcClient
|
||||||
from model_data.config import EPC_AUTH_TOKEN
|
from model_data.config import EPC_AUTH_TOKEN
|
||||||
|
|
@ -130,7 +130,8 @@ class Property(BaseUtility):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.full_sap_epc:
|
if self.full_sap_epc:
|
||||||
self.year_built = pd.to_datetime(self.full_sap_epc["lodgement-date"]).year
|
self.year_built = datetime.strptime(self.full_sap_epc["lodgement-date"], '%Y-%m-%d').year
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.data["construction-age-band"] not in self.DATA_ANOMALY_MATCHES:
|
if self.data["construction-age-band"] not in self.DATA_ANOMALY_MATCHES:
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,4 @@ mock
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-mock
|
pytest-mock
|
||||||
pip-check-reqs
|
pip-check-reqs
|
||||||
|
seaborn
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
pandas==2.0.3
|
|
||||||
numpy==1.25.1
|
|
||||||
pytz==2023.3
|
pytz==2023.3
|
||||||
tzdata==2023.3
|
tzdata==2023.3
|
||||||
epc-api-python==1.0.2
|
epc-api-python==1.0.2
|
||||||
|
|
@ -11,9 +9,5 @@ dbfread
|
||||||
pyproj
|
pyproj
|
||||||
pint
|
pint
|
||||||
mip
|
mip
|
||||||
seaborn
|
|
||||||
statsmodels
|
|
||||||
scikit-learn
|
|
||||||
pyspellchecker
|
pyspellchecker
|
||||||
textblob
|
textblob
|
||||||
xgboost
|
|
||||||
|
|
@ -1 +1,6 @@
|
||||||
geopandas
|
geopandas
|
||||||
|
xgboost
|
||||||
|
statsmodels
|
||||||
|
scikit-learn
|
||||||
|
pandas==2.0.3
|
||||||
|
numpy==1.25.1
|
||||||
|
|
@ -14,13 +14,14 @@ provider:
|
||||||
|
|
||||||
|
|
||||||
package:
|
package:
|
||||||
# individually: true
|
individually: true
|
||||||
# include:
|
# include:
|
||||||
# - backend/**
|
# - backend/**
|
||||||
# # Might need to refine the paths that are included
|
# # Might need to refine the paths that are included
|
||||||
# - model_data/**
|
# - model_data/**
|
||||||
exclude:
|
exclude:
|
||||||
- model_data/local_data/**
|
- model_data/local_data/**
|
||||||
|
- model_data/tests/**
|
||||||
- infrastructure/**
|
- infrastructure/**
|
||||||
- data_collection/**
|
- data_collection/**
|
||||||
- node_modules/**
|
- node_modules/**
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,40 @@
|
||||||
-r backend/requirements/base.txt
|
anyio==3.7.1
|
||||||
-r model_data/requirements/requirements.txt
|
cffi==1.15.1
|
||||||
|
click==8.1.3
|
||||||
|
cryptography==37.0.4
|
||||||
|
ecdsa==0.18.0
|
||||||
|
exceptiongroup==1.1.2
|
||||||
|
fastapi==0.99.1
|
||||||
|
h11==0.14.0
|
||||||
|
httptools==0.5.0
|
||||||
|
idna==3.4
|
||||||
|
mangum==0.17.0
|
||||||
|
pyasn1==0.5.0
|
||||||
|
pycparser==2.21
|
||||||
|
pydantic==1.10.11
|
||||||
|
PyJWT==2.7.0
|
||||||
|
python-dotenv==1.0.0
|
||||||
|
python-jose==3.3.0
|
||||||
|
PyYAML==6.0
|
||||||
|
rsa==4.9
|
||||||
|
six==1.16.0
|
||||||
|
sniffio==1.3.0
|
||||||
|
starlette==0.27.0
|
||||||
|
typing_extensions==4.7.1
|
||||||
|
uvicorn==0.22.0
|
||||||
|
uvloop==0.17.0
|
||||||
|
watchfiles==0.19.0
|
||||||
|
websockets==11.0.3
|
||||||
|
pytz==2023.3
|
||||||
|
tzdata==2023.3
|
||||||
|
epc-api-python==1.0.2
|
||||||
|
tqdm
|
||||||
|
mypy
|
||||||
|
fuzzywuzzy
|
||||||
|
python-Levenshtein
|
||||||
|
dbfread
|
||||||
|
pyproj
|
||||||
|
pint
|
||||||
|
mip
|
||||||
|
pyspellchecker
|
||||||
|
textblob
|
||||||
Loading…
Add table
Reference in a new issue