idmtools.registry.hook_specs module#

Define a list of function only hook specs. Useful for simple plugins.

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

idmtools.registry.hook_specs.idmtools_platform_pre_create_item(item: IEntity, kwargs) IEntity[source]#

This callback is called by the pre_create of each object type on a platform. An item can be a suite, workitem, simulation, asset collection or an experiment.

Parameters:
  • item

  • kwargs – extra args

Returns:

None

idmtools.registry.hook_specs.idmtools_platform_post_create_item(item: IEntity, kwargs) IEntity[source]#

This callback is called by the post_create of each object type on a platform. An item can be a suite, workitem, simulation, asset collection or an experiment.

Parameters:
  • item

  • kwargs – extra args

Returns:

None

idmtools.registry.hook_specs.idmtools_platform_post_run(item: IEntity, kwargs) IEntity[source]#

This is called when item finishes calling the run on the server.

Parameters:
  • item

  • kwargs – extra args

Returns:

None

idmtools.registry.hook_specs.idmtools_on_start()[source]#

Execute on startup when idmtools is first imported.

Returns:

None

idmtools.registry.hook_specs.idmtools_generate_id(item: IEntity) str[source]#

Generates an id for an IItem.

Returns:

None

idmtools.registry.hook_specs.idmtools_runnable_on_done(item: IRunnableEntity, **kwargs)[source]#

Called when a runnable item finishes when it was being monitored.

Parameters:
  • item – Item that was running

  • **kwargs

Returns:

None

idmtools.registry.hook_specs.idmtools_runnable_on_succeeded(item: IRunnableEntity, **kwargs)[source]#

Executed when a runnable item succeeds.

Parameters:
  • item – Item that was running

  • **kwargs

Returns:

None

idmtools.registry.hook_specs.idmtools_runnable_on_failure(item: IRunnableEntity, **kwargs)[source]#

Executed when a runnable item fails.

Parameters:
  • item – Item that was running

  • **kwargs

Returns:

None