matflow.TaskSchema#

class matflow.TaskSchema(objective, actions=None, method=None, implementation=None, inputs=None, outputs=None, version=None, parameter_class_modules=None, web_doc=True, environment_presets=None, _hash_value=None)#

Bases: TaskSchema

Class to represent the inputs, outputs and implementation mechanism of a given task.

Parameters:
  • objective (TaskObjective | str) – This is a string representing the objective of the task schema.

  • actions (List[Action]) – A list of Action objects whose commands are to be executed by the task.

  • method (str | None) – An optional string to label the task schema by its method.

  • implementation (str | None) – An optional string to label the task schema by its implementation.

  • inputs (List[Parameter | SchemaInput] | None) – A list of SchemaInput objects that define the inputs to the task.

  • outputs (List[Parameter | SchemaOutput] | None) – A list of SchemaOutput objects that define the outputs of the task.

  • web_doc (bool | None) – True if this object should be included in the Sphinx documentation (in the case of built-in task schemas). True by default.

  • version (str | None) –

  • parameter_class_modules (List[str] | None) –

  • environment_presets (Dict[str, Dict[str, Dict[str, Any]]] | None) –

  • _hash_value (str | None) –

Methods

from_json_like

get_by_key

Get a config-loaded task schema from a key.

get_info_html

get_key

get_parameter_dependence

Find if/where a given parameter is used by the schema's actions.

ignore_invalid_actions

make_persistent

to_dict

to_json_like

Attributes

app

basic_info

Show inputs and outputs, formatted in a table.

info

Show inputs, outputs, and actions, formatted in a table.

input_types

multi_input_types

Get a list of input types that have multiple labels.

name

output_types

provides_parameters

task_template

app = App(name='MatFlow', version='0.3.0a129')#
property basic_info#

Show inputs and outputs, formatted in a table.

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

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

classmethod get_by_key(key)#

Get a config-loaded task schema from a key.

get_info_html()#
Return type:

str

get_key()#
get_parameter_dependence(parameter)#

Find if/where a given parameter is used by the schema’s actions.

Parameters:

parameter (SchemaParameter) –

classmethod ignore_invalid_actions()#
property info#

Show inputs, outputs, and actions, formatted in a table.

property input_types#
make_persistent(workflow, source)#
Parameters:
Return type:

List[int]

property multi_input_types: List[str]#

Get a list of input types that have multiple labels.

property name#
property output_types#
property provides_parameters: Tuple[Tuple[str, str]]#
property task_template#
to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#