Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/download_physics_iq_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@


def download_directory(remote_path: str, local_path: str):
"""Sync a remote directory with a local directory using gsutil rsync.
"""Sync a remote directory with a local directory using gcloud storage rsync.

Args:
remote_path: Cloud path.
local_path: Local path.
"""
print(f"Syncing {remote_path} → {local_path} using gsutil rsync...")
print(f"Syncing {remote_path} → {local_path} using gcloud storage rsync...")
os.makedirs(local_path, exist_ok=True)
try:
subprocess.run(["gsutil", "-m", "rsync", "-r", remote_path, local_path], check=True)
subprocess.run(["gcloud", "storage", "rsync", "--recursive", remote_path, local_path], check=True)
print(f"Sync complete for {remote_path}.")
except subprocess.CalledProcessError as e:
print(f"Failed to sync: {remote_path}. Error: {e}")
Expand Down