alab_management.builders.samplebuilder module#
Build the sample object.
- class SampleBuilder(name, experiment, tags=None, **metadata)[source]#
Bases:
object
Build a sample.
Each sample has a name, tags, and metadata. Each sample also has a list of tasks which are binded to it. Each sample is a node in a directed graph of tasks. Each task has a list of samples which are binded to it. Each sample also has a list of tags and metadata. The tags and metadata are used to filter the samples and tasks. The tags and metadata are also used to group the samples and tasks.
- add_task(task_id)[source]#
Add a task to the sample. You should use this function only for special cases which are not handled by the add_sample function.
- Parameters:
task_id (str) – The object id of the task in mongodb
- Return type:
None
- Returns:
None.
- property tasks#
Return the tasks binded to this sample.