fosKeyMan
Loading...
Searching...
No Matches
databasetable.py
Go to the documentation of this file.
1
2
"""
3
Script to typeset the database columns as markdown table (used in README).
4
5
\author Bertram Richter
6
\date 2024-08-07
7
"""
8
9
import
brplotviz
10
11
database_table = [
12
[
"Column Name"
,
"Data Type"
,
"Description"
],
13
[
"serial_number"
,
"str"
,
"Serial number of the senosr, used as primary key in the database"
],
14
[
"name"
,
"str"
,
"Human readable name of the DFOS"
],
15
[
"project"
,
"str"
,
"Project in which the DFOS is used"
],
16
[
"operator"
,
"str"
,
"Person responsible for the DFOS"
],
17
[
"specimen"
,
"str"
,
"Name of the specimen which the DFOS is attached to"
],
18
[
"dfos_type"
,
"str"
,
"Type of the cable itself (coating material, diameter, etc)"
],
19
[
"installation"
,
"str"
,
"How the DFOS is installed at/in the specimen"
],
20
[
"status"
,
"str"
,
"State of the sensor (intact, defect, disposed, ...)"
],
21
[
"notes"
,
"str"
,
"Verbose description of the sensor and its use"
],
22
[
"keyfile"
,
"binary"
,
"The ODiSI key file as attachment"
],
23
[
"..."
,
"..."
,
"Optionally more data (to be continued)"
],
24
]
25
26
key_state_table = [
27
[
"Activation"
,
"Serial number in data base"
,
"File attached"
,
"Activation"
,
"Optional actions"
],
28
[
"activated"
,
"no"
,
"no"
,
"deactivate (move file)"
,
"import (add key serial number and metadata and attach file)"
],
29
[
"deactivated"
,
"no"
,
"no"
,
"activate (move file)"
,
"import (add key serial number and metadata and attach file)"
],
30
31
[
"activated"
,
"yes"
,
"no"
,
"deactivate (move file)"
,
"attach file"
],
32
[
"deactivated"
,
"yes"
,
"no"
,
"activate (move file)"
,
"attach file"
],
33
34
[
"activated"
,
"yes"
,
"yes"
,
"deactivate (move file)"
,
"check file for identity: replace in database or on disk"
],
35
[
"deactivated"
,
"yes"
,
"yes"
,
"activate (move file)"
,
"check file for identity: replace in database or on disk"
],
36
37
[
"unknown"
,
"yes"
,
"no"
,
"file is missing!"
,
"warn"
],
38
[
"unknown"
,
"yes"
,
"yes"
,
"activate (copy key file to disk)"
],
39
]
40
41
brplotviz.table.print_table(database_table, style=
"markdown"
, style_kwargs={
"pad_left"
:
" "
,
"pad_right"
:
" "
})
42
print()
43
brplotviz.table.print_table(key_state_table, style=
"markdown"
, style_kwargs={
"pad_left"
:
" "
,
"pad_right"
:
" "
})
doc
databasetable.py
Generated by
1.13.2