matflow.OutputFileParser#

class matflow.OutputFileParser(output_files, output=None, script=None, environment=None, inputs=None, outputs=None, options=None, script_pass_env_spec=False, abortable=False, save_files=True, clean_up=None, rules=None)#

Bases: OutputFileParser

Parameters:
  • output (matflow.Parameter | None) – The singular output parsed by this parser. Not to be confused with outputs (plural).

  • outputs (List[str]) – Optional multiple outputs from the upstream actions of the schema that are required to parametrise this parser.

  • output_files (List[FileSpec]) –

  • script (str) –

  • environment (Environment) –

  • inputs (List[str]) –

  • options (Dict) –

  • script_pass_env_spec (bool | None) –

  • abortable (bool | None) –

  • save_files (List[str] | bool) –

  • clean_up (List[str] | None) –

  • rules (List[ActionRule] | None) –

Methods

compose_source

Generate the file contents of this output file parser source.

from_json_like

get_action_rules

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

to_dict

to_json_like

write_source

Attributes

abortable

app

clean_up

environment

inputs

options

output

outputs

rules

save_files

script

script_pass_env_spec

output_files

abortable: bool | None = False#
app = App(name='MatFlow', version='0.3.0a129')#
clean_up: List[str] | None = None#
compose_source(snip_path)#

Generate the file contents of this output file parser source.

Return type:

str

environment: Environment = None#
classmethod from_json_like(json_like, shared_data=None)#
get_action_rules()#

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

inputs: List[str] = None#
options: Dict = None#
output: app.Parameter | None = None#
output_files: List[app.FileSpec]#
outputs: List[str] = None#
rules: List[app.ActionRule] | None = None#
save_files: List[str] | bool = True#
script: str = None#
script_pass_env_spec: bool | None = False#
to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
write_source(action, env_spec)#
Parameters:

env_spec (Dict[str, Any]) –