cli

cli

Usage

Functions

Name Description
sync() Sync dataset directories from a remote location to a local destination.

sync()

Sync dataset directories from a remote location to a local destination.

Usage

sync(
    remote,
    destination,
    dataset_pattern,
    dry_run=False,
)
Parameters
remote: str

The remote location to sync from (e.g., “csph-googledrive:2. Projects”).

destination: str

The local destination to sync to (e.g., “/n/holylabs/LABS/cgolden_lab/Lab/data_freeze/golden_googledrive_rclone”).

dataset_pattern: re.Pattern

A regular expression pattern to match dataset directories (e.g., r”/[0-9]+. Datasets/$“).

dry_run: bool = False
If True, perform a dry run without making any changes (default is False).
Returns
int
Returns 0 if the sync was successful, or 1 if there were any failures.