hpcflow.sdk.core.task.TaskTemplate#

hpcflow.sdk.core.task.TaskTemplate#

A task used as a template for other tasks.

Methods

__init__(schema[, repeats, groups, ...])

add_group(name, where, group_by_distinct)

Add an element group to this task.

all_schema_actions()

Get all the schema actions and their indices.

from_json_like(json_like[, shared_data])

Make an instance of this class from JSON (or YAML) data.

get_available_task_input_sources(element_set)

For each input parameter of this task, generate a list of possible input sources that derive from inputs or outputs of this and other provided tasks.

get_input_statuses(elem_set)

Get a dict whose keys are normalised input paths (without the "inputs" prefix), and whose values are InputStatus objects.

get_param_provided_element_sets(labelled_path)

Get the element set indices of this task for which a specified parameter type is locally provided.

get_schema_action(idx)

Get the schema action at the given index.

get_task_unique_names(tasks)

Get the unique name of each in a list of tasks.

is_input_type_required(typ, element_set)

Check if an given input type must be specified in the parametrisation of this element set.

prepare_element_resolution(element_set, ...)

Set up the resolution of details of elements (especially multiplicities and how iterations are nested) within an element set.

provides_parameters()

Get all provided parameter labelled types and whether they are inputs and outputs, considering all element sets.

set_sequence_parameters(element_set)

Set up parameters parsed by value sequences.

to_dict()

Serialize this object as a dictionary.

to_json_like([dct, shared_data, exclude, path])

Serialize this object as an object structure that can be trivially converted to JSON.

to_persistent(workflow, insert_ID)

Return a copy where any schema input defaults are saved to a persistent workflow.

Attributes

all_schema_input_normalised_paths

Normalised paths for all schema input types.

all_schema_input_types

The set of all schema input types (over all specified schemas).

all_schema_inputs

The inputs to this task's schemas.

all_schema_output_types

The set of all schema output types (over all specified schemas).

all_schema_outputs

The outputs from this task's schemas.

all_sourced_normalised_paths

All the sourced normalised paths, including of sub-values.

defined_input_types

The input types defined by this task, being the input types defined by any of its element sets.

dir_name

Artefact directory name.

element_sets

The element sets.

index

The index of this task within the workflow's tasks.

insert_ID

Insertion ID.

name

Task name.

non_universal_input_types

Get input types for each schema that are non-universal.

num_all_schema_actions

The total number of schema actions.

num_element_sets

The number of element sets.

objective

The goal of this task.

output_labels

The labels on the outputs of the task.

schema

The single task schema, if only one, else raises.

schemas

All the task schemas.

undefined_input_types

The schema's input types that this task doesn't define.

undefined_inputs

The task's inputs that are undefined.

universal_input_types

Get input types that are associated with all schemas

merge_envs

Whether to merge environments into resources using the "any" scope on first initialisation.

workflow_template

The template workflow that this task is within.