mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added some restrictions on creation of file input
This commit is contained in:
parent
7c943b8c1c
commit
042fbea083
1 changed files with 11 additions and 3 deletions
|
|
@ -9,10 +9,10 @@ import pandas as pd
|
|||
from epc_api.client import EpcClient
|
||||
from utils.s3 import save_csv_to_s3
|
||||
|
||||
FILE_SIZE = 100
|
||||
FILE_SIZE = 250
|
||||
EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN", None)
|
||||
USER_ID = 2
|
||||
PORTFOLIO_ID = 47
|
||||
USER_ID = 8
|
||||
PORTFOLIO_ID = 48
|
||||
|
||||
|
||||
def app():
|
||||
|
|
@ -48,6 +48,14 @@ def app():
|
|||
+ a_data["rows"]
|
||||
)
|
||||
|
||||
# TODO: We also take homes with just a specific type of wall
|
||||
|
||||
final_data = [
|
||||
x for x in final_data if ("cavity wall" in x["walls-description"].lower()) or (
|
||||
"solid brick" in x["walls-description"].lower()
|
||||
) or ("average thermal transmittance" in x["walls-description"].lower())
|
||||
]
|
||||
|
||||
# TODO: For the moment, don't use park homes
|
||||
final_csv_data = pd.DataFrame(
|
||||
[{"address": x["address"], "postcode": x["postcode"], "Notes": None} for x
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue