idmtools.registry.experiment_specification module

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

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

class idmtools.registry.experiment_specification.ExperimentPluginSpecification[source]

Bases: PluginSpecification, ABC

ExperimentPluginSpecification defines the specification for Experiment 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, ExperimentPluginSpecification and ExperimentPluginSpec is stripped from name.

  • Stripped (When false only Specification and Spec is) –

Returns:

Name of plugin

get(configuration: dict) Experiment[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[Experiment][source]

Get Experiment type.

Returns:

Experiment type.

class idmtools.registry.experiment_specification.ExperimentPlugins(strip_all: bool = True)[source]

Bases: object

ExperimentPlugins acts as registry for Experiment plugins.

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

Initialize the Experiment 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[ExperimentPluginSpecification][source]

Get plugins.

Returns:

Experiment plugins.

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

Get experiment plugin map.

Returns:

Experiment plugin map.