hpcflow.sdk.core.actions.Action#
- class hpcflow.sdk.core.actions.Action(environments=None, commands=None, script=None, script_data_in=None, script_data_out=None, script_exe=None, abortable=False, input_file_generators=None, output_file_parsers=None, input_files=None, output_files=None, rules=None)#
Bases:
JSONLike
Methods
Generate the data index for this action of an element iteration whose overall data index is passed.
Get input files types from commands.
Get parameter types from commands.
Get parameter types from command stdout and stderr arguments.
Get the input types that are consumed by commands and input file generators of this action.
Get the output types that are produced by command standard outputs and errors, and by output file parsers of this action.
Find if/where a given parameter is used by the action.
Get the action scopes that are inclusive of this action, ordered by decreasing specificity.
Return the script name.
Returns True if the provided script string represents a script snippets that is to be modified before execution (e.g.
Test all rules against the specified element iteration.
Attributes
- Parameters:
environments (Optional[List[app.ActionEnvironment]]) –
commands (Optional[List[app.Command]]) –
script (Optional[str]) –
script_data_in (Optional[str]) –
script_data_out (Optional[str]) –
script_exe (Optional[str]) –
abortable (Optional[bool]) –
input_file_generators (Optional[List[app.InputFileGenerator]]) –
output_file_parsers (Optional[List[app.OutputFileParser]]) –
input_files (Optional[List[app.FileSpec]]) –
output_files (Optional[List[app.FileSpec]]) –
rules (Optional[List[app.ActionRule]]) –
- expand()#
- classmethod from_json_like(json_like, shared_data=None)#
- Parameters:
json_like (Union[Dict, List]) –
shared_data (Optional[Dict[str, ObjectList]]) –
- generate_data_index(act_idx, EAR_ID, schema_data_idx, all_data_idx, workflow, param_source)#
Generate the data index for this action of an element iteration whose overall data index is passed.
This mutates all_data_idx.
- get_command_input_types(sub_parameters=False)#
Get parameter types from commands.
- get_command_output_types()#
Get parameter types from command stdout and stderr arguments.
- get_commands_action_env()#
- get_input_file_generator_action_env(input_file_generator)#
- Parameters:
input_file_generator (InputFileGenerator) –
- get_input_file_labels()#
- get_input_types(sub_parameters=False)#
Get the input types that are consumed by commands and input file generators of this action.
- get_output_file_labels()#
- get_output_file_parser_action_env(output_file_parser)#
- Parameters:
output_file_parser (OutputFileParser) –
- get_output_types()#
Get the output types that are produced by command standard outputs and errors, and by output file parsers of this action.
- get_parameter_dependence(parameter)#
Find if/where a given parameter is used by the action.
- Parameters:
parameter (SchemaParameter) –
- get_possible_scopes()#
Get the action scopes that are inclusive of this action, ordered by decreasing specificity.
- Return type:
Tuple[ActionScope]
- get_precise_scope()#
- Return type:
ActionScope
- get_resolved_action_env(relevant_scopes, input_file_generator=None, output_file_parser=None, commands=None)#
- classmethod get_script_name(script)#
Return the script name.
- is_input_type_required(typ, provided_files)#
- static is_snippet_script(script)#
Returns True if the provided script string represents a script snippets that is to be modified before execution (e.g. to receive and provide parameter data).
- property task_schema#
- test_rules(element_iter)#
Test all rules against the specified element iteration.
- to_dict()#
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#