matflow.Rule#

class matflow.Rule(check_exists=None, check_missing=None, path=None, condition=None, cast=None, doc=None)#

Bases: Rule

Class to represent a testable condition on an element iteration or run.

Methods

from_json_like

test

Test if the rule evaluates to true or false for a given run, or element iteration and action combination.

to_dict

to_json_like

Attributes

app

Parameters:
  • check_exists (Optional[str]) –

  • check_missing (Optional[str]) –

  • path (Optional[str]) –

  • condition (Optional[Union[Dict, ConditionLike]]) –

  • cast (Optional[str]) –

  • doc (Optional[str]) –

app = App(name='MatFlow', version='0.3.0a129')#
classmethod from_json_like(json_like, shared_data=None)#
Parameters:
  • json_like (Union[Dict, List]) –

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

test(element_like, action=None)#

Test if the rule evaluates to true or false for a given run, or element iteration and action combination.

Parameters:
Return type:

bool

to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#