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_pathsNormalised paths for all schema input types.
all_schema_input_typesThe set of all schema input types (over all specified schemas).
all_schema_inputsThe inputs to this task's schemas.
all_schema_output_typesThe set of all schema output types (over all specified schemas).
all_schema_outputsThe outputs from this task's schemas.
all_sourced_normalised_pathsAll the sourced normalised paths, including of sub-values.
defined_input_typesThe input types defined by this task, being the input types defined by any of its element sets.
dir_nameArtefact directory name.
element_setsThe element sets.
indexThe index of this task within the workflow's tasks.
insert_IDInsertion ID.
nameTask name.
non_universal_input_typesGet input types for each schema that are non-universal.
num_all_schema_actionsThe total number of schema actions.
num_element_setsThe number of element sets.
objectiveThe goal of this task.
output_labelsThe labels on the outputs of the task.
schemaThe single task schema, if only one, else raises.
schemasAll the task schemas.
undefined_input_typesThe schema's input types that this task doesn't define.
undefined_inputsThe task's inputs that are undefined.
universal_input_typesGet input types that are associated with all schemas
merge_envsWhether to merge
environmentsintoresourcesusing the "any" scope on first initialisation.workflow_templateThe template workflow that this task is within.