hpcflow.app.WorkflowTemplate#

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

Bases: WorkflowTemplate

Class to represent initial parametrisation of a hpcFlow workflow, with limited validation logic.

Methods

from_JSON_file

Load from a JSON file.

from_JSON_string

Load from a JSON string.

from_YAML_file

Load from a YAML file.

from_YAML_string

Load from a YAML string.

from_file

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

from_json_like

to_dict

to_json_like

Attributes

app

resources

workflow

name

tasks

loops

Parameters:
app = BaseApp(name='hpcFlow', version='0.2.0a46')#
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 (Union[Dict, List]) –

  • shared_data (Optional[Dict[str, ObjectList]]) –

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