mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
get triggers working for abri address list
This commit is contained in:
parent
19e40ff049
commit
d31d0683f5
2 changed files with 13 additions and 10 deletions
|
|
@ -10,19 +10,19 @@ from backend.pashub_fetcher.pashub_to_ara_trigger_request import (
|
||||||
)
|
)
|
||||||
from backend.pashub_fetcher.handler.handler import handler
|
from backend.pashub_fetcher.handler.handler import handler
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||||
filepath: str = os.path.join(
|
filepath: str = os.path.join(
|
||||||
BASE_DIR,
|
BASE_DIR,
|
||||||
"pashub_fetcher",
|
"pashub_fetcher",
|
||||||
"The_Guinness_Partnership_AtkinsR_alis_Coordination_Design_Board_1774881298.xlsx",
|
"local_run_02-06-2026",
|
||||||
|
"ECO_Approach_Coordination_Design_KN.xlsx",
|
||||||
)
|
)
|
||||||
|
|
||||||
wb = load_workbook(filepath, data_only=True)
|
wb = load_workbook(filepath, data_only=True)
|
||||||
ws = wb["filtered_2"]
|
ws = wb["filtered"]
|
||||||
|
|
||||||
HEADER_ROW = 3
|
HEADER_ROW = 1
|
||||||
|
|
||||||
headers: Dict[str, int] = {}
|
headers: Dict[str, int] = {}
|
||||||
for col in range(1, ws.max_column + 1):
|
for col in range(1, ws.max_column + 1):
|
||||||
|
|
@ -31,7 +31,7 @@ if __name__ == "__main__":
|
||||||
headers[value.strip()] = col
|
headers[value.strip()] = col
|
||||||
|
|
||||||
name_col = headers["Name"]
|
name_col = headers["Name"]
|
||||||
link_col = headers["PasHub Link"]
|
link_col = headers["PasHub ID"]
|
||||||
hubspot_deal_id_col = headers["HubSpot ID"]
|
hubspot_deal_id_col = headers["HubSpot ID"]
|
||||||
|
|
||||||
trigger_requests: List[PashubToAraTriggerRequest] = []
|
trigger_requests: List[PashubToAraTriggerRequest] = []
|
||||||
|
|
@ -50,7 +50,10 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
trigger_requests.append(
|
trigger_requests.append(
|
||||||
PashubToAraTriggerRequest(
|
PashubToAraTriggerRequest(
|
||||||
pashub_link=str(link), hubspot_deal_id=str(hubspot_deal_id)
|
pashub_link=str(link),
|
||||||
|
hubspot_deal_id=str(hubspot_deal_id),
|
||||||
|
address=str(name),
|
||||||
|
get_other_files=True,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ DEAL_ID_FILTER = None
|
||||||
|
|
||||||
EXCEL_PATH: str = os.path.join(
|
EXCEL_PATH: str = os.path.join(
|
||||||
os.path.dirname(__file__),
|
os.path.dirname(__file__),
|
||||||
"local_run_02-06-2026/NCHA WAVE 3 RAs.xlsx",
|
"local_run_02-06-2026/ECO_Approach_Coordination_Design_KN.xlsx",
|
||||||
)
|
)
|
||||||
|
|
||||||
SHAREPOINT_PROPERTIES_FOLDER: str = ""
|
SHAREPOINT_PROPERTIES_FOLDER: str = ""
|
||||||
|
|
@ -65,9 +65,9 @@ def _build_requests(excel_path: str) -> list[PashubToAraTriggerRequest]:
|
||||||
if header_val is not None:
|
if header_val is not None:
|
||||||
headers[str(header_val).strip()] = col
|
headers[str(header_val).strip()] = col
|
||||||
|
|
||||||
pashub_col: int = headers["PasHub link"]
|
pashub_col: int = headers["PasHub ID"]
|
||||||
record_id_col: int = headers["Record ID"]
|
record_id_col: int = headers["HubSpot ID"]
|
||||||
deal_name_col: int = headers["Deal Name"]
|
deal_name_col: int = headers["Name"]
|
||||||
deal_stage_col: Optional[int] = headers.get("Deal Stage", None)
|
deal_stage_col: Optional[int] = headers.get("Deal Stage", None)
|
||||||
|
|
||||||
requests: list[PashubToAraTriggerRequest] = []
|
requests: list[PashubToAraTriggerRequest] = []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue