taucmdr.model.project module¶
Project data model.
A project collects multiple Target, Application, and Measurement
configurations in a single container.  Selecting one of each forms a new Experiment.
Each application of the Experiment generates a new Trial record along with
some performance data (profiles, traces, etc.).
- 
class taucmdr.model.project.Project(record)[source]¶
- Bases: - taucmdr.mvc.model.Model- Project data controller. - 
associations= {'applications': (<class 'taucmdr.model.application.Application'>, 'projects'), 'experiments': (<class 'taucmdr.model.experiment.Experiment'>, 'project'), 'measurements': (<class 'taucmdr.model.measurement.Measurement'>, 'projects'), 'targets': (<class 'taucmdr.model.target.Target'>, 'projects')}¶
 - 
attributes= {'applications': {'collection': <class 'taucmdr.model.application.Application'>, 'description': 'applications used by this project', 'via': 'projects'}, 'experiment': {'description': 'the current experiment', 'model': <class 'taucmdr.model.experiment.Experiment'>}, 'experiments': {'collection': <class 'taucmdr.model.experiment.Experiment'>, 'description': 'experiments formed from this project', 'via': 'project'}, 'init_options': {'description': 'options passed to initialize command', 'type': 'string'}, 'measurements': {'collection': <class 'taucmdr.model.measurement.Measurement'>, 'description': 'measurements used by this project', 'via': 'projects'}, 'name': {'description': 'project name', 'primary_key': True, 'type': 'string', 'unique': True}, 'targets': {'collection': <class 'taucmdr.model.target.Target'>, 'description': 'targets used by this project', 'via': 'projects'}}¶
 - 
classmethod controller(storage=<taucmdr.cf.storage.storage_dispatch.ProjectStorageDispatch object>)[source]¶
 - 
experiment()[source]¶
- Gets the currently selected experiment configuration. - Returns: - The current experiment - Return type: - Experiment - Raises: - ExperimentSelectionError– No experiment currently selected.
 - 
key_attribute= 'name'¶
 - 
name= 'Project'¶
 - 
prefix¶
 - 
references= {(<class 'taucmdr.model.experiment.Experiment'>, 'project')}¶
 
- 
- 
class taucmdr.model.project.ProjectController(model_cls, storage, context=None)[source]¶
- Bases: - taucmdr.mvc.controller.Controller- Project data controller. - 
create(data)[source]¶
- Atomically store a new record and update associations. - Invokes the on_create callback after the data is recorded. If this callback raises an exception then the operation is reverted. - Parameters: - data (dict) – Data to record. - Returns: - The newly created data. - Return type: - Model 
 - 
delete(keys)[source]¶
- Delete recorded data and update associations. - The behavior depends on the type of keys:
- Record.ElementIdentifier: delete the record with that element identifier.
- dict: delete all records with attributes matching keys.
- list or tuple: delete all records matching the elements of keys.
- bool(keys) == False: raise ValueError.
 
 - Invokes the on_delete callback after the data is deleted. If this callback raises an exception then the operation is reverted. - Parameters: - keys (dict) – Attributes to match.
- keys – Fields or element identifiers to match.
 
 
- 
