aiida.restapi.translator.nodes.process.workflow package#

Submodules#

Translator for workchain node

class aiida.restapi.translator.nodes.process.workflow.workchain.WorkChainTranslator(**kwargs)[source]#

Bases: aiida.restapi.translator.nodes.process.process.ProcessTranslator

Translator relative to resource ‘workchain’ and aiida class Process

class WorkChainNode(backend: Optional[StorageBackend] = None, user: Optional[aiida.orm.users.User] = None, computer: Optional[aiida.orm.computers.Computer] = None, **kwargs: Any)#

Bases: aiida.orm.nodes.process.workflow.workflow.WorkflowNode

ORM class for all nodes representing the execution of a WorkChain.

STEPPER_STATE_INFO_KEY = 'stepper_state_info'#
__abstractmethods__ = frozenset({})#
__annotations__ = {'_HASH_EXTRA_KEY': <class 'str'>, '_VALID_CACHE_KEY': <class 'str'>, '_hash_ignored_attributes': typing.Tuple[str, ...], '_incoming_cache': typing.Union[typing.List[aiida.orm.utils.links.LinkTriple], NoneType], '_logger': typing.Union[logging.Logger, NoneType], '_plugin_type_string': typing.ClassVar[str], '_query_type_string': typing.ClassVar[str], '_updatable_attributes': typing.Tuple[str, ...]}#
__module__ = 'aiida.orm.nodes.process.workflow.workchain'#
__parameters__ = ()#
_abc_impl = <_abc_data object>#
_logger: Optional[logging.Logger] = <Logger aiida.orm.nodes.process.workflow.workchain.WorkChainNode (REPORT)>#
_plugin_type_string: ClassVar[str] = 'process.workflow.workchain.WorkChainNode.'#
_query_type_string: ClassVar[str] = 'process.workflow.workchain.'#
_updatable_attributes: Tuple[str, ...] = ('sealed', 'paused', 'checkpoints', 'exception', 'exit_message', 'exit_status', 'process_label', 'process_state', 'process_status', 'stepper_state_info')#
set_stepper_state_info(stepper_state_info: str) None#

Set the stepper state info

Parameters

state – string representation of the stepper state info

property stepper_state_info: Optional[str]#

Return the stepper state info

Returns

string representation of the stepper state info

__label__ = 'workchain'#
__module__ = 'aiida.restapi.translator.nodes.process.workflow.workchain'#
_aiida_class#

alias of aiida.orm.nodes.process.workflow.workchain.WorkChainNode

_aiida_type = 'process.workflow.workchain.WorkChainNode'#
_result_type = 'workchain'#
static get_derived_properties(node)[source]#

Generic function extended for workchain. Currently it is not implemented.

Parameters

node – node object

Returns

empty dict

Translator for workfunction node

class aiida.restapi.translator.nodes.process.workflow.workfunction.WorkFunctionTranslator(**kwargs)[source]#

Bases: aiida.restapi.translator.nodes.process.process.ProcessTranslator

Translator relative to resource ‘calcfunction’ and aiida class Calculation

class WorkFunctionNode(backend: Optional[StorageBackend] = None, user: Optional[aiida.orm.users.User] = None, computer: Optional[aiida.orm.computers.Computer] = None, **kwargs: Any)#

Bases: aiida.orm.utils.mixins.FunctionCalculationMixin, aiida.orm.nodes.process.workflow.workflow.WorkflowNode

ORM class for all nodes representing the execution of a workfunction.

__abstractmethods__ = frozenset({})#
__annotations__ = {'_HASH_EXTRA_KEY': <class 'str'>, '_VALID_CACHE_KEY': <class 'str'>, '_hash_ignored_attributes': typing.Tuple[str, ...], '_incoming_cache': typing.Union[typing.List[aiida.orm.utils.links.LinkTriple], NoneType], '_logger': typing.Union[logging.Logger, NoneType], '_plugin_type_string': typing.ClassVar[str], '_query_type_string': typing.ClassVar[str], '_updatable_attributes': typing.Tuple[str, ...]}#
__module__ = 'aiida.orm.nodes.process.workflow.workfunction'#
__parameters__ = ()#
_abc_impl = <_abc_data object>#
_logger: Optional[logging.Logger] = <Logger aiida.orm.nodes.process.workflow.workfunction.WorkFunctionNode (REPORT)>#
_plugin_type_string: ClassVar[str] = 'process.workflow.workfunction.WorkFunctionNode.'#
_query_type_string: ClassVar[str] = 'process.workflow.workfunction.'#
validate_outgoing(target: Node, link_type: aiida.common.links.LinkType, link_label: str) None#

Validate adding a link of the given type from ourself to a given node.

A workfunction cannot create Data, so if we receive an outgoing RETURN link to an unstored Data node, that means the user created a Data node within our function body and is trying to return it. This use case should be reserved for @calcfunctions, as they can have CREATE links.

Parameters
  • target – the node to which the link is going

  • link_type – the link type

  • link_label – the link label

Raises
  • TypeError – if target is not a Node instance or link_type is not a LinkType enum

  • ValueError – if the proposed link is invalid

__label__ = 'workfunction'#
__module__ = 'aiida.restapi.translator.nodes.process.workflow.workfunction'#
_aiida_class#

alias of aiida.orm.nodes.process.workflow.workfunction.WorkFunctionNode

_aiida_type = 'process.workflow.workfunction.WorkFunctionNode'#
_result_type = 'workfunction'#
static get_derived_properties(node)[source]#

Generic function extended for workfunction. Currently it is not implemented.

Parameters

node – node object

Returns

empty dict