adaptivemd.TaskGenerator

class adaptivemd.TaskGenerator[source]

A generator helper for Task object creation

This is an important group and is supposed to make it easy for you to create Task object. In a real situation a user should not be faced with the Task details, or at least the programming of a generator is a separate problem. Once you have the generators use them in your adaptive scripts.

Examples

Variables:
  • initial_staging (list of dict or str or Action) – a list of actions to be run once before this generator can be used
  • items (dict of File) – a dictionary of File by name to simplify access to certain files
__init__()[source]

Methods

__init__()
args() Return a list of args of the __init__ function of a class
base() Return the most parent class actually derived from StorableMixin
descendants() Return a list of all subclassed objects
from_dict(dct)
get_uuid() Create a new unique ID
idx(store) Return the index which is used for the object in the given store.
items()
named(name) Attach a .name property to an object
objects() Returns a dictionary of all storable objects
stage(obj[, target]) Short cut to add a file to be staged
to_dict()

Attributes

ACTIVE_LONG
CREATION_COUNT
INSTANCE_UUID
base_cls Return the base class
base_cls_name Return the name of the base class
cls Return the class name as a string
files
stage_in Return a list of actions needed before tasks can be generated
stage_in

Return a list of actions needed before tasks can be generated

Returns:the list of Actions to be parsed into stage in steps
Return type:list of Action
stage(obj, target=None)[source]

Short cut to add a file to be staged

Parameters:
  • obj (File) – the file to be staged in the initial staging phase
  • target (Location or str) – the (different) target name to be used