get triggers working for abri address list

This commit is contained in:
Daniel Roth 2026-06-03 14:23:08 +00:00
parent 19e40ff049
commit d31d0683f5
2 changed files with 13 additions and 10 deletions

View file

@ -10,19 +10,19 @@ from backend.pashub_fetcher.pashub_to_ara_trigger_request import (
)
from backend.pashub_fetcher.handler.handler import handler
if __name__ == "__main__":
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
filepath: str = os.path.join(
BASE_DIR,
"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)
ws = wb["filtered_2"]
ws = wb["filtered"]
HEADER_ROW = 3
HEADER_ROW = 1
headers: Dict[str, int] = {}
for col in range(1, ws.max_column + 1):
@ -31,7 +31,7 @@ if __name__ == "__main__":
headers[value.strip()] = col
name_col = headers["Name"]
link_col = headers["PasHub Link"]
link_col = headers["PasHub ID"]
hubspot_deal_id_col = headers["HubSpot ID"]
trigger_requests: List[PashubToAraTriggerRequest] = []
@ -50,7 +50,10 @@ if __name__ == "__main__":
trigger_requests.append(
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,
)
)

View file

@ -49,7 +49,7 @@ DEAL_ID_FILTER = None
EXCEL_PATH: str = os.path.join(
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 = ""
@ -65,9 +65,9 @@ def _build_requests(excel_path: str) -> list[PashubToAraTriggerRequest]:
if header_val is not None:
headers[str(header_val).strip()] = col
pashub_col: int = headers["PasHub link"]
record_id_col: int = headers["Record ID"]
deal_name_col: int = headers["Deal Name"]
pashub_col: int = headers["PasHub ID"]
record_id_col: int = headers["HubSpot ID"]
deal_name_col: int = headers["Name"]
deal_stage_col: Optional[int] = headers.get("Deal Stage", None)
requests: list[PashubToAraTriggerRequest] = []