[973924]: / qiita_db / investigation.py

Download this file

78 lines (60 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"""
Objects for dealing with Qiita studies
This module provides the implementation of the Investigation class.
Classes
-------
- `Investigation` -- A Qiita investigation class
"""
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
import qiita_db as qdb
REQUIRED_KEYS = {"name", "description", "contact_person"}
class Investigation(qdb.base.QiitaObject):
"""
Study object to access to the Qiita Study information
Attributes
----------
name: str
name of the investigation
description: str
description of what the investigation is investigating
contact_person: StudyPerson object
studies: list of Study Objects
all studies that are part of the investigation
Methods
-------
add_study
Adds a study to the investigation
"""
_table = "investigation"
@classmethod
def create(cls, owner, info, investigation=None):
"""Creates a new investigation on the database"""
raise NotImplementedError()
@classmethod
def delete(cls, id_):
"""Deletes an investigation on the database"""
raise NotImplementedError()
@property
def name(self):
raise NotImplementedError()
@name.setter
def name(self, value):
raise NotImplementedError()
@property
def description(self):
raise NotImplementedError()
@description.setter
def description(self, value):
raise NotImplementedError()
@property
def contact_person(self):
raise NotImplementedError()
@contact_person.setter
def contact_person(self, value):
raise NotImplementedError()