session_with_datetime.py
activate(schema_name, create_schema=True, create_tables=True, linking_module=None)
¶
Activate this schema.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
schema_name |
str
|
schema name on the database server |
required |
create_schema |
bool
|
when True (default), create schema in the database if it does not yet exist. |
True
|
create_tables |
str
|
when True (default), create schema tables in the database if they do not yet exist. |
True
|
linking_module |
str
|
a module (or name) containing the required dependencies. |
None
|
Dependencies:
Upstream tables:
Subject: the subject with which an experimental session is associated
Project: the project with which experimental sessions are associated
Experimenter: the experimenter(s) participating in a given session
To supply from element-lab add Experimenter = lab.User
to your workflow/pipeline.py
before session.activate()
Source code in element_session/session_with_datetime.py
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 |
|
Session
¶
Bases: Manual
Central Session table
Attributes:
Name | Type | Description |
---|---|---|
Subject |
foreign key
|
Key for Subject table |
session_datetime |
datetime
|
date and time of the session |
Source code in element_session/session_with_datetime.py
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 78 79 80 81 |
|
Attribute
¶
Bases: Part
Additional feature of interest for a session.
Attributes:
Name | Type | Description |
---|---|---|
Session |
foreign key
|
Key for Session table |
attribute_name |
varchar(32)
|
Name shared across instances of attribute |
attribute_value |
varchar(2000), optional
|
Attribute value |
attribute_blob |
longblob
|
Optional data store field |
Source code in element_session/session_with_datetime.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
SessionDirectory
¶
Bases: Manual
Relative path information for files related to a given session.
Attributes:
Name | Type | Description |
---|---|---|
Session |
foreign key
|
Key for Session table |
session_dir |
varchar(256)
|
Path to the data directory for a session |
Source code in element_session/session_with_datetime.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
SessionExperimenter
¶
Bases: Manual
Individual(s) conducting the session
Attributes:
Name | Type | Description |
---|---|---|
Session |
foreign key
|
Key for Session table |
Experimenter |
foreign key
|
Key for Experimenter table |
Source code in element_session/session_with_datetime.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
SessionNote
¶
Bases: Manual
Additional notes related to a given session
Attributes:
Name | Type | Description |
---|---|---|
Session |
foreign key
|
Key for Session table |
session_note |
varchar(1024)
|
Additional notes |
Source code in element_session/session_with_datetime.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
ProjectSession
¶
Bases: Manual
Table linking upstream Projects with Session
Attributes:
Name | Type | Description |
---|---|---|
Project |
foreign key
|
Key for Project table |
Session |
foreign key
|
Key for Session table |
Source code in element_session/session_with_datetime.py
132 133 134 135 136 137 138 139 140 141 142 143 144 |
|