-
Notifications
You must be signed in to change notification settings - Fork 6
/
schema.json
378 lines (378 loc) · 16.2 KB
/
schema.json
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
{
"meta": {
"context": {
"context": {
"type": "object",
"properties": {
"schema": {
"description": "The psych-DS schema",
"type": "object"
},
"dataset": {
"description": "Properties and contents of the entire dataset",
"type": "object",
"properties": {
"dataset_description": {
"description": "Contents of /dataset_description.json",
"type": "object"
},
"files": {
"description": "List of all files in dataset",
"type": "array"
},
"tree": {
"description": "Tree view of all files in dataset",
"type": "object"
},
"ignored": {
"description": "Set of ignored files",
"type": "array"
}
}
},
"path": {
"description": "Path of the current file",
"type": "string"
},
"suffix": {
"description": "Suffix of current file",
"type": "string"
},
"extension": {
"description": "Extension of current file including initial dot",
"type": "string"
},
"sidecar": {
"description": "Sidecar metadata constructed via the inheritance principle",
"type": "object"
},
"columns": {
"description": "TSV columns, indexed by column header, values are arrays with column contents",
"type": "object",
"additionalProperties": {
"type": "array"
}
},
"json": {
"description": "Contents of the current JSON file",
"type": "object"
},
"keywords": {
"description": "List of key-value pairings associated with the data file, derived from the filename",
"type": "array",
"properties": {
"study": {
"name": "Study",
"description": "Label designating a given study",
"type": "string"
},
"site": {
"name": "Site",
"description": "Label designating the site where the data was collected",
"type": "string"
},
"subject": {
"name": "Subject",
"description": "Label designating the subject corresponding to the data in the file",
"type": "string"
},
"session": {
"name": "Session",
"description": "Label designating a given session of the study",
"type": "string"
},
"task": {
"name": "Task",
"description": "Label designating the type of task in which the data was collected",
"type": "string"
},
"condition": {
"name": "Condition",
"description": "Label designating the condition under which the data was collected",
"type": "string"
},
"trial": {
"name": "Trial",
"description": "Label designating the trial associated with the data",
"type": "string"
},
"stimulus": {
"name": "Stimulus",
"description": "Label designating the stimulus item associated with the data",
"type": "string"
},
"description": {
"name": "Description",
"description": "Label describing the data file in question",
"type": "string"
}
}
}
}
}
}
},
"objects": {
"common_principles": {
"dataset": {
"name": "Dataset",
"display_name": "Dataset",
"description": "A set of behavioral data acquired for the purpose of a particular study or set of studies.\n"
},
"extension": {
"name": "File extension",
"display_name": "File extension",
"description": "A portion of the file name after the left-most period (`.`) preceded by any other alphanumeric.\nFor example, `.gitignore` does not have a file extension,\nbut the file extension of 'study-1_data.csv' is '.csv'.\nNote that the left-most period is included in the file extension.\n"
},
"keywords": {
"name": "Keywords",
"display_name": "Keywords",
"description": "A set of identifying key-value duples associated with a given data file.\nKeys are limited to a vocabulary of:\n - study\n - site\n - subject\n - session\n - task\n - condition\n - trial\n - stimulus\n - description\n"
}
},
"metadata": {
"name": {
"name": "name",
"display_name": "Name",
"description": "Name of the dataset.\n",
"type": "string"
},
"schemaVersion": {
"name": "schemaVersion",
"display_name": "Schema Version",
"description": "The version of the data specification that this dataset conforms to.\n",
"type": "string"
},
"description": {
"name": "description",
"display_name": "Description",
"description": "Detailed description of the dataset.\n",
"type": "string"
},
"variableMeasured": {
"name": "variableMeasured",
"display_name": "Variable Measured",
"description": "List of the column names that appear in the data files.\n",
"type": "array"
},
"author": {
"name": "author",
"display_name": "Author",
"description": "List of individuals who contributed to the creation/curation of the dataset.\n",
"type": "array",
"items": {
"type": "string"
}
},
"citation": {
"name": "citation",
"display_name": "Citation",
"description": "Citation data for referencing the dataset, or URL/path for structured citation file.\n",
"type": "string"
},
"license": {
"name": "license",
"display_name": "Kucebse",
"description": "Author-assigned 'license' for data/material use. While this can be a string of text, \na URL pointing to a specific license file (online or in the project directory) is preferred.\n",
"type": "string"
},
"funder": {
"name": "funder",
"display_name": "Funder",
"description": "List of sources of funding (grant numbers).\n",
"type": "string"
},
"url": {
"name": "url",
"display_name": "URL",
"description": "Canonical source for the dataset.\n",
"type": "string"
},
"identifier": {
"name": "identifier",
"display_name": "Identifier",
"description": "Identifier that uniquely distinguishes the dataset.\n",
"type": "string"
},
"privacyPolicy": {
"name": "privacyPolicy",
"display_name": "Privacy Policy",
"description": "A string to indicate whether any of the values in the dataset are desired to be shareable.\nThis does not guarantee that the dataset HAS been shared or HAS been de identified,.\n",
"type": "string"
},
"keywords": {
"name": "keywords",
"display_name": "Keywords",
"description": "Keywords with which to tag the dataset for reference.\n",
"type": "array"
}
},
"extensions": {
"json": {
"value": ".json",
"display_name": "JavaScript Object Notation",
"description": "A JSON file.\n\nTop-level and collated metadata files are all stored in the JSON format in psych-DS.\n"
},
"csv": {
"value": ".csv",
"display_name": "Comma-Separated Values",
"description": "A CSV file with a header row of column names spanning all filled columns."
}
},
"files": {
"CHANGES": {
"display_name": "Changelog",
"file_type": "regular",
"description": "Version history of the dataset (describing changes, updates and corrections) MAY be provided in\nthe form of a `CHANGES` text file. (.txt or .md).\n"
},
"README": {
"display_name": "README",
"file_type": "regular",
"description": "File describing the dataset in detail. This is an OPTIONAL file, and only one README file should appear in dataset.\n"
},
"dataset_description": {
"display_name": "Dataset Description",
"file_type": "regular",
"description": "The metadata file `dataset_description.json` is a JSON file describing the dataset.\n"
},
"analysis": {
"display_name": "Analysis",
"file_type": "directory",
"description": "A directory in which to store any code used to analyze the data in /data.\n"
},
"results": {
"display_name": "Results",
"file_type": "directory",
"description": "A directory in which to store any results generated using the data in /data.\n"
},
"materials": {
"display_name": "Materials",
"file_type": "directory",
"description": "A directory in which to store any materials used to conduct the study.\n"
},
"documentation": {
"display_name": "Documentation",
"file_type": "directory",
"description": "A directory in which to store any project-related documentation that is used for conducting the study (e.g. consent forms)\n"
},
"products": {
"display_name": "Products",
"file_type": "directory",
"description": "A directory in which to store any Any relevant products resulting from the project \n(e.g., publications, posters, software descriptions, presentations, etc.) "
}
}
},
"rules": {
"files": {
"tabular_data": {
"data": {
"Datafile": {
"selectors": [
"extension == \".csv\"",
"path.endswith(\"_data.csv\")"
],
"additional_columns": "allowed_if_defined"
}
}
},
"common": {
"core": {
"dataset_description": {
"level": "required",
"path": "dataset_description.json"
},
"README": {
"level": "optional",
"stem": "README",
"extensions": [
".md",
".txt"
]
},
"CHANGES": {
"level": "optional",
"path": "CHANGES"
},
"analysis": {
"level": "optional",
"path": "analysis"
},
"results": {
"level": "optional",
"path": "results"
},
"materials": {
"level": "optional",
"path": "materials"
},
"documentation": {
"level": "optional",
"path": "documentation"
}
}
}
},
"dataset_metadata": {
"dataset_description": {
"selectors": [
"path == \"/dataset_description.json\""
],
"fields": {
"name": "required",
"schemaVersion": "required",
"description": "required",
"variableMeasured": "required",
"author": "recommended",
"citation": "recommended",
"license": "recommended",
"funder": "recommended",
"url": "recommended",
"identifier": "recommended",
"privacyPolicy": "recommended",
"keywords": "recommended"
}
}
},
"errors": {
"JsonInvalid": {
"code": "JSON_INVALID",
"message": "Not a valid JSON file.\n",
"level": "error",
"selectors": [
"extension == \".json\""
]
},
"FileRead": {
"code": "FILE_READ",
"message": "We were unable to read this file.\nMake sure it contains data (file size > 0 kB) and is not corrupted,\nincorrectly named, or incorrectly symlinked.\n",
"level": "error"
},
"JsonSchemaValidationError": {
"code": "JSON_SCHEMA_VALIDATION_ERROR",
"message": "Invalid JSON file. The file is not formatted according the schema.\n",
"level": "error",
"selectors": [
"extension == \".json\""
]
},
"EmptyFile": {
"code": "EMPTY_FILE",
"message": "Empty files not allowed.\n",
"level": "error"
},
"InvalidJsonEncoding": {
"code": "INVALID_JSON_ENCODING",
"message": "JSON files must be valid utf-8.\n",
"level": "error",
"selectors": [
"extension == \".json\""
]
}
},
"common_principles": [
"dataset",
"extension",
"keywords"
]
}
}