flowserv.service.workflow.remote module
Implementation for the API service component that provides access to workflow handles and ranking results. This implementation is for the service that accesses a remote RESTful API.
- class flowserv.service.workflow.remote.RemoteWorkflowService(descriptor: flowserv.service.descriptor.ServiceDescriptor)
Bases:
flowserv.service.workflow.base.WorkflowServiceAPI component that provides methods to access workflows and workflow evaluation rankings (benchmark leader boards) via a RESTful API.
- get_ranking(workflow_id: str, order_by: Optional[List[flowserv.model.template.schema.SortColumn]] = None, include_all: Optional[bool] = False) Dict
Get serialization of the evaluation ranking for the given workflow.
- Parameters
workflow_id (string) – Unique workflow identifier
order_by (list(flowserv.model.template.schema.SortColumn), default=None) – Use the given attribute to sort run results. If not given, the schema default sort order is used
include_all (bool, default=False) – Include all entries (True) or at most one entry (False) per user group in the returned ranking
- Return type
dict
- get_result_archive(workflow_id: str) IO
Get compressed tar-archive containing all result files that were generated by a given workflow run. If the run is not in sucess state a unknown resource error is raised.
Raises an unauthorized access error if the user does not have read access to the run.
- Parameters
run_id (string) – Unique run identifier
- Return type
io.BytesIO
- get_result_file(workflow_id: str, file_id: str) IO
Get file handle for a resource file that was generated as the result of a successful workflow run.
Raises an unauthorized access error if the user does not have read access to the run.
- Parameters
run_id (string) – Unique run identifier.
file_id (string) – Unique result file identifier.
- Return type
- get_workflow(workflow_id: str) Dict
Get serialization of the handle for the given workflow.
- Parameters
workflow_id (string) – Unique workflow identifier
- Return type
dict
- Raises
- list_workflows() Dict
Get serialized listing of descriptors for all workflows in the repository.
- Return type
dict