bucky.util.data_sync
#
Utilities to pull/update PAI data sources.
Module Contents#
Functions#
|
Exec a shell command optionally from a specified directory. |
|
Updates a git repository given its path. |
|
Pull a git repo at a given path. |
|
Hash a file-like object. |
locate the base_config package that shipped with bucky (it's likely in site-packages). |
|
|
Perform all the processing needed for a single data source. |
|
Unzip a file to a directory. |
|
Write a file-like object to disk. |
|
Process all the data sources found in the config w/ multiprocessing. |
- exception bucky.util.data_sync.BuckySyncException[source]#
Bases:
bucky.exceptions.BuckyException
Exception for sync operations.
- bucky.util.data_sync._exec_shell_cmd(cmd, cwd=None)[source]#
Exec a shell command optionally from a specified directory.
- bucky.util.data_sync._git_clone(url, local_name, abs_path, bare=False, depth=1, tag=None)[source]#
Updates a git repository given its path.
- Parameters:
abs_path (
str
) – Abs path location of repository to update
- bucky.util.data_sync._locate_included_data()[source]#
locate the base_config package that shipped with bucky (it’s likely in site-packages).
- bucky.util.data_sync._process_one_datasource(source_cfg, raw_data_dir)[source]#
Perform all the processing needed for a single data source.
- bucky.util.data_sync._unzip_file_obj_to_dir(f, output_dir=None)[source]#
Unzip a file to a directory.