Allowed values
In the root folder of the archive directory the file allowed_values.py is created. This file creates classes that generate the permitted values for specific columns in the database in order to keep them consistent and enable searchability for specific terms.
For example, uniform abbreviations should always be used for chromophores, or water as a solvent should always be referred to as “water” and not “H20”.
This file is placed in the root of the archive directory in order to make it available to all users. The file should be adapted once by the admin in the beginning to set the initial values. Later all members of the team may add allowed values to the classes (if this shall be not allowed change the os-writing permissions so that only the admin has the permission an the rest of the team can only read the file) . For example, a new chormophore is measured or a new solvent is used.
Danger
Existing values should never be deleted or changed, as this would result in inconsistencies in the database!
The syntax of a class is as follows:
class ClassName(str, Enum):
allowed_value_1 = "allowed_value_1"
allowed_value_2 = "allowed_value_2"
allowed_value_n = "allowed_value_n"
The string name is the value that can be added to the database as an attribute.
The following classes exist:
Class |
Used for |
|---|---|
Names |
|
Solvents |
|
Devices |
|
FrequencBands |
|
PulseExperiments |
|
Chromophores |
|
Doublets |
|
Linker |
|
Radicals |
|