sierra.core.generators.generator_factory

Factory for combining controller+scenario XML modification generators.

By combining them together, the result can be easily used to apply modifications to the template XML file to scaffold the batch experiment.

sierra.core.generators.generator_factory.joint_generator_create(controller, scenario)[source]

Combine controller and scenario XML modification generators together.

sierra.core.generators.generator_factory.scenario_generator_create(exp_spec: ExperimentSpec, controller, **kwargs)[source]

Create a scenario generator using the plugin search path.

sierra.core.generators.generator_factory.controller_generator_create(controller: str, config_root: Path, cmdopts: Dict[str, Any], exp_spec: ExperimentSpec)[source]

Create a controller generator from the cmdline specification.

class sierra.core.generators.generator_factory.ControllerGenerator(controller: str, config_root: Path, cmdopts: Dict[str, Any], exp_spec: ExperimentSpec)[source]

Generate XML changes for a selected --controller.

If the specified controller is not found in controllers.yaml for the loaded Project, an assert will be triggered.

Inheritance

Inheritance diagram of ControllerGenerator
__dict__ = mappingproxy({'__module__': 'sierra.core.generators.generator_factory', '__doc__': 'Generate XML changes for a selected ``--controller``.\n\n    If the specified controller is not found in ``controllers.yaml`` for the\n    loaded :term:`Project`, an assert will be triggered.\n    ', '__init__': <function ControllerGenerator.__init__>, 'generate': <function ControllerGenerator.generate>, '_pp_for_tag_add': <function ControllerGenerator._pp_for_tag_add>, '_do_tag_add': <function ControllerGenerator._do_tag_add>, '_generate_controller_support': <function ControllerGenerator._generate_controller_support>, '_generate_controller': <function ControllerGenerator._generate_controller>, '__dict__': <attribute '__dict__' of 'ControllerGenerator' objects>, '__weakref__': <attribute '__weakref__' of 'ControllerGenerator' objects>, '__annotations__': {}})
__doc__ = 'Generate XML changes for a selected ``--controller``.\n\n    If the specified controller is not found in ``controllers.yaml`` for the\n    loaded :term:`Project`, an assert will be triggered.\n    '
__init__(controller: str, config_root: Path, cmdopts: Dict[str, Any], exp_spec: ExperimentSpec) None[source]
__module__ = 'sierra.core.generators.generator_factory'
__weakref__

list of weak references to the object (if defined)

_do_tag_add(exp_def: XMLExpDef, add: TagAdd) None[source]
_generate_controller(exp_def: XMLExpDef) None[source]
_generate_controller_support(exp_def: XMLExpDef) None[source]
_pp_for_tag_add(add: TagAdd, robot_id: Optional[int] = None) TagAdd[source]
generate(exp_def: XMLExpDef) XMLExpDef[source]

Generate all modifications to the experiment definition from the controller.

Does not save.