-
Notifications
You must be signed in to change notification settings - Fork 536
[FIX] PY3 compatibility revisited #1572
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
Changes from all commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
d365c58
add a pylintrc
oesteban e08743b
use open from builtins always
oesteban 9a3c73d
update CHANGES
oesteban 02b19ae
travis: force install requirements
oesteban 6c057f4
futurize files that needed it
oesteban 65031e8
remove .pylintrc
oesteban 339e216
Replace traits.Str by traits.Unicode
oesteban f052346
futurize traits Str and DictStrStr
oesteban 1fb9335
fix traits_extension and interfaces.base
oesteban cdd09f0
futurize interfaces.io
oesteban fe12b80
add absolute_import in base and io
oesteban cfd20fd
circle: bump tests to py3.5 and give more retries to wget
oesteban e764e15
circle: bump tests to py3.5 (fixed in docker calls)
oesteban 9d253d6
add encoding comment at top
oesteban 1c157c8
fix json writing in py2
oesteban bbc1d4f
add matplotlib, coverage, nose-cov and boto to dockerfile
oesteban feaf9d5
remove coding indication in info.py, breaks exec
oesteban c40ba40
restore LANG and LC_ALL in docker image
oesteban 5b9a796
docker image: add sphinx to build docs
oesteban f38fb07
Merge branch 'fix/DipyBreaksBuildDocs' into fix/Py3UseBuiltinOpen
oesteban 4bc2fd1
futurize stages 1 and 2
oesteban e334a8b
remove dependency from external/six
oesteban 2aad2d5
replace relative imports of six
oesteban d0f9cba
finish up removing external six
oesteban bdceaf4
fixing tests...
oesteban 81449b6
making tests pass in python 2
oesteban e2dbf1d
fix incorrect use of except in py3
oesteban a61008c
Fix provenance code
oesteban 160defa
Re-enabled the ValueError caching for one case (sequences)
oesteban 1315863
make test_provenance py3 compatible
oesteban 0290058
examples: do not cleanup work directory before run
oesteban 46910c2
remove large try...except structures in provenance
oesteban 041e2ff
add doctest-ignore-unicode
oesteban 7104f43
remove all appearances of py3compat
oesteban b2270ad
add --with-doctest-ignore-unicode to .travis
oesteban 8de6a37
fix errors in doctest vals of afni.preprocess
oesteban 25194e1
Update doctests to Python3, with nose ignore flags
oesteban 57496bd
fixing error in doctests
oesteban 6ebda75
Merge branch 'fix/Py3UseBuiltinOpen' of github.com:oesteban/nipype in…
oesteban 9147d39
fix some tests py3.5
oesteban dadc8a8
update travis file to new conda installation
oesteban 1dc919a
travis: remove conda installation of nipype before installing current
oesteban 36307f0
travis: install miniconda in same path, regardless version
oesteban 62e2086
travis: simplify miniconda install
oesteban 8abb4eb
travis: fix miniconda install
oesteban bf99979
travis: install doctest-ignore-unicode always
oesteban c109cbc
bring doctest-ignore back to py2, and see how doctest should be
oesteban f1aacb3
handle OrderedDict
oesteban 54e5f7f
still working on travis file
oesteban 8794c72
still working on travis file (fix error)
oesteban b1302f7
still working on travis file (add auto-yes to conda install)
oesteban bcc1af2
still working on travis file (vtk not installed if dependencies are n…
oesteban f4e039c
travis: do not install vtk if nodeps or python is 3.4
oesteban 3f255fb
fix clipping text in provenance
oesteban 8403762
fix clipping text in provenance (2)
oesteban cb4fc57
remove u-strings from doctests
oesteban cf08a84
fixing doctests (remove u-string)
oesteban 9acc8f2
fixing doctests (remove u-string)
oesteban 61cafcc
fixing doctests, some missing IGNORE_UNICODE tags
oesteban 13f4d87
restrict vtk to python 2.7 for now
oesteban 7507829
add IGNORE_UNICODE in doctest
oesteban f137e45
re-enable a reduced version of fsl_course_data
oesteban 2d0a775
circle: fix nipype-fsl_course_data link
oesteban f0ad210
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban e083c87
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban 963d3a0
fix IGNORE_UNICODE flags
oesteban a6e042d
circleci: fix work directory in nosetests
oesteban b89c312
save crashfiles to an artifacts dir
oesteban 627f032
circle: fixing eddy tests
oesteban f6b7a89
travis: remove vtk for now
oesteban ac41ff2
circle: fix copy crashfiles, update py27 image
oesteban bb2c6aa
[FIX] Update MRIPretess to name_source, add freesurfer.utils tests
oesteban 52e85aa
travis: chasing md5 digest problem, circle: make specs
oesteban d361c87
fix syntax error
oesteban a0ca996
fixing syntax errors in interfaces.base
oesteban b84ce93
update Dockerfiles to reduce number of skipped tests
oesteban a9654db
do not use six.text_types
oesteban 791f34d
revert py3 string formatting
oesteban 984f7a3
DEBUG: Separate stat test, add err_msg
effigies 846762e
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban 37ddd15
compatibility with old bytes in py2
oesteban 0e06a2d
py2/3 compatibility hashing inputs
oesteban c826680
update specs
oesteban ba57f3b
compat py2/3, fix encoding issues
oesteban 39477c0
compat py2/3: fix spm_base test
oesteban b264391
compat 2/3: open mode b to dump json in py2
oesteban 917d273
add unicode_literals to test_provenance
oesteban a2db4bb
travis: fixing coverage errors in the end of tests
oesteban e81a6bc
TEST: Separate recopy test, err_msg for debugging
effigies a2daadd
When creating a symlink, check against realpath of source
effigies 05f393b
Update changelog
effigies cbe60b2
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban 0ed04d6
Update CHANGES
oesteban e682455
comment out failing tests from effigies/fix_linkchain_test branch
oesteban 9792641
Merge remote-tracking branch 'effigies/fix_linkchain_test' into fix/P…
oesteban 8b6a173
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban 0748dd2
update data links
oesteban 0a3ee98
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban 632c1f1
multiple fixes for python 3 compatibility
oesteban e6bf7d5
fixing python 2 compatibility
oesteban e9f608e
fix invalid string comparison
oesteban ce2274e
make check-before-commit
oesteban a16b7eb
add from builtins import open where needed, fixed some open and never…
oesteban 90f0cc0
fixing missing open from builtins, unicode details
oesteban 36e5920
fix syntax error
oesteban 4e040ac
add dipy to docker images
oesteban 637a73b
fixing indentation problem in examples/fmri_ants_openfmri.py
oesteban 3b19e82
remove unnecessary ENV layers from docker images
oesteban 85bd23d
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban cc86fc6
Re-arrange Dockerfiles, move fsl_imglob.py to external
oesteban 0d51e9c
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban 27d0099
remove make specs from dockerfile
oesteban 37aa532
build py27 image, run nosetests py27, run multiproc (py27, py35) of f…
oesteban 128e0dc
see if circle does not fail with pre-cached files
oesteban bee71be
produce one xunitfile per py version and merge them
oesteban 0b93918
tweaks to speed up image build
oesteban d49efb7
add debug trace to failing operation, update dockerimages
oesteban 74c93ec
fix syntax errors in Dockerfile
oesteban c4f1a52
unicode fixes, np.savetxt does not take unicode fmt
oesteban d686bde
fix np.savetxt with format
oesteban ce6a10b
making pickle compatible py 2 and 3
oesteban 6009b57
clean up previous execution of examples
oesteban eed2157
fix tests
oesteban 426bf46
fix runtime profiler tests
oesteban 608f3f7
enable runtime profiler tests
oesteban 39742cf
make fakes3 detection more reliable and python <2.6 compatible
oesteban d32422a
fixing runtime_profiler tests
oesteban b8129f8
fix error in test_io
oesteban cd4f89a
add documentation about testing
oesteban 6defc92
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban 306c8e5
fix typo in testing docs
oesteban 314b2fe
save python 2.7 image as it contains more layers than the 3.5 image
oesteban f97dc45
add link to developer install
oesteban 0921506
limit number of cpus in MultiProc test workflows
oesteban 38cbf46
Merge branch 'master' into fix/Py3UseBuiltinOpen
oesteban 644aa54
ensure n_procs is int
oesteban File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,6 @@ | |
| *.pyc | ||
| *.egg-info | ||
| __pycache__ | ||
|
|
||
| docker/nipype_* | ||
| docker/test-* | ||
| .coverage | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| ============== | ||
| Testing nipype | ||
| ============== | ||
|
|
||
| In order to ensure the stability of each release of Nipype, the project uses two | ||
| continuous integration services: `CircleCI <https://circleci.com/gh/nipy/nipype/tree/master>`_ | ||
| and `Travis CI <https://travis-ci.org/nipy/nipype>`_. | ||
| If both batteries of tests are passing, the following badges should be shown in green color: | ||
|
|
||
| .. image:: https://travis-ci.org/nipy/nipype.png?branch=master | ||
| :target: https://travis-ci.org/nipy/nipype | ||
|
|
||
| .. image:: https://circleci.com/gh/nipy/nipype/tree/master.svg?style=svg | ||
| :target: https://circleci.com/gh/nipy/nipype/tree/master | ||
|
|
||
|
|
||
| Tests implementation | ||
| -------------------- | ||
|
|
||
| Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_. | ||
| By the time these guidelines are written, Nipype implements 17638 tests. | ||
|
|
||
| To run the tests locally, first get nose installed:: | ||
|
|
||
| pip install nose | ||
|
|
||
|
|
||
| Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_, | ||
| the tests can be run with the following simple command:: | ||
|
|
||
| make tests | ||
|
|
||
|
|
||
| Skip tests | ||
| ---------- | ||
|
|
||
| Nipype will skip some tests depending on the currently available software and data | ||
| dependencies. Installing software dependencies and downloading the necessary data | ||
| will reduce the number of skip tests. | ||
|
|
||
| Some tests in Nipype make use of some images distributed within the `FSL course data | ||
| <http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here | ||
| <https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz>`_. | ||
| To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment | ||
| variable to point to that folder. | ||
|
|
||
|
|
||
| Testing Nipype using Docker | ||
| --------------------------- | ||
|
|
||
| As of :code:`nipype-0.13`, Nipype is tested inside Docker containers. Once the developer | ||
| `has installed the Docker Engine <https://docs.docker.com/engine/installation/>`_, testing | ||
| Nipype is as easy as follows:: | ||
|
|
||
| cd path/to/nipype/ | ||
| docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27 | ||
| docker run -it --rm -v /etc/localtime:/etc/localtime:ro \ | ||
| -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \ | ||
| -v ~/examples:/root/examples:ro \ | ||
| -v ~/scratch:/scratch \ | ||
| -w /root/src/nipype \ | ||
| nipype/nipype_test:py27 /usr/bin/run_nosetests.sh | ||
|
|
||
| For running nipype in Python 3.5:: | ||
|
|
||
| cd path/to/nipype/ | ||
| docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 | ||
| docker run -it --rm -v /etc/localtime:/etc/localtime:ro \ | ||
| -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \ | ||
| -v ~/examples:/root/examples:ro \ | ||
| -v ~/scratch:/scratch \ | ||
| -w /root/src/nipype \ | ||
| nipype/nipype_test:py35 /usr/bin/run_nosetests.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # -*- coding: utf-8 -*- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # -*- coding: utf-8 -*- | ||
| """ | ||
| ======== | ||
| numpydoc | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the NIPYPE_NUMBER_OF_CPUS variable used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/oesteban/nipype/blob/fix/Py3UseBuiltinOpen/tools/run_examples.py#L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see!
On Wed, Sep 7, 2016 at 11:41 AM, Oscar Esteban [email protected]
wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the way to set it in run_examples.py with the least changes.