perago.workspace_upload_files#
- perago.workspace_upload_files(workspace_dir, workspace_spec)[源代码]#
List local files that should be uploaded for a workspace publication.
The local workspace is scanned recursively and mapped to LakeFS object paths under the task prefix. Perago's attempt marker is implementation state and is never published as a workspace object.
- Parameters:
- workspace_dirpathlib.Path
Attempt-local workspace root to scan recursively.
- workspace_specWorkspaceSpec
Workspace declaration whose
prefixis prepended to every uploaded object path.
- Returns:
- list of WorkspaceUploadFile
Upload records sorted by local path. Directories and Perago's attempt marker file are skipped.
- Raises:
- TaskInputError
If the local workspace contains a symbolic link. Workspace publication only supports regular files.
- TaskDefinitionError
If a scanned relative path cannot be represented as a safe workspace object path.
- 参数:
workspace_dir (Path)
workspace_spec (WorkspaceSpec)
- 返回类型:
参见
build_workspace_sync_planCombine uploads with stale remote deletes.
workspace_delete_object_pathsFind stale remote objects.
Examples
>>> files = workspace_upload_files(workspace_dir, WorkspaceSpec(prefix="/audio/render")) >>> [file.object_path for file in files] ['audio/render/raw/input.wav']