mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
updating eligibility pipeline to factor in ciga
This commit is contained in:
parent
69dcc73363
commit
b80ffda392
1 changed files with 14 additions and 5 deletions
|
|
@ -1159,8 +1159,11 @@ def get_epc_data(
|
|||
eligibility.check_eco4_warmfront()
|
||||
|
||||
# We check the conditions for checking the penultimate epc
|
||||
identified_for_gbis = property_meta["ECO Eligibility"] == "gbis"
|
||||
identified_for_gbis = property_meta["ECO Eligibility"] in ["gbis"]
|
||||
identified_for_eco4 = property_meta["ECO Eligibility"] in ["eco4"]
|
||||
subject_to_ciga = property_meta["ECO Eligibility"] in [
|
||||
"eco4 (subject to ciga)", "eco4 - passed ciga", "failed ciga"
|
||||
]
|
||||
|
||||
# condition 1 - identified for gbis and not eligible
|
||||
condition_1 = (
|
||||
|
|
@ -1179,8 +1182,11 @@ def get_epc_data(
|
|||
|
||||
# Nothing identified
|
||||
condition_4 = (
|
||||
not identified_for_gbis and not identified_for_eco4 and not eligibility.gbis_warmfront and not
|
||||
eligibility.eco4_warmfront["eligible"]
|
||||
not identified_for_gbis
|
||||
and not identified_for_eco4
|
||||
and not eligibility.gbis_warmfront
|
||||
and not subject_to_ciga
|
||||
and not eligibility.eco4_warmfront["eligible"]
|
||||
)
|
||||
|
||||
# Not identified but seemingly eligible for eco4 or gbis
|
||||
|
|
@ -1190,6 +1196,10 @@ def get_epc_data(
|
|||
)
|
||||
)
|
||||
|
||||
condition_6 = (
|
||||
subject_to_ciga and not eligibility.eco4_warmfront["eligible"]
|
||||
)
|
||||
|
||||
if condition_1 or condition_2:
|
||||
# We check the penultimate epc
|
||||
eligibility = Eligibility(epc=penultimate_epc, cleaned=cleaned)
|
||||
|
|
@ -1199,8 +1209,7 @@ def get_epc_data(
|
|||
# We don't update just to make data cleaning easier
|
||||
if penultimate_epc.get("estimated") is None:
|
||||
older_epcs = [x for x in searcher.data["rows"] if x["lmk-key"] != penultimate_epc["lmk-key"]]
|
||||
elif condition_3 or condition_4 or condition_5:
|
||||
# If we have successfully identified for gbis, we don't need to check the penultimate epc
|
||||
elif condition_3 or condition_4 or condition_5 or condition_6:
|
||||
pass
|
||||
else:
|
||||
NotImplementedError("Implement me")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue