From a47c1ef82094ddd26a9b85e42e1a14539bba91ab Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 12 Jan 2019 14:03:18 -0500 Subject: [PATCH 1/3] enh: add s3 datagrabber example several examples here: https://github.com/kellyhennigan/cueexp_scripts/blob/25372d4f221762af6d79d1af67a8570f2c546b20/svmrfe/venv/lib64/python2.7/site-packages/nipype/interfaces/tests/test_io.py --- nipype/interfaces/io.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index e11ba47479..d1f2ecdfb3 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -829,7 +829,22 @@ class S3DataGrabber(LibraryBaseInterface, IOBase): "template" uses regex style formatting, rather than the glob-style found in the original DataGrabber. + Examples + -------- + + >>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"])) + >>> s3grab.inputs.bucket = 'openneuro' + >>> s3grab.inputs.sort_filelist = True + >>> s3grab.inputs.template = '*' + >>> s3grab.inputs.anon = True + >>> s3grab.inputs.bucket_path = 'ds000101/ds000101_R2.0.0/uncompressed/' + >>> s3grab.inputs.local_directory = '/tmp' + >>> s3grab.inputs.field_template = {'anat': '%s/anat/%s_T1w.nii.gz', 'func': '%s/func/%s_task-simon_run-1_bold.nii.gz'} + >>> s3grab.inputs.template_args = {'anat': [['subj_id', 'subj_id']], 'func': [['subj_id', 'subj_id']]} + >>> s3grab.inputs.subj_id = 'sub-01' + >>> s3grab.run() # doctest: +SKIP """ + input_spec = S3DataGrabberInputSpec output_spec = DynamicTraitedSpec _always_run = True From ea4fb4b3d954847f42041f2a67b0aaaefdaf5213 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 12 Jan 2019 14:10:36 -0500 Subject: [PATCH 2/3] fix: typo --- nipype/interfaces/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index d1f2ecdfb3..923cebdc5a 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -832,7 +832,7 @@ class S3DataGrabber(LibraryBaseInterface, IOBase): Examples -------- - >>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"])) + >>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"]) >>> s3grab.inputs.bucket = 'openneuro' >>> s3grab.inputs.sort_filelist = True >>> s3grab.inputs.template = '*' From bd1ab8a106bd0dd0905c941ac369409ac5ce717e Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 22 Jan 2019 09:44:41 -0500 Subject: [PATCH 3/3] STY: Whitespace, line length --- nipype/interfaces/io.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 923cebdc5a..6083dfb25e 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -835,16 +835,18 @@ class S3DataGrabber(LibraryBaseInterface, IOBase): >>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"]) >>> s3grab.inputs.bucket = 'openneuro' >>> s3grab.inputs.sort_filelist = True - >>> s3grab.inputs.template = '*' + >>> s3grab.inputs.template = '*' >>> s3grab.inputs.anon = True - >>> s3grab.inputs.bucket_path = 'ds000101/ds000101_R2.0.0/uncompressed/' - >>> s3grab.inputs.local_directory = '/tmp' - >>> s3grab.inputs.field_template = {'anat': '%s/anat/%s_T1w.nii.gz', 'func': '%s/func/%s_task-simon_run-1_bold.nii.gz'} - >>> s3grab.inputs.template_args = {'anat': [['subj_id', 'subj_id']], 'func': [['subj_id', 'subj_id']]} + >>> s3grab.inputs.bucket_path = 'ds000101/ds000101_R2.0.0/uncompressed/' + >>> s3grab.inputs.local_directory = '/tmp' + >>> s3grab.inputs.field_template = {'anat': '%s/anat/%s_T1w.nii.gz', + ... 'func': '%s/func/%s_task-simon_run-1_bold.nii.gz'} + >>> s3grab.inputs.template_args = {'anat': [['subj_id', 'subj_id']], + ... 'func': [['subj_id', 'subj_id']]} >>> s3grab.inputs.subj_id = 'sub-01' >>> s3grab.run() # doctest: +SKIP """ - + input_spec = S3DataGrabberInputSpec output_spec = DynamicTraitedSpec _always_run = True