From 4d0c1095594235698509796ecd7d7e71c186d52f Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Wed, 31 May 2017 18:54:50 -0700 Subject: [PATCH 1/3] API changes --- dockereve-master/eve-app/settings.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/dockereve-master/eve-app/settings.py b/dockereve-master/eve-app/settings.py index d738b79..73dfd65 100644 --- a/dockereve-master/eve-app/settings.py +++ b/dockereve-master/eve-app/settings.py @@ -14,6 +14,7 @@ 'type': 'string', 'required': True }, + 'session_id': {'type': 'string'}, 'run_id': {'type': 'string'}, 'acq_id': {'type': 'string'}, 'task_id': {'type': 'string'}, @@ -556,17 +557,15 @@ 'MONGO_DBNAME': 'scenarios', 'PUBLIC_METHODS': ['GET'], 'PUBLIC_ITEM_METHODS': ['GET'], + 'RESOURCE_METHODS': ['GET', 'POST'], + 'ITEM_METHODS': ['GET'], 'X_DOMAINS': '*', 'DOMAIN': { 'bold': { 'item_title': 'bold', - 'resource_methods': ['GET', 'POST'], - 'item_methods': ['GET', 'PATCH', 'PUT', 'DELETE'], }, # end of bold 'T1w': { 'item_title': 'T1w', - 'resource_methods': ['GET', 'POST'], - 'item_methods': ['GET', 'PATCH', 'PUT', 'DELETE'], } # end of T1w } @@ -612,3 +611,19 @@ } } ) + +my_settings['DOMAIN']['T2w']['schema'] = deepcopy(t1w_iqms_schema) +my_settings['DOMAIN']['T2w']['schema'].update( + { + 'bids_meta': { + 'type': 'dict', + 'required': True, + 'schema': deepcopy(bids_schema) + }, + 'provenance': { + 'type': 'dict', + 'required': True, + 'schema': deepcopy(prov_schema) + } + } +) From 2bcd3b3fbc3d343ec43e66edbfbb349d43b58c4f Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Wed, 31 May 2017 18:59:05 -0700 Subject: [PATCH 2/3] add T2 --- dockereve-master/eve-app/settings.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dockereve-master/eve-app/settings.py b/dockereve-master/eve-app/settings.py index 73dfd65..6f0caf7 100644 --- a/dockereve-master/eve-app/settings.py +++ b/dockereve-master/eve-app/settings.py @@ -286,7 +286,7 @@ } -t1w_iqms_schema = { +struct_iqms_schema = { 'cjv': { 'type': 'float', 'required': True @@ -302,7 +302,6 @@ 'fber': { 'type': 'float', 'required': True - }, 'fwhm_avg': { 'type': 'float', @@ -563,10 +562,13 @@ 'DOMAIN': { 'bold': { 'item_title': 'bold', - }, # end of bold + }, 'T1w': { 'item_title': 'T1w', - } # end of T1w + }, + 'T2w': { + 'item_title': 'T2w', + } } } @@ -596,7 +598,7 @@ }) -my_settings['DOMAIN']['T1w']['schema'] = deepcopy(t1w_iqms_schema) +my_settings['DOMAIN']['T1w']['schema'] = deepcopy(struct_iqms_schema) my_settings['DOMAIN']['T1w']['schema'].update( { 'bids_meta': { @@ -612,7 +614,7 @@ } ) -my_settings['DOMAIN']['T2w']['schema'] = deepcopy(t1w_iqms_schema) +my_settings['DOMAIN']['T2w']['schema'] = deepcopy(struct_iqms_schema) my_settings['DOMAIN']['T2w']['schema'].update( { 'bids_meta': { From 7d7f177ac9b6810af67e2930595a595251d610aa Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Wed, 31 May 2017 19:22:12 -0700 Subject: [PATCH 3/3] one line solution --- dockereve-master/eve-app/settings.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/dockereve-master/eve-app/settings.py b/dockereve-master/eve-app/settings.py index 6f0caf7..46fa621 100644 --- a/dockereve-master/eve-app/settings.py +++ b/dockereve-master/eve-app/settings.py @@ -614,18 +614,5 @@ } ) -my_settings['DOMAIN']['T2w']['schema'] = deepcopy(struct_iqms_schema) -my_settings['DOMAIN']['T2w']['schema'].update( - { - 'bids_meta': { - 'type': 'dict', - 'required': True, - 'schema': deepcopy(bids_schema) - }, - 'provenance': { - 'type': 'dict', - 'required': True, - 'schema': deepcopy(prov_schema) - } - } -) +my_settings['DOMAIN']['T2w']['schema'] = deepcopy(my_settings['DOMAIN']['T1w']['schema']) +