idmtools.core.task_factory module

class idmtools.core.task_factory.DynamicTaskSpecification(task_type: Type[idmtools.entities.itask.ITask], description: str = '')

Bases: idmtools.registry.task_specification.TaskSpecification

This class allows users to quickly define a spec for special tasks

get(configuration: dict)idmtools.entities.itask.ITask

Return a new model using the passed in configuration.

Parameters

configuration – The INI configuration file to use.

Returns

The new model.

get_description() → str

Get a brief description of the plugin and its functionality.

Returns

The plugin description.

get_type() → Type[idmtools.entities.itask.ITask]
class idmtools.core.task_factory.TaskFactory

Bases: object

DEFAULT_KEY = 'idmtools.entities.command_task.CommandTask'
register(spec: idmtools.registry.task_specification.TaskSpecification) → NoReturn

Register a TaskSpecification dynamically

Parameters

spec – Specification to register

Returns:

register_task(task: Type[idmtools.entities.itask.ITask]) → NoReturn

Dynamically register a class using the DynamicTaskSpecification

Parameters

task – Task to register

Returns:

create(key, fallback=None, **kwargs)idmtools.entities.itask.ITask