tapis_cli.commands.taccapis.v2.jobs.helpers package¶
Submodules¶
tapis_cli.commands.taccapis.v2.jobs.helpers.constants module¶
Globals pertaining to the Tapis files
API
tapis_cli.commands.taccapis.v2.jobs.helpers.error module¶
Exceptions and error handlers
-
exception
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
HTTPError
(*args, **kwargs)¶ Bases:
requests.exceptions.RequestException
An HTTP error occurred.
-
exception
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
HTTPNotFoundError
(*args, **kwargs)¶ Bases:
requests.exceptions.HTTPError
-
exception
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
TapisOperationFailed
¶ Bases:
agavepy.errors.AgaveError
-
exception
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
ImportNotCompleteError
(*args, **kwargs)¶ Bases:
tapis_cli.commands.taccapis.v2.jobs.helpers.error.HTTPNotFoundError
-
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
read_tapis_http_error
(http_error_object)¶ Extract useful details from an exception raised by interactting with a Tapis API
-
tapis_cli.commands.taccapis.v2.jobs.helpers.error.
handle_http_error
(httperror)¶
tapis_cli.commands.taccapis.v2.jobs.helpers.stat module¶
Web service implementations of jobs-output-list
operations
-
tapis_cli.commands.taccapis.v2.jobs.helpers.stat.
stat
(file_path, job_uuid, root_dir='/', permissive=False, agave=None, **kwargs)¶ Retrieve attributes for a given path on a Tapis storageSystem
Parameters: - file_path (str) – The path from which to fetch attributes
- job_uuid (str) – The Tapis job for file_path
- root_dir (str, optional) – Base path in output directory if file_path is relative
- permissive (bool, optional) – Whether to raise an Exception on failure
- agave (Agave, optional) – An active Tapis client
Returns: A dictionary containing Tapis attributes for a jobs output
Return type: Raises: HTTPError
– A transport or web services error was encounteredTapisOperationFailed
– Some other error prevented the operation
-
tapis_cli.commands.taccapis.v2.jobs.helpers.stat.
rsrc_type
(file_path, job_uuid, root_dir='/', permissive=False, agave=None, **kwargs)¶ Retrieve the
type
for a given path in a Tapis job outputParameters: - file_path (str) – The path from which to fetch attributes
- job_uuid (str) – The Tapis job UUID for file_path
- root_dir (str, optional) – Base path in output directory if file_path is relative
- permissive (bool, optional) – Whether to raise an Exception on failure
- agave (Agave, optional) – An active Tapis client
Returns: Either
file
ordir
Return type: string
Raises: HTTPError
– A transport or web services error was encounteredTapisOperationFailed
– Some other error prevented the operation
-
tapis_cli.commands.taccapis.v2.jobs.helpers.stat.
exists
(file_path, job_uuid, root_dir='/', permissive=False, agave=None, **kwargs)¶ Determine if a path exists in a Tapis job output
Parameters: - file_path (str) – The path from which to fetch attributes
- job_uuid (str) – The Tapis job UUID for file_path
- root_dir (str, optional) – Base path in output directory if file_path is relative
- permissive (bool, optional) – Whether to raise an Exception on failure
- agave (Agave, optional) – An active Tapis client
Returns: True if the path exists and False if not
Return type: Raises: HTTPError
– A transport or web services error was encounteredTapisOperationFailed
– Some other error prevented the operation
-
tapis_cli.commands.taccapis.v2.jobs.helpers.stat.
isfile
(file_path, job_uuid, root_dir='/', permissive=False, agave=None, **kwargs)¶ Determine if a path exists and is a file in a Tapis job output
Parameters: - file_path (str) – The path from which to fetch attributes
- job_uuid (str) – The Tapis job UUID for file_path
- root_dir (str, optional) – Base path in output directory if file_path is relative
- permissive (bool, optional) – Whether to raise an Exception on failure
- agave (Agave, optional) – An active Tapis client
Returns: True if the path is a file and False if not
Return type: Raises: HTTPError
– A transport or web services error was encounteredTapisOperationFailed
– Some other error prevented the operation
-
tapis_cli.commands.taccapis.v2.jobs.helpers.stat.
isdir
(file_path, job_uuid, root_dir='/', permissive=False, agave=None, **kwargs)¶ Determine if a path exists and is a directory in a Tapis job output
Parameters: - file_path (str) – The path from which to fetch attributes
- job_uuid (str) – The Tapis job UUID for file_path
- root_dir (str, optional) – Base path in output directory if file_path is relative
- permissive (bool, optional) – Whether to raise an Exception on failure
- agave (Agave, optional) – An active Tapis client
Returns: True if the path is a directory and False if not
Return type: Raises: HTTPError
– A transport or web services error was encounteredTapisOperationFailed
– Some other error prevented the operation
tapis_cli.commands.taccapis.v2.jobs.helpers.sync module¶
Web service implementations of jobs-output sync
operations.
-
tapis_cli.commands.taccapis.v2.jobs.helpers.sync.
download
(source, job_uuid, destination=None, excludes=None, includes=None, force=False, sync=False, atomic=False, progress=False, agave=None)¶
-
tapis_cli.commands.taccapis.v2.jobs.helpers.sync.
basic_download
(src, job_uuid, dest=None, agave=None)¶
tapis_cli.commands.taccapis.v2.jobs.helpers.walk module¶
Web service implementations of the walk
operation.
Provides both walk
and listdir
functions
via recursive jobs-output-list
web service operations.
-
tapis_cli.commands.taccapis.v2.jobs.helpers.walk.
walk
(directory_path, job_uuid, root_dir='/', directories=False, dotfiles=False, sort=False, page_size=100, agave=None, **kwargs)¶ Recursively lists contents of a Tapis job output directory.
Parameters: - directory_path (str) – Full or relative path of directory to walk
- job_uuid (str) – Tapis job UUID for directory path
- root_dir (str, optional) – Base path if directory_path is relative
- directories (bool, optional) – Whether result should include directories
- dotfiles (bool, optional) – Whether result should include dotfiles
- page_size (int, optional) – Override default Tapis files-list page size
- agave (Agave, optional) – Tapis (Agave) API client
Returns: List of Tapis-canonical absolute paths as AnnotatedFile objects
Return type: Raises: TapisOperationFailed
– An exception or error happened
-
tapis_cli.commands.taccapis.v2.jobs.helpers.walk.
listdir
(directory_path, job_uuid, root_dir='/', directories=True, dotfiles=False, page_size=100, sort=True, agave=None, **kwargs)¶ Lists immediate contents of a Tapis job output directory.
Parameters: - directory_path (str) – Full or relative path of directory to walk
- job_uuid (str) – Tapis job UUID for directory path
- root_dir (str, optional) – Base path if directory_path is relative
- directories (bool, optional) – Whether result should include directories
- dotfiles (bool, optional) – Whether result should include dotfiles
- agave (Agave, optional) – Tapis (Agave) API client
Returns: List of paths relative to directory_path
Return type: Raises: TapisOperationFailed
– Some error prevented the action from completing