Skip to content

Apply python-future for Python 3.4 support #1221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 125 commits into from
Oct 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
053ea1a
Add python3.4 to Travis config
alexsavio Sep 17, 2015
b45b237
Futurize doc folder
alexsavio Sep 17, 2015
346666d
Futurize nipype core
alexsavio Sep 17, 2015
020ce39
Futurize examples
alexsavio Sep 17, 2015
213c47b
Futurize setup.py
alexsavio Sep 17, 2015
3a358f3
Futurize tools
alexsavio Sep 17, 2015
a0d292b
Add future to requirements.txt
alexsavio Sep 17, 2015
2630ae1
Add future to Travis config
alexsavio Sep 17, 2015
2ce613b
fix: futurize setup.py
alexsavio Sep 17, 2015
63c31c1
De-futurize six.py and update to 1.9
alexsavio Sep 17, 2015
ee437c1
change six.string_types to str
alexsavio Sep 17, 2015
1484b9f
strip prov from provenance.py
alexsavio Sep 17, 2015
5ed251b
fix: redo imports in interfaces/base.py
alexsavio Sep 17, 2015
1ebf5dc
fix: test traits Unicode coerce Str
alexsavio Sep 17, 2015
84005b9
fix: freesurfer/model.py: all traits.Str to traits.Unicode
alexsavio Sep 17, 2015
8d6a5cd
fix: fix a few tests
alexsavio Sep 18, 2015
da7deeb
fix: misc.py: remove six, fix str check
alexsavio Sep 18, 2015
4c651f9
fix: filemanip: remove unused import, encode str
alexsavio Sep 18, 2015
28cd934
fix: engine: change file open and copy dict
alexsavio Sep 18, 2015
091c9b6
fix: base: change dict copy and encode hash
alexsavio Sep 18, 2015
ae5c16a
fix: pipeline.utils: iterated container can't change in loop
alexsavio Sep 18, 2015
29eeed6
fix: test_join.py remove unused imports
alexsavio Sep 18, 2015
a379dc2
fix: config.py: strict configparser option types: bool
alexsavio Sep 18, 2015
fa98ff2
fix: config.py: revert read_file to readfp
alexsavio Sep 18, 2015
d03c1d9
fix: pipeline/utils: use pair-list instead of dict for edges2remove
alexsavio Sep 18, 2015
35e3b18
fix: pipeline.engine: fixes and manual futurizations
alexsavio Sep 18, 2015
7dba760
fix: utils str fixes and nipype_cmd sort interfaces list
alexsavio Sep 20, 2015
8044ed9
fix: pipeline/utils.py order field inputs, refactor
alexsavio Sep 20, 2015
c2f93da
fix: pipeline/engine.py: fix string type check
alexsavio Sep 20, 2015
0b2850c
fix: utils/tests/test_cmd: futurize test_cmd CLI output
alexsavio Sep 20, 2015
4ca82be
fix: remove first tabs
alexsavio Sep 20, 2015
fb7089a
fix: utils/nipype_cmd: cosmetics
alexsavio Sep 20, 2015
291aaf2
fix: utils/misc: revert to `str`
alexsavio Sep 20, 2015
6ceb87e
fix: interfaces/utility.py: remove `dumps` and `loads`
alexsavio Sep 20, 2015
fda1473
fix: interfaces/tests: `file` to `open`
alexsavio Sep 20, 2015
6c23db1
enh: test_engine: put some spaces in the code
alexsavio Sep 22, 2015
3d06301
fix: pipeline/utils: fix bugs related with py3k `map`
alexsavio Sep 22, 2015
b9abf85
fix: pipeline/engine: fix bugs related with py3k `map`
alexsavio Sep 22, 2015
773b620
Futurize doc folder
alexsavio Sep 17, 2015
039a426
Futurize nipype core
alexsavio Sep 17, 2015
51a4c3d
Futurize setup.py
alexsavio Sep 17, 2015
2e39756
fix: futurize setup.py
alexsavio Sep 17, 2015
6ea593f
De-futurize six.py and update to 1.9
alexsavio Sep 17, 2015
eb43f3e
change six.string_types to str
alexsavio Sep 17, 2015
b8efe5a
fix: redo imports in interfaces/base.py
alexsavio Sep 17, 2015
bc46a3c
fix: fix a few tests
alexsavio Sep 18, 2015
2796ff6
fix: misc.py: remove six, fix str check
alexsavio Sep 18, 2015
571b09a
fix: engine: change file open and copy dict
alexsavio Sep 18, 2015
52ff876
fix: pipeline.utils: iterated container can't change in loop
alexsavio Sep 18, 2015
f8dd930
fix: test_join.py remove unused imports
alexsavio Sep 18, 2015
6ca787e
fix: config.py: strict configparser option types: bool
alexsavio Sep 18, 2015
c18ab24
fix: config.py: revert read_file to readfp
alexsavio Sep 18, 2015
239ead8
fix: pipeline/utils: use pair-list instead of dict for edges2remove
alexsavio Sep 18, 2015
7256c57
fix: pipeline.engine: fixes and manual futurizations
alexsavio Sep 18, 2015
41e9a0a
fix: utils str fixes and nipype_cmd sort interfaces list
alexsavio Sep 20, 2015
1283fd3
fix: pipeline/utils.py order field inputs, refactor
alexsavio Sep 20, 2015
7a81dff
fix: pipeline/engine.py: fix string type check
alexsavio Sep 20, 2015
885f65f
fix: utils/misc: revert to `str`
alexsavio Sep 20, 2015
f531ed6
fix: interfaces/utility.py: remove `dumps` and `loads`
alexsavio Sep 20, 2015
cc99e64
fix: interfaces/tests: `file` to `open`
alexsavio Sep 20, 2015
c1b3ebf
fix: pipeline/utils: fix bugs related with py3k `map`
alexsavio Sep 22, 2015
570122c
fix: pipeline/engine: fix bugs related with py3k `map`
alexsavio Sep 22, 2015
af03e4c
fix: info.py byte string
Oct 9, 2015
a4106f2
BF: remove import of unicode_literals
Oct 9, 2015
c1647aa
RF: six comes from external
Oct 9, 2015
67cee0e
RF: StringIO from io
Oct 9, 2015
3556022
BF: isinstance(..., string_types) not str
Oct 9, 2015
4f50fbd
RF: relative imports
Oct 9, 2015
f6f43d6
BF: remove builtins.str
Oct 10, 2015
f94d96f
BF: fix tests, fix broken function synchronize_iterables.
Oct 10, 2015
15bbbf9
BF: "print var" => "var" in doctest
Oct 10, 2015
6c785dd
BF: explicit convert of _parse_inputs pos to int (sometimes str)
Oct 10, 2015
3bdb6a1
TST: pprint(dict) for docstring.
Oct 10, 2015
0675c0f
TST: fix strings
Oct 10, 2015
a08d608
TST: skip tests with required files.
Oct 10, 2015
135638e
BF: paramiko is required (and was misspelled)
Oct 10, 2015
f77c145
range => list(range)
Oct 10, 2015
5702da1
BF: must decode() buffer
Oct 10, 2015
7bb4129
TST: use system extension info
Oct 10, 2015
7aa45b1
xrange => range (doctest)
Oct 10, 2015
55ffbdc
fix: add missing import
alexsavio Oct 10, 2015
670934e
BF: writelines needs an iterable; add [] around string.
Oct 10, 2015
d63d334
fix: fix to prev fix on open--remove builtins.open
Oct 10, 2015
07487c9
fix: test_base errors
satra Oct 10, 2015
4ee8e44
BF: don't stringify self.version=None
Oct 10, 2015
2659962
BF: hash update must be bytes; encode() first.
Oct 10, 2015
115a0a7
TST: doctest: print X => print(X)
Oct 10, 2015
65a4cfd
BF: fix missing import of unflatten
Oct 10, 2015
f67c85d
BF: must encode unicode before hashing.
Oct 10, 2015
252649b
RF: remove past.builtins; use six.string_types
Oct 10, 2015
c9f6458
TST: don't force binary mode for writing file.
Oct 10, 2015
9808dae
TST: fix FSL output extension errors, test all extensions, share code.
Oct 10, 2015
978c551
Add missing __init__.py to test directories.
Oct 10, 2015
5495816
RF: file => open
Oct 10, 2015
2d64a6d
RF: be more careful about warnings, test them!
Oct 10, 2015
7cd42b3
RF: json => simplejson
Oct 10, 2015
c379cce
TST: removing pyscript.m
Oct 10, 2015
2d572d5
improve gitignore
Oct 10, 2015
8ce1c85
BF: avoid sorting with tuple
Oct 10, 2015
d40cc48
TST: test whether MATLAB interface creates a script file or not.
Oct 10, 2015
f70973d
TST: for travis: pip install requirements file.
Oct 10, 2015
4957ad1
Suppress FSL warnings in .travis.yml output
Oct 10, 2015
966b4d9
Remove filterwarnings('always', UserWarning)--this is the default.
Oct 10, 2015
f1d126a
TST: skip test if fakes3 not installed.
Oct 10, 2015
c45bb12
Make setup.py py3x compatible.
Oct 10, 2015
b4fd99f
DOC: add Alexandre & Ben to authors list.
Oct 10, 2015
89a2036
Fix split_and_merge; some issue with old_div
Oct 10, 2015
b25c202
BF: use traits.Str (py2/3 compat) instead of traits.Unicode.
Oct 10, 2015
06c0293
fix: simplified doc test
satra Oct 10, 2015
0edd448
Merge pull request #2 from satra/enh/py3k-fix
satra Oct 10, 2015
3ee845f
fix: multifield join should produce the same set of outputs
satra Oct 11, 2015
d3f3484
Merge pull request #3 from satra/enh/py3k-fix
satra Oct 11, 2015
750e9af
TST: Install dependencies in circle.yml
Oct 11, 2015
df8fbaf
fix: removed all old_div references
satra Oct 11, 2015
89df112
fix: ensure doc tests are run from the testing/data directory
satra Oct 11, 2015
67fe0fe
fix: add missing auto-tests
satra Oct 11, 2015
60133ac
tst: added missing inits
satra Oct 11, 2015
0bac3c7
fix: updated auto test generator to use relative imports
satra Oct 11, 2015
9b52c9d
fix: updated auto tests with relative imports
satra Oct 11, 2015
3a01d1a
Merge pull request #4 from satra/enh/py3k-fix
satra Oct 11, 2015
20aedc6
fix: changing setup.py and circleci.yml for requirements
satra Oct 11, 2015
29d774b
fix: add blank line between file docstring and first import (needed f…
Oct 12, 2015
63566a9
fix: tweaks for building docs:
Oct 12, 2015
07d598a
fix: make sure stdout/stderr are of python version's string type.
Oct 12, 2015
6406ace
Remove future from setup / setup_egg
Oct 13, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/nipype/build
/nipype/nipype.egg-info
/doc/_build
/doc/preproc
/doc/users/examples
/doc/api/generated
*.pyc
Expand All @@ -17,3 +18,6 @@
.DS_Store
nipype/testing/data/von-ray_errmap.nii.gz
nipype/testing/data/von_errmap.nii.gz
crash*.pklz
.coverage
htmlcov/
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ cache:
language: python
python:
- 2.7
- 3.4
env:
- INSTALL_DEB_DEPENDECIES=true
- INSTALL_DEB_DEPENDECIES=false
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.6.0-Linux-x86_64.sh
-O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh; fi
- chmod +x miniconda.sh
- "./miniconda.sh -b"
- export PATH=/home/travis/miniconda/bin:$PATH
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi
- if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
- if $INSTALL_DEB_DEPENDECIES; then bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh);
Expand All @@ -27,15 +28,16 @@ install:
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
- source activate testenv
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install ordereddict; fi
- conda install --yes numpy scipy nose traits networkx dateutil
- pip install nibabel
- conda install --yes numpy scipy nose networkx dateutil
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then conda install --yes traits; else pip install traits; fi
- pip install python-coveralls
- pip install nose-cov
- pip install -r requirements.txt # finish remaining requirements
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
- pip install https://github.com/trungdong/prov/archive/rdf.zip
- python setup.py install
script:
- nosetests --with-doctest --with-cov --cov nipype --cov-config .coveragerc --logging-level=INFO
- python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest --with-cov --cover-package nipype --cov-config .coveragerc --logging-level=INFO
after_success:
- coveralls --config_file .coveragerc
deploy:
Expand Down
2 changes: 2 additions & 0 deletions THANKS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Contributors to Nipype include but are not limited to:
* Aimi Watanabe
* Alexander Schaefer
* Alexandre Gramfort
* Alexandre Savio
* Anisha Keshavan
* Ariel Rokem
* Ben Acland
* Ben Cipollini
* Basile Pinsard
* Brendan Moloney
* Brian Cheung
Expand Down
14 changes: 8 additions & 6 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
python setup.py build_sphinx
"""

from __future__ import print_function

# Standard library imports
import sys
import os
Expand Down Expand Up @@ -43,7 +45,7 @@ def run(self):
install.run()

# Horrible trick to reload nipype with our temporary instal
for key in sys.modules.keys():
for key in list(sys.modules.keys()):
if key.startswith('nipype'):
sys.modules.pop(key, None)
sys.path.append(os.path.abspath(self.temp_install_dir))
Expand Down Expand Up @@ -131,7 +133,7 @@ def run(self):

def zip_docs(self):
if not os.path.exists(DOC_BUILD_DIR):
raise OSError, 'Doc directory does not exist.'
raise OSError('Doc directory does not exist.')
target_file = os.path.join('doc', 'documentation.zip')
# ZIP_DEFLATED actually compresses the archive. However, there
# will be a RuntimeError if zlib is not installed, so we check
Expand Down Expand Up @@ -170,17 +172,17 @@ def run(self):
clean.run(self)
api_path = os.path.join('doc', 'api', 'generated')
if os.path.exists(api_path):
print "Removing %s" % api_path
print("Removing %s" % api_path)
shutil.rmtree(api_path)
interface_path = os.path.join('doc', 'interfaces', 'generated')
if os.path.exists(interface_path):
print "Removing %s" % interface_path
print("Removing %s" % interface_path)
shutil.rmtree(interface_path)
if os.path.exists(DOC_BUILD_DIR):
print "Removing %s" % DOC_BUILD_DIR
print("Removing %s" % DOC_BUILD_DIR)
shutil.rmtree(DOC_BUILD_DIR)
if os.path.exists(DOC_DOCTREES_DIR):
print "Removing %s" % DOC_DOCTREES_DIR
print("Removing %s" % DOC_DOCTREES_DIR)
shutil.rmtree(DOC_DOCTREES_DIR)


Expand Down
2 changes: 1 addition & 1 deletion doc/devel/matlab_interface_devel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ By subclassing **MatlabCommand** for your main class, and **MatlabInputSpec** fo
>>> hello = HelloWorld()
>>> hello.inputs.name = 'hello_world'
>>> out = hello.run()
>>> print out.outputs.matlab_output
>>> print(out.outputs.matlab_output)
"""
input_spec = HelloWorldInputSpec
output_spec = HelloWorldOutputSpec
Expand Down
12 changes: 7 additions & 5 deletions doc/sphinxext/autosummary_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
./ext/autosummary_generate.py -o source/generated source/*.rst

"""

from __future__ import print_function
import glob, re, inspect, os, optparse, pydoc
from autosummary import import_by_name

Expand Down Expand Up @@ -44,7 +46,7 @@ def main():

# read
names = {}
for name, loc in get_documented(args).items():
for name, loc in list(get_documented(args).items()):
for (filename, sec_title, keyword, toctree) in loc:
if toctree is not None:
path = os.path.join(os.path.dirname(filename), toctree)
Expand All @@ -60,8 +62,8 @@ def main():

try:
obj, name = import_by_name(name)
except ImportError, e:
print "Failed to import '%s': %s" % (name, e)
except ImportError as e:
print("Failed to import '%s': %s" % (name, e))
continue

fn = os.path.join(path, '%s.rst' % name)
Expand Down Expand Up @@ -129,8 +131,8 @@ def get_documented_in_docstring(name, module=None, filename=None):
return get_documented_in_lines(lines, module=name, filename=filename)
except AttributeError:
pass
except ImportError, e:
print "Failed to import '%s': %s" % (name, e)
except ImportError as e:
print("Failed to import '%s': %s" % (name, e))
return {}

def get_documented_in_lines(lines, module=None, filename=None):
Expand Down
19 changes: 13 additions & 6 deletions doc/sphinxext/numpy_ext/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@

"""

from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import object

import inspect
import textwrap
import re
import pydoc
from StringIO import StringIO
from warnings import warn

from nipype.external.six import StringIO


class Reader(object):
"""A line-based string reader.

Expand Down Expand Up @@ -113,7 +120,7 @@ def __getitem__(self,key):
return self._parsed_data[key]

def __setitem__(self,key,val):
if not self._parsed_data.has_key(key):
if key not in self._parsed_data:
warn("Unknown section %s" % key)
else:
self._parsed_data[key] = val
Expand Down Expand Up @@ -370,7 +377,7 @@ def _str_index(self):
idx = self['index']
out = []
out += ['.. index:: %s' % idx.get('default','')]
for section, references in idx.iteritems():
for section, references in list(idx.items()):
if section == 'default':
continue
out += [' :%s: %s' % (section, ', '.join(references))]
Expand Down Expand Up @@ -428,7 +435,7 @@ def __init__(self, func, role='func', doc=None, config={}):
argspec = inspect.formatargspec(*argspec)
argspec = argspec.replace('*','\*')
signature = '%s%s' % (func_name, argspec)
except TypeError, e:
except TypeError as e:
signature = '%s()' % func_name
self['Signature'] = signature

Expand All @@ -450,8 +457,8 @@ def __str__(self):
'meth': 'method'}

if self._role:
if not roles.has_key(self._role):
print "Warning: invalid role %s" % self._role
if self._role not in roles:
print("Warning: invalid role %s" % self._role)
out += '.. %s:: %s\n \n\n' % (roles.get(self._role,''),
func_name)

Expand Down
11 changes: 7 additions & 4 deletions doc/sphinxext/numpy_ext/docscrape_sphinx.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from __future__ import absolute_import
import re, inspect, textwrap, pydoc
import sphinx
from docscrape import NumpyDocString, FunctionDoc, ClassDoc
from nipype.external import six
from .docscrape import NumpyDocString, FunctionDoc, ClassDoc
from nipype.external.six import string_types



class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config={}):
Expand Down Expand Up @@ -128,7 +131,7 @@ def _str_index(self):
return out

out += ['.. index:: %s' % idx.get('default','')]
for section, references in idx.iteritems():
for section, references in list(idx.items()):
if section == 'default':
continue
elif section == 'refguide':
Expand All @@ -141,7 +144,7 @@ def _str_references(self):
out = []
if self['References']:
out += self._str_header('References')
if isinstance(self['References'], six.string_types):
if isinstance(self['References'], string_types):
self['References'] = [self['References']]
out.extend(self['References'])
out += ['']
Expand Down
9 changes: 6 additions & 3 deletions doc/sphinxext/numpy_ext/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@

"""

from __future__ import absolute_import
from builtins import object

import sphinx

if sphinx.__version__ < '1.0.1':
raise RuntimeError("Sphinx 1.0.1 or newer is required")

import os, re, pydoc
from docscrape_sphinx import get_doc_object, SphinxDocString
from .docscrape_sphinx import get_doc_object, SphinxDocString
from sphinx.util.compat import Directive
import inspect

Expand All @@ -39,7 +42,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
lines[:] = title_re.sub(u'', u"\n".join(lines)).split(u"\n")
else:
doc = get_doc_object(obj, what, u"\n".join(lines), config=cfg)
lines[:] = unicode(doc).split(u"\n")
lines[:] = str(doc).split(u"\n")

if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
obj.__name__:
Expand Down Expand Up @@ -120,7 +123,7 @@ def __init__(self, *a, **kw):
self.wrap_mangling_directives()

def wrap_mangling_directives(self):
for name, objtype in self.directive_mangling_map.items():
for name, objtype in list(self.directive_mangling_map.items()):
self.directives[name] = wrap_mangling_directive(
self.directives[name], objtype)

Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_camino_dti.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_affine(volume):
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def select_aparc_annot(list_of_files):
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
4 changes: 2 additions & 2 deletions examples/dmri_connectivity_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

try:
package_check('cmp')
except Exception, e:
except Exception as e:
warnings.warn('cmp not installed')
else:
import cmp
Expand Down Expand Up @@ -114,7 +114,7 @@
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_dtk_dti.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_dtk_odf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_fsl_dti.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_group_connectivity_camino.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
title = ''
for idx, group_id in enumerate(group_list.keys()):
title += group_id
if not idx == len(group_list.keys()) - 1:
if not idx == len(list(group_list.keys())) - 1:
title += '-'

info = dict(dwi=[['subject_id', 'dti']],
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_group_connectivity_mrtrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
title = ''
for idx, group_id in enumerate(group_list.keys()):
title += group_id
if not idx == len(group_list.keys()) - 1:
if not idx == len(list(group_list.keys())) - 1:
title += '-'

info = dict(dwi=[['subject_id', 'dti']],
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_mrtrix_dti.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"""

datasource = pe.Node(interface=nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()),
outfields=list(info.keys())),
name = 'datasource')

datasource.inputs.template = "%s/%s"
Expand Down
2 changes: 1 addition & 1 deletion examples/dmri_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"""

datasource = pe.Node(nio.DataGrabber(infields=['subject_id'],
outfields=info.keys()), name='datasource')
outfields=list(info.keys())), name='datasource')

datasource.inputs.template = "%s/%s"

Expand Down
Loading