idmtools.registry.task_specification module

TaskSpecification provided definition for the experiment plugin specification, hooks, and plugin manager.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools.registry.task_specification.TaskSpecification[source]

Bases: PluginSpecification, ABC

TaskSpecification is spec for Task plugins.

classmethod get_name(strip_all: bool = True) str[source]

Get name of plugin. By default we remove the PlatformSpecification portion.

Parameters:
  • strip_all – When true, TaskSpecification and TaskSpec is stripped from name. When false only

  • Stripped (Specification and Spec is) –

Returns:

Name of plugin

get(configuration: dict) ITask[source]

Return a new model using the passed in configuration.

Parameters:

configuration – The INI configuration file to use.

Returns:

The new model.

get_type() Type[ITask][source]

Get task type.

Returns:

Task type

class idmtools.registry.task_specification.TaskPlugins(strip_all: bool = True)[source]

Bases: SingletonMixin

TaskPlugins acts as a registry for Task Plugins.

__init__(strip_all: bool = True) None[source]

Initialize the Task Registry. When strip all is false, the full plugin name will be used for names in map.

Parameters:

strip_all – Whether to strip common parts of name from plugins in plugin map

get_plugins() Set[TaskSpecification][source]

Get plugins for Tasks.

Returns:

Plugins

get_plugin_map() Dict[str, TaskSpecification][source]

Get a map of task plugins.

Returns:

Task plugin map