Skip to content

Commit e8683b1

Browse files
committed
Update python script to mach schema changes made upstream on Repronim side
1 parent ba34a5f commit e8683b1

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

python/create_neurovault_schema.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# where the metadata from neurovault are described. It is in xlsx folder of this repos
1212
# but it can also be downloaded from here:
1313
# https://github.com/NeuroVault/NeuroVault/blob/master/scripts/metadata_neurovault.csv
14-
input_file = '/home/remi/github/COBIDAS_chckls/xlsx/metadata_neurovault-test.csv'
14+
input_file = '/home/remi/github/COBIDAS_chckls/xlsx/metadata_neurovault.csv'
1515

1616
# where the files will be written on your machine: the local repository
1717
# corresponding to the remote where of the schema-standardization will be hosted
@@ -24,7 +24,10 @@
2424
# to which branch of schema-standardization the user interface will be pointed to
2525
# In the end the cobidas-UI repository will be reading the schema from the URL that that
2626
# starts with: remote_repo + branch_name
27-
branch_name = 'neurovault-test'
27+
branch_name = 'neurovault'
28+
29+
30+
ReproNim_repo = 'https://raw.githubusercontent.com/ReproNim/schema-standardization/master/'
2831

2932

3033
## -----------------------------------------------------------------------------
@@ -53,16 +56,17 @@
5356

5457
# define the activity set neurovault_schema.jsonld
5558
nv_set_schema_json = {
56-
'@context': [ remote_repo + branch_name + '/contexts/generic.jsonld',
59+
'@context': [ ReproNim_repo + 'contexts/generic',
5760
remote_repo + branch_name + '/activity-sets/' + activity_set_folder_name + '/' + activity_set_context_filename
5861
],
59-
'@type': remote_repo + branch_name + '/schemas/ActivitySet.jsonld',
62+
'@type': ReproNim_repo + 'schemas/ActivitySet',
6063
'@id': 'cobidas_schema',
6164
'skos:prefLabel': 'neurovault as a COBIDAS POC',
6265
'skos:altLabel': 'neurovault_COBIDAS_POC',
6366
'schema:description': 'neurovault as a COBIDAS checklist proof of concept',
6467
'schema:schemaVersion': version,
6568
'schema:version': version,
69+
'schema:about': remote_repo + branch_name + '/activity-sets/' + '/README.md',
6670
'variableMap': [],
6771
'ui': {
6872
'order': [],
@@ -126,18 +130,18 @@
126130
}
127131

128132
nv_schema_json = {
129-
'@context': [ remote_repo + branch_name + '/contexts/generic.jsonld',
133+
'@context': [ ReproNim_repo + 'contexts/generic',
130134
remote_repo + branch_name + '/activities/' + activity_folder_name + '/' + activity_context_filename
131135
],
132-
'@type': remote_repo + branch_name + '/schemas/Activity.jsonld',
136+
'@type': ReproNim_repo + 'schemas/Activity',
133137
'@id': activity_schema_name,
134138
'skos:prefLabel': 'COBIDAS design checklist',
135139
'skos:altLabel': 'cobidas_design_schema',
136140
'schema:description': 'COBIDAS design checklist schema',
137141
'schema:schemaVersion': version,
138142
'schema:version': version,
139143
'variableMap': [],
140-
'preamble': 'How did you design / analyse your study?',
144+
'preamble': 'How did you design/analyse your study?',
141145
'ui': {
142146
'order': [],
143147
'visibility': {},
@@ -193,10 +197,10 @@
193197

194198
# define jsonld for this item
195199
item_json = {
196-
'@context': [ remote_repo + branch_name + '/contexts/generic.jsonld',
200+
'@context': [ ReproNim_repo + 'contexts/generic',
197201
remote_repo + branch_name + '/activities/' + activity_folder_name + '/' + activity_context_filename
198202
],
199-
'@type': remote_repo + branch_name + '/schemas/Field.jsonld',
203+
'@type': ReproNim_repo + 'schemas/Field',
200204
'@id': row[2],
201205
'skos:prefLabel': row[2],
202206
'skos:altLabel': row[2],

0 commit comments

Comments
 (0)