alab_management.experiment_view.experiment_view module#

A wrapper over the experiment class.

class ExperimentStatus(value)[source]#

Bases: Enum

The status of experiment.

  • PENDING: The experiment has not been processed by experiment manager

  • RUNNING: The experiment has been submitted and put in the queue

  • COMPLETED: The experiment has been completed

  • ERROR: The experiment has failed somewhere

COMPLETED = 3#
ERROR = 4#
PENDING = 1#
RUNNING = 2#
class ExperimentView[source]#

Bases: object

Experiment view manages the experiment status, which is a collection of tasks and samples.

create_experiment(experiment)[source]#

Create an experiment in the database which is intended for raw experiment inserted by users. The lab manager will add sample id and task id for the samples and tasks.

Parameters:

experiment (InputExperiment) – the required format of experiment, see also InputExperiment

Return type:

ObjectId

get_experiment(exp_id)[source]#

Get an experiment by its id.

Return type:

dict[str, Any] | None

get_experiment_by_sample_id(sample_id)[source]#

Get an experiment that contains a sample with the given sample_id.

Return type:

dict[str, Any] | None

get_experiment_by_task_id(task_id)[source]#

Get an experiment that contains a task with the given task_id.

Return type:

dict[str, Any] | None

get_experiments_with_status(status)[source]#

Filter experiments by its status.

Return type:

list[dict[str, Any]]

update_experiment_status(exp_id, status)[source]#

Update the status of an experiment.

update_sample_task_id(exp_id, sample_ids, task_ids)[source]#

At the creation of experiment, the id of samples and tasks has not been assigned.

Later, we will use this method to assign sample & task id (done by LabView)