flowserv.model.workflow.repository module

Helper class to access the repository of workflow templates.

class flowserv.model.workflow.repository.WorkflowRepository(templates: Optional[List[Dict]] = None)

Bases: object

Repository for workflow specifications. The repository is currently maintained as a Json file on GitHub. The file contains an array of objects. Each object describes an installable workflow template with the following elements:

  • id: unique human-readable template identifier

  • description: short description

  • url: Url to a git repository that contains the workflow files

  • manifest: optional (relative) path for manifest file in the workflow

    repository.

get(identifier: str) Tuple[str, str, Dict]

Get the URL, the optional (relative) manifest file path, and optional additional arguments (e.g., the branch name) for the repository entry with the given identifier. If no entry matches the identifier it is returned as the function result.

Returns a tuple of (url, manifestpath, args). If the manifest element is not present in the repository entry the second value is None. If no arguments are present the result is an empty dictionary.

Parameters

identifier (string) – Workflow template identifier or repository URL.

Return type

string, string, dict

list() List[Tuple[str, str, str]]

Get list of tuples containing the template identifier, descriptions, and repository URL.

Return type

list