ctl.plugins.chain
A plugin that allows you to execute other plugins in a chain
Classes
ChainActionConfig
ChainActionConfig(confu.schema.core.Schema)
Confu schema describes a plugin action
Class Attributes
- arguments (
Schema<Str>
): arguments to pass - name (
Str
): call this action on the plugin instance (method name)
ChainConfig
ChainConfig(confu.schema.core.Schema)
Confu schema describes a stage in the chain
Class Attributes
- action (
ChainActionConfig
): plugin action - plugin (
Str
): plugin instance name - stage (
Str
): user friendly name of the stage in the chain
ChainPlugin
ChainPlugin(ctl.plugins.ExecutablePlugin)
chain execute other plugins
Class Attributes
- ConfigSchema (
ConfigSchema Class
): Base plugin config schema
Instanced Attributes
These attributes / properties will be available on instances of the class
- end (
int
): end at this stage - start (
int
): start at this stage
Class Methods
add_arguments
def add_arguments(cls, parser, plugin_config, confu_cli_args)
Set CLI Arguments
overrides PluginBase.add_arguments
expose_vars
def expose_vars(cls, env, plugin_config)
Expose contents of vars
config attribute to the
submitted environment
Argument(s)
- env (
dict
) - plugin_config (
dict
)
Methods
execute
def execute(self, **kwargs)
Execute the plugin
Keyword Arguments
- start (
int
): starting stage - end (
int
): ending stage
overrides and calls ExecutablePlugin.execute
execute_chain
def execute_chain(self, chain)
Execute a plugin chain from ChainConfig dict
Arguments
- chain (
list<dict>
): list of chain configs (seeChainConfig
)
execute_stage
def execute_stage(self, stage, num=1, total=1)
Execute a stage
Arguments
- stage (
dict
): chain config (seeChainConfig
) - num (
int
): stage number in the chain - total (
int
): total stages in the chain
validate_stage
def validate_stage(self, name)
Validate stage by name, will raise a ValueError
on failure to validate
Arguments
- name (
str
)
ChainPluginConfig
ChainPluginConfig(confu.schema.core.Schema)
Confu schema for the chain plugin
Class Attributes
- arguments (
List<ArgparseSchema>
): cli parameters for the chain - chain (
List<ChainConfig>
): stages in the chain - vars (
Dict<Str>
): extra variables