WorkflowTemplate#

class hpcflow.api.hpcflow.WorkflowTemplate(name, tasks=<factory>, loops=<factory>, workflow=None, resources=None)#

Bases: WorkflowTemplate

Parameters:
  • name (str) –

  • tasks (Optional[List[Task]]) –

  • loops (Optional[List[Loop]]) –

  • workflow (Optional[Workflow]) –

  • resources (Optional[Dict[str, Dict]]) –

app = BaseApp(name=hpcflow, version=0.2.0a40)#
classmethod from_JSON_file(path)#

Load from a JSON file.

Parameters:

path (PathLike) – The path to the JSON file containing the workflow template parametrisation.

Return type:

WorkflowTemplate

classmethod from_JSON_string(string)#

Load from a JSON string.

Parameters:

string (str) – The JSON string containing the workflow template parametrisation.

Return type:

WorkflowTemplate

classmethod from_YAML_file(path)#

Load from a YAML file.

Parameters:

path (PathLike) – The path to the YAML file containing the workflow template parametrisation.

Return type:

WorkflowTemplate

classmethod from_YAML_string(string)#

Load from a YAML string.

Parameters:

string (str) – The YAML string containing the workflow template parametrisation.

Return type:

WorkflowTemplate

classmethod from_file(path, template_format='yaml')#

Load from either a YAML or JSON file, depending on the file extension.

Parameters:
  • path (PathLike) – The path to the file containing the workflow template parametrisation.

  • template_format (str | None) – The file format to expect at path. One of “json” or “yaml”, if specified. By default, “yaml”.

Return type:

WorkflowTemplate

classmethod from_json_like(json_like, shared_data=None)#
Parameters:
  • json_like

  • shared_data (dict of (str: ObjectList)) –

loops: List[Loop] | None#
name: str#
resources: Dict[str, Dict] | None = None#
tasks: List[Task] | None#
to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
workflow: Workflow | None = None#