avid.actions.matchpoint.mapR.mapRBatchAction

class avid.actions.matchpoint.mapR.mapRBatchAction(inputSelector, registrationSelector=None, templateSelector=None, regLinker=None, templateLinker=None, actionTag='mapR', session=None, additionalActionProps=None, scheduler=<avid.actions.simpleScheduler.SimpleScheduler object>, templateRegLinker=None, **singleActionParameters)

Bases: BatchActionBase

Standard batch action class for mapR actions.

__init__(inputSelector, registrationSelector=None, templateSelector=None, regLinker=None, templateLinker=None, actionTag='mapR', session=None, additionalActionProps=None, scheduler=<avid.actions.simpleScheduler.SimpleScheduler object>, templateRegLinker=None, **singleActionParameters)

@param inputSelector Selector for the artefacts that should be mapped. @param registrationSelector Selector for the artefacts that specify the registration. If no registrations are specified, an identity transform will be assumed. @param templateSelector Selector for the reference geometry that should be used to map into it. If None is specified, the geometry of the input will be used. @param regLinker Linker to select the registration that should be used on an input. Default is FractionLinker. @param templateLinker Linker to select the reference geometry that should be used to map an input. Default is CaseLinker. @param templateRegLinker Linker to select which regs (resulting from the regLinker should be used regarding the template that will be used. Default is LinkerBase (so every link registration will be used with every linked template.

Methods

__init__(inputSelector[, ...])

@param inputSelector Selector for the artefacts that should be mapped.

do()

Triggers the processing of an action instance.

do_finalize()

Function that has to be called after the data processing of an action processing to finalize the action state and do the bookkeeping (e.g. notifying the session, checking the validity and existence of the outputs).

do_processing()

Function that has to be called to do the data processing of an action processing.

do_setup()

Function that has to be called to prepare an action for the processing.

generateActions()

Function that (pre)generates the actions of the batch action.

getFailedActions()

Returns all actions of the session that have failed.

getSkippedActions()

Returns all actions of the session that have been skipped.

getSuccessfulActions([no_warnings])

Returns all actions of the session that have been successful.

getSuccessfulActionsWithWarnings()

Returns all actions of the session that have been successful but with warnings.

indicateOutputs()

Return a list of artefact entries the action will produce if do_setup() is called.

Attributes

ACTION_FAILURE

Indicating the skipping of the (last) execution of an action.

ACTION_PENDING

Indicating that the action instance is currently generating the outputs.

ACTION_RUNNING

Indicating that the action instance is in an uninitialized state.

ACTION_SKIPPED

Indicating that the action instance was not executed so far.

ACTION_SUCCESS

Indicating the failure of the (last) execution of an action instance.

ACTION_UNINIT

PRIMARY_INPUT_KEY

actionInstanceUID

actionTag

action_tag_selector

has_warnings

instanceName

isFailure

isPending

isRunning

isSkipped

isSuccess

is_uninitialized

last_exec_state

last_warnings

number_of_actions

Returns the number of actions in the batch.

outputArtefacts

ACTION_FAILURE = 'FAILURE'

Indicating the skipping of the (last) execution of an action. As any outputs the action instance would produce are available and still up to date.

ACTION_PENDING = 'PENDING'

Indicating that the action instance is currently generating the outputs.

ACTION_RUNNING = 'RUNNING'

Indicating that the action instance is in an uninitialized state.

ACTION_SKIPPED = 'SKIPPED'

Indicating that the action instance was not executed so far.

ACTION_SUCCESS = 'SUCCESS'

Indicating the failure of the (last) execution of an action instance.

do()

Triggers the processing of an action instance. This should be used as public trigger of an action. It is a convenient version that will trigger do_setup, do_process and do_finalize in the right way. Returns the action instance itself.

do_finalize()

Function that has to be called after the data processing of an action processing to finalize the action state and do the bookkeeping (e.g. notifying the session, checking the validity and existence of the outputs). After the call of the method the outputs of action instance are collected and verified. It is advised to use do(), which will use do_finalize() appropriately.

do_processing()

Function that has to be called to do the data processing of an action processing. After the call of the method the outputs of action instance are computed. It is advised to use do(), which will use do_processing() appropriately.

do_setup()

Function that has to be called to prepare an action for the processing. After the call of the method the action instance is able to process the data (if needed). The return value indicates of the instance can/needs to process (true) or not (false). It is advised to use do(), which will use do_setup() appropriately. After the call of this method, the instance will have one of the following states: (1) pending: expected state. Indicating that action should/needs to process and no waiting for triggering do_process() (2) skipped: indicated ouput data is already there and valid. No need for do_process, directly trigger do_finalize() (3) failed: indicated that the setup failed (e.g. because inputs are invalid). No need for do_process, directly trigger do_finalize()

generateActions()

Function that (pre)generates the actions of the batch action. If actions are already generated, nothing will happen.

getFailedActions()

Returns all actions of the session that have failed.

getSkippedActions()

Returns all actions of the session that have been skipped.

getSuccessfulActions(no_warnings=False)

Returns all actions of the session that have been successful.

getSuccessfulActionsWithWarnings()

Returns all actions of the session that have been successful but with warnings.

indicateOutputs()

Return a list of artefact entries the action will produce if do_setup() is called. The method should return complete entries. Therefore, the entries should already contain the url where they will be stored if the action is executed. Remark: The output indication might not represent the final result of an action (e.g. because an action is not able to determine the outputs before they are actually generated.). This the list might only indicate the assumed outputs. Also An action can return None to signal that it cannot indicate the outputs before generation. :return: Either a list of indicated outputs or None.

property number_of_actions

Returns the number of actions in the batch.