hpcflow.sdk.core.actions.ElementActionRun#

class hpcflow.sdk.core.actions.ElementActionRun(id_, is_pending, element_action, index, data_idx, start_time, end_time, snapshot_start, snapshot_end, submission_idx, success, skip, exit_code, metadata)#

Bases: object

Methods

compose_commands

returns:
  • commands

compose_source

Generate the file contents of this source.

get

get_EAR_dependencies

Get EARs that this EAR depends on.

get_IFG_input_values

get_OFP_inputs

get_OFP_output_files

get_OFP_outputs

get_data_idx

get_dependent_EARs

Get downstream EARs that depend on this EAR.

get_environment

get_input_dependencies

Get information about locally defined input, sequence, and schema-default values that this EAR depends on.

get_input_values

get_parameter_names

get_parameter_sources

get_resources

Resolve specific resources for this EAR, considering all applicable scopes and template-level resources.

write_source

Attributes

action

data_idx

dir_diff

Get the changes to the EAR working directory due to the execution of this EAR.

element

element_action

element_iteration

end_time

exit_code

id_

index

Run index.

input_files

inputs

is_pending

metadata

output_files

outputs

resources

skip

snapshot_end

snapshot_start

start_time

status

Return the state of this EAR.

submission_idx

success

task

workflow

Parameters:
  • id_ (int) –

  • is_pending (bool) –

  • index (int) –

  • data_idx (Dict) –

  • start_time (Union[datetime, None]) –

  • end_time (Union[datetime, None]) –

  • snapshot_start (Union[Dict, None]) –

  • snapshot_end (Union[Dict, None]) –

  • submission_idx (Union[int, None]) –

  • success (Union[bool, None]) –

  • skip (bool) –

  • exit_code (Union[int, None]) –

  • metadata (Dict) –

property action#
compose_commands(jobscript, JS_action_idx)#
Returns:

  • commands

  • shell_vars – List of shell variable names that must be saved as workflow parameter data as strings.

Parameters:
Return type:

Tuple[str, List[str], List[int]]

compose_source(snip_path)#

Generate the file contents of this source.

Parameters:

snip_path (Path) –

Return type:

str

property data_idx#
property dir_diff: DirectorySnapshotDiff#

Get the changes to the EAR working directory due to the execution of this EAR.

property element#
property element_action#
property element_iteration#
property end_time#
property exit_code#
get(path=None, default=None, raise_on_missing=False, raise_on_unset=False)#
Parameters:
  • path (str) –

  • default (Any) –

  • raise_on_missing (bool) –

  • raise_on_unset (bool) –

get_EAR_dependencies(as_objects=False)#

Get EARs that this EAR depends on.

get_IFG_input_values()#
Return type:

Dict[str, Any]

get_OFP_inputs()#
Return type:

Dict[str, str | List[str]]

get_OFP_output_files()#
Return type:

Dict[str, str | List[str]]

get_OFP_outputs()#
Return type:

Dict[str, str | List[str]]

get_data_idx(path=None)#
Parameters:

path (str) –

get_dependent_EARs(as_objects=False)#

Get downstream EARs that depend on this EAR.

Return type:

List[int | ElementActionRun]

get_environment()#
get_input_dependencies()#

Get information about locally defined input, sequence, and schema-default values that this EAR depends on. Note this does not get values from this EAR’s task/schema, because the aim of this method is to help determine which upstream tasks this EAR depends on.

get_input_values()#
Return type:

Dict[str, Any]

get_parameter_names(prefix)#
get_parameter_sources(path=None, typ=None, as_strings=False, use_task_index=False)#
Parameters:
  • path (str) –

  • typ (str) –

  • as_strings (bool) –

  • use_task_index (bool) –

get_resources()#

Resolve specific resources for this EAR, considering all applicable scopes and template-level resources.

property id_: int#
property index#

Run index.

property input_files#
property inputs#
property is_pending: bool#
property metadata#
property output_files#
property outputs#
property resources#
property skip#
property snapshot_end#
property snapshot_start#
property start_time#
property status#

Return the state of this EAR.

property submission_idx#
property success#
property task#
property workflow#
write_source(js_idx, js_act_idx)#
Parameters:
  • js_idx (int) –

  • js_act_idx (int) –