-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_template.toml
173 lines (167 loc) · 8.38 KB
/
config_template.toml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Configuration parameters for Beaverdam
#
# To use this as a template:
# - For all sections: replace each value with the appropriate value for your project
# - Section [raw_metadata]: specify the location and type of (meta)data files
# - Section [database]: specify the location and type of database to use
# - Section [fields]: choose names for each (meta)data field and surround these names
# in quotes "" in subsequent sections
# - Section [filters]: define which fields to show as checkbox filters
# - Section [table]: define which fields to show in the data table
# - Section [plots]: define which fields to show in each plot, and the plot types
[raw_metadata]
# Information about the location and type of (meta)data files to include in the
# database. Only needed to build a database, not to run a user interface with an
# existing database.
#
# directory (str): directory containing (meta)data files. Files in subdirectories will
# also be included.
# file_type (str): extension of files to include. Currently this can be ".json",
# ".odml", ".csv", ".tsv", or ".dsv".
directory = "path/to/files"
file_type = ".json"
[database]
# Information about the database containing (meta)data. This is the database which will
# be created, updated, or read from.
#
# Use **ONE** of the following database types, which have different required
# information.
# Ensure there *isn't* a # character preceding a line with required information.
# Ensure there *is* a # character preceding a line with information that's not needed.
#
# Note that if you don't specify the "type" key (as in the first release of Beaverdam),
# Beaverdam will attempt to use TinyDB.
#
# 1. TinyDB
# - best for fewer or smaller (meta)data files; may be slow for large numbers of
# files or large amounts of (meta)data per file
# - only allows local use, unless you can access the database file remotely
# - doesn't require any extra dependencies
#
# Required information:
# type (str): "tinydb"
# location (str): path to the json file containing the database (will be created
# if it doesn't exist)
#
type = "tinydb"
location = "name_of_database.json"
#
# 2. MongoDB
# - best for many or larger (meta)data files
# - allows local or remote use
# - requires MongoDB to be installed separately
#
# Required information:
# type (str): "mongodb"
# address (str): use "localhost" to run Beaverdam locally
# port (int): most likely you will use 27017 to run Beaverdam locally
# db_name (str): name of the database to use (will be created if it doesn't
# exist)
# collection_name (str): name of the collection to use (will be created if it
# doesn't exist). This is needed because MongoDB stores documents in
# collections within databases.
#
# type = "mongodb"
# address = "localhost"
# port = 27017
# db_name = "database_name"
# collection_name = "collection_name"
[fields]
# The name you want to use to refer to each (meta)data field, and the location of the
# field in the database.
#
# Include as many fields as you want, each on a new line with the format:
# NameOfField = "path.to.field"
#
# NameOfField (): text that will also show up in the dashboard, e.g. as column names.
# Therefore it should be somewhat self-explanatory. Cannot include spaces.
# "path.to.field" (str): location of the (meta)data field in the database. This must
# be the same for each record in the database. The field doesn't have to exist in all
# records. It can include spaces, but it can't include periods.
# For nested strucures (e.g. json or odML files; not relevant for csv files), existing
# elements must have the same path in all records. Separate elements of nested paths
# (for example, in json or odML files) using periods. Each element of the path can
# include spaces, but not periods because Beaverdam uses periods to split elements of
# nested paths.
# If you used csv files, this is the column name given in the first row of the file,
# for example:
# "NameOfColumn1"
# If you used csv files, you can include the record ID (formed by combining the file
# name with the row number) using the field:
# "_id"
# If you used json files, this is probably something like:
# "FirstSectionName.SubSection.SubSubSection"
# If you used odML files, note that the Document, section, and properties designations
# are included in the path, for example:
# "Document.sections.FirstSectionName.sections.SubSection.properties.PropertyName.value"
# When with metadata files having complex structures, it might be helpful to use
# additional tools to find field locations:
# - this command-line tool searches for fields in structured files and returns the
# full path to the field as an indented structure:
# https://github.com/con/utils/blob/main/bin/show-paths
# - when using MongoDB, database viewers like
# [Studio3T](https://studio3t.com/free/) or its free-forever predecessor
# [Robo3T](https://github.com/Studio3T/robomongo) make it easy to explore
# databases and find the path to a field
NameOfField = "path.to.field"
[filters]
# Which fields you will be able to place conditions on to filter items. These fields
# will each be turned into a set of checkboxes showing all available options for that
# field.
#
# headings (list of strings): fields to show as checkboxes, using the field names you
# defined in [fields] written as strings. For example, if you defined
# NameOfFirstField and NameOfSecondField in [fields], you could here say:
# headings = ["NameOfFirstField", "NameOfSecondField"]
headings = ["NameOfFirstField", "NameOfSecondField"]
[table]
# Which fields to show in the data table
#
# columns (list of strings): fields to show as columns in the data table, using the
# field names you defined in [fields] written as strings. For example, if you defined
# NameOfFirstField and NameOfSecondField in [fields], you could here say:
# columns = ["NameOfFirstField", "NameOfSecondField"]
columns = ["NameOfFirstField", "NameOfSecondField"]
[plots]
# Which fields to plot, and how to plot them. Each plot must have a unique name and the
# following keys:
# - data_field (string or list of strings): name of the field(s) to plot
# - plot_type (string): type of plot ("pie", "bar", "strip", "scatter", "box")
#
# Currently the following plot types are defined:
#
# Pie chart: plots the values of a single field. Include these two lines for each
# pie chart you want to make, with a different PlotName for each chart and
# substituting NameOfField with the field you want to plot:
# PlotName.data_field = "NameOfField"
# PlotName.plot_type = "pie"
#
# Bar chart: plots the values of a single field. Include these two lines for each
# bar chart you want to make, with a different PlotName for each chart and
# substituting NameOfField with the field you want to plot:
# PlotName.data_field = "NameOfField"
# PlotName.plot_type = "bar"
#
# Scatter plot: plots the values of two fields as points. Include these two lines
# for each scatter plot you want to make, with a different PlotName for each plot
# and substituting NameOfFieldY and NameOfFieldX with the fields you want to plot
# on the Y and X axes, respectively:
# PlotName.data_field = ["NameOfFieldY", "NameOfFieldX"]
# PlotName.plot_type = "scatter"
#
# Strip plot: plots the values of two fields as points, with horizontal jitter to
# separate overlapping points. Include these two lines for each strip plot you
# want to make, with a different PlotName for each plot and substituting
# NameOfFieldY and NameOfFieldX with the fields you want to plot on the Y and X
# axes, respectively:
# PlotName.data_field = ["NameOfFieldY", "NameOfFieldX"]
# PlotName.plot_type = "strip"
#
# Box plot: plots the values of two fields, showing median, minimum, maximum, and
# quartiles. Include these two lines for each box plot you want to make, with a
# different PlotName for each plot and substituting NameOfFieldY and NameOfFieldX
# with the fields you want to plot on the Y and X axes, respectively:
# PlotName.data_field = ["NameOfFieldY", "NameOfFieldX"]
# PlotName.plot_type = "box"
PlotName.data_field = "NameOfField"
PlotName.plot_type = "type_of_plot"