Skip to content

Commit

Permalink
🐛 fix: add garmin pooling pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
megasanjay committed Oct 2, 2024
1 parent 4dfeb41 commit 886197f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions aireadi/zip_garmin_and_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@


def main(): # sourcery skip: low-code-quality
project_name = "AI-READI"
site_names = ["UW", "UAB", "UCSD"]
# site_names = ["UAB"]
# project_name = "AI-READI"
project_name = "AI-READI/Stanford-Test"
# site_names = ["UW", "UAB", "UCSD"]
site_names = ["Pilot-Garmin"]
device = "FitnessTracker"

# create datalake clients
Expand All @@ -31,12 +32,14 @@ def main(): # sourcery skip: low-code-quality
with open(completed_folders_file, "r") as f:
completed_folders = json.load(f)

destination_directory = f"{project_name}/pooled-data/{device}"
# destination_directory = f"{project_name}/pooled-data/{device}"
destination_directory = f"{project_name}/Pilot-Garmin/FitnessTracker-processed"

for site_name in site_names:
print(f"Processing {device} data for {site_name}")

source_directory = f"{project_name}/{site_name}/{site_name}_{device}"
# source_directory = f"{project_name}/{site_name}/{site_name}_{device}"
source_directory = f"{project_name}/{site_name}/{device}"
source_folder_paths = source_service_client.get_paths(
path=source_directory, recursive=False
)
Expand Down Expand Up @@ -140,8 +143,8 @@ def main(): # sourcery skip: low-code-quality
)

# Write at the end of each loop in case of failure
with open(completed_folders_file, "w") as f:
json.dump(completed_folders, f, indent=4)
# with open(completed_folders_file, "w") as f:
# json.dump(completed_folders, f, indent=4)

print(f"Folder {batch_folder_name} processed successfully")

Expand Down

0 comments on commit 886197f

Please sign in to comment.