hpcflow.app.Task#
- class hpcflow.app.Task(schemas, repeats=None, resources=None, inputs=None, input_files=None, sequences=None, input_sources=None, nesting_order=None, element_sets=None, sourceable_elem_iters=None)#
Bases:
Task
Parametrisation of an isolated task for which a subset of input values are given “locally”. The remaining input values are expected to be satisfied by other tasks/imports in the workflow.
Methods
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 a dict whose keys are normalised input paths (without the "inputs" prefix), and whose values are InputStatus objects.
Get the element set indices of this task for which a specified parameter type is locally provided.
Get the unique name of each in a list of tasks.
Check if an given input type must be specified in the parametrisation of this element set.
Return a copy where any schema input defaults are saved to a persistent workflow.
Attributes
Get the set of all schema input types (over all specified schemas).
Get the set of all schema output types (over all specified schemas).
Artefact directory name.
Get input types for each schema that are non-universal.
Get input types that are associated with all schemas
Get schema input types for which no input sources are currently specified.
- Parameters:
schemas (Union[app.TaskSchema, str, List[app.TaskSchema], List[str]]) –
resources (Optional[Dict[str, Dict]]) –
inputs (Optional[List[app.InputValue]]) –
input_files (Optional[List[app.InputFile]]) –
sequences (Optional[List[app.ValueSequence]]) –
input_sources (Optional[Dict[str, app.InputSource]]) –
nesting_order (Optional[List]) –
element_sets (Optional[List[app.ElementSet]]) –
sourceable_elem_iters (Optional[List[int]]) –
- add_group(name, where, group_by_distinct)#
- Parameters:
name (str) –
where (ElementFilter) –
group_by_distinct (ParameterPath) –
- property all_schema_input_normalised_paths#
- property all_schema_input_types#
Get the set of all schema input types (over all specified schemas).
- property all_schema_inputs: Tuple[SchemaInput]#
- property all_schema_output_types#
Get the set of all schema output types (over all specified schemas).
- property all_schema_outputs: Tuple[SchemaOutput]#
- property all_sequences_normalised_paths#
- property all_sourced_normalised_paths#
- property all_used_sequences_normalised_paths#
- app = BaseApp(name='hpcFlow', version='0.2.0a45')#
- property defined_input_types#
- property dir_name#
Artefact directory name.
- property element_sets#
- classmethod from_json_like(json_like, shared_data=None)#
- Parameters:
json_like (Union[Dict, List]) –
shared_data (Optional[Dict[str, ObjectList]]) –
- get_all_required_schema_inputs(element_set)#
- get_available_task_input_sources(element_set, source_tasks=None)#
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.
Note this only produces a subset of available input sources for each input parameter; other available input sources may exist from workflow imports.
- Parameters:
element_set (ElementSet) –
- Return type:
- get_input_statuses(elem_set)#
Get a dict whose keys are normalised input paths (without the “inputs” prefix), and whose values are InputStatus objects.
- Parameters:
elem_set (ElementSet) – The element set for which input statuses should be returned.
- Return type:
- get_non_sub_parameter_input_values()#
- get_param_provided_element_sets(typ)#
Get the element set indices of this task for which a specified parameter type is locally provided.
- get_schema_action(idx)#
- get_sub_parameter_input_values()#
- static get_task_unique_names(tasks)#
Get the unique name of each in a list of tasks.
- property index#
- property insert_ID#
- is_input_type_required(typ, element_set)#
Check if an given input type must be specified in the parametrisation of this element set.
A schema input need not be specified if it is only required to generate an input file, and that input file is passed directly.
- Parameters:
typ (str) –
element_set (ElementSet) –
- Return type:
- property name#
- property non_universal_input_types#
Get input types for each schema that are non-universal.
- property num_element_sets#
- property objective#
- prepare_element_resolution(element_set, input_data_indices)#
- property provides_parameters#
- property schemas#
- set_sequence_parameters(element_set)#
- to_dict()#
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
- to_persistent(workflow, insert_ID)#
Return a copy where any schema input defaults are saved to a persistent workflow. Element set data is not made persistent.
- property undefined_input_types#
- property undefined_inputs#
- property universal_input_types#
Get input types that are associated with all schemas
- property unsourced_inputs#
Get schema input types for which no input sources are currently specified.