From 11a4bc24a1903f4f384aef48fd006ca8c17c28e8 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 28 Jan 2025 17:42:19 +0000 Subject: [PATCH] anonymised sharepoint keys --- .../panacap_ventures/sample_remote_assessments.py | 1 + etl/customers/stonewater/Wave 3 Preparation.py | 1 - etl/customers/stonewater/data_cleaning.py | 15 ++++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 etl/customers/panacap_ventures/sample_remote_assessments.py diff --git a/etl/customers/panacap_ventures/sample_remote_assessments.py b/etl/customers/panacap_ventures/sample_remote_assessments.py new file mode 100644 index 00000000..1a5ddff7 --- /dev/null +++ b/etl/customers/panacap_ventures/sample_remote_assessments.py @@ -0,0 +1 @@ +# The address we're looking from for the remote assessments is Natwest House, Shenley Rd, Borehamwood WD6 1DL diff --git a/etl/customers/stonewater/Wave 3 Preparation.py b/etl/customers/stonewater/Wave 3 Preparation.py index 8538188b..b1bf0638 100644 --- a/etl/customers/stonewater/Wave 3 Preparation.py +++ b/etl/customers/stonewater/Wave 3 Preparation.py @@ -2936,7 +2936,6 @@ def revised_model(): missed = original_archetypes[ ~original_archetypes["Address ID"].isin(new_priority_postcodes["Address ID"].values) ]["Archetype ID"].unique() - assert # if __name__ == "__main__": # main() diff --git a/etl/customers/stonewater/data_cleaning.py b/etl/customers/stonewater/data_cleaning.py index 8751960c..7ee06fcd 100644 --- a/etl/customers/stonewater/data_cleaning.py +++ b/etl/customers/stonewater/data_cleaning.py @@ -1,6 +1,7 @@ import os import shutil from tqdm import tqdm +from etl.access_reporting.app import SharePointClient def delete_large_files(): @@ -66,13 +67,17 @@ def delete_large_files(): def download_data_from_sharepoint(): # Given a sharepoint location, this function will download the retrofit assessment folders from the locations # specified in the sharepoint location - from etl.access_reporting.app import SharePointClient + + SHAREPOINT_CLIENT_ID = os.getenv("SHAREPOINT_CLIENT_ID", None) + SHAREPOINT_CLIENT_SECRET = os.getenv("SHAREPOINT_CLIENT_SECRET", None) + SHAREPOINT_TENANT_ID = os.getenv("SHAREPOINT_TENANT_ID", None) + OSMOSIS_SHAREPOINT_SITE_ID = os.getenv("OSMOSIS_SHAREPOINT_SITE_ID", None) sharepoint_client = SharePointClient( - tenant_id="10d5af8b-2cfd-4882-9ccd-b96e4812dacf", - client_id="6832a4c5-fb8c-4082-a746-4f51e1020f0d", - client_secret="xpC8Q~Frww48SM1V-D8lGy5iOY7P_cJ7FF3jgarQ", - site_id="bc925a9a-ad0b-4de9-9a3c-e61014cc7489" + tenant_id=SHAREPOINT_TENANT_ID, + client_id=SHAREPOINT_CLIENT_ID, + client_secret=SHAREPOINT_CLIENT_SECRET, + site_id=OSMOSIS_SHAREPOINT_SITE_ID ) # Retrieve the data from Sharepoint and write to local machine