toil.server.wes.abstract_backend¶
Attributes¶
Exceptions¶
Raised when the requested workflow version is not implemented. |
|
Raised when the request is malformed. |
|
Raised when the requested run ID is not found. |
|
Raised when the requested workflow is not in the expected state. |
|
Raised when the request is forbidden. |
|
Raised when an internal error occurred during the execution of the workflow. |
Classes¶
A class to represent a GA4GH Workflow Execution Service (WES) API backend. |
Functions¶
|
This decorator catches errors from the wrapped function and returns a JSON |
Module Contents¶
- toil.server.wes.abstract_backend.logger¶
- toil.server.wes.abstract_backend.TaskLog¶
- exception toil.server.wes.abstract_backend.VersionNotImplementedException(wf_type, version=None, supported_versions=None)¶
Bases:
Exception
Raised when the requested workflow version is not implemented.
- exception toil.server.wes.abstract_backend.MalformedRequestException(message)¶
Bases:
Exception
Raised when the request is malformed.
- Parameters:
message (str)
- exception toil.server.wes.abstract_backend.WorkflowNotFoundException¶
Bases:
Exception
Raised when the requested run ID is not found.
- exception toil.server.wes.abstract_backend.WorkflowConflictException(run_id)¶
Bases:
Exception
Raised when the requested workflow is not in the expected state.
- Parameters:
run_id (str)
- exception toil.server.wes.abstract_backend.OperationForbidden(message)¶
Bases:
Exception
Raised when the request is forbidden.
- Parameters:
message (str)
- exception toil.server.wes.abstract_backend.WorkflowExecutionException(message)¶
Bases:
Exception
Raised when an internal error occurred during the execution of the workflow.
- Parameters:
message (str)
- toil.server.wes.abstract_backend.handle_errors(func)¶
This decorator catches errors from the wrapped function and returns a JSON formatted error message with the appropriate status code defined by the GA4GH WES spec.
- Parameters:
func (Callable[Ellipsis, Any])
- Return type:
Callable[Ellipsis, Any]
- class toil.server.wes.abstract_backend.WESBackend(options)¶
A class to represent a GA4GH Workflow Execution Service (WES) API backend. Intended to be inherited. Subclasses should implement all abstract methods to handle user requests when they hit different endpoints.
- options¶
- resolve_operation_id(operation_id)¶
Map an operationId defined in the OpenAPI or swagger yaml file to a function.
- Parameters:
operation_id (str) – The operation ID defined in the specification.
- Returns:
A function that should be called when the given endpoint is reached.
- Return type:
Any
- abstract get_service_info()¶
Get information about the Workflow Execution Service.
GET /service-info
- abstract list_runs(page_size=None, page_token=None)¶
List the workflow runs.
GET /runs
- abstract run_workflow()¶
Run a workflow. This endpoint creates a new workflow run and returns a RunId to monitor its progress.
POST /runs
- abstract get_run_log(run_id)¶
Get detailed info about a workflow run.
GET /runs/{run_id}
- abstract cancel_run(run_id)¶
Cancel a running workflow.
POST /runs/{run_id}/cancel
- abstract get_run_status(run_id)¶
Get quick status info about a workflow run, returning a simple result with the overall state of the workflow run.
GET /runs/{run_id}/status
- static log_for_run(run_id, message)¶
- collect_attachments(run_id, temp_dir)¶
Collect attachments from the current request by staging uploaded files to temp_dir, and return the temp_dir and parsed body of the request.