hpcflow.sdk.core.command_files.InputFileGenerator#

class hpcflow.sdk.core.command_files.InputFileGenerator(input_file: 'app.FileSpec', inputs: 'List[app.Parameter]', script: 'str' = None, environment: 'app.Environment' = None, abortable: 'Optional[bool]' = False, rules: 'Optional[List[app.ActionRule]]' = None)#

Bases: JSONLike

Methods

compose_source

Generate the file contents of this input file generator source.

from_json_like

get_action_rules

Get the rules that allow testing if this input file generator must be run or not for a given element.

to_dict

to_json_like

write_source

Attributes

abortable

environment

rules

script

input_file

inputs

Parameters:
abortable: bool | None = False#
compose_source(snip_path)#

Generate the file contents of this input file generator source.

Return type:

str

environment: Environment = None#
classmethod from_json_like(json_like, shared_data=None)#
Parameters:
  • json_like (Union[Dict, List]) –

  • shared_data (Optional[Dict[str, ObjectList]]) –

get_action_rules()#

Get the rules that allow testing if this input file generator must be run or not for a given element.

input_file: FileSpec#
inputs: List[Parameter]#
rules: List[ActionRule] | None = None#
script: str = None#
to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
write_source(action)#