Skip to content

Commit 4149b2b

Browse files
committed
Merge branch 'master' of github.com:nipy/nipype into fix/retroicor
2 parents 6cec6be + b66ef0e commit 4149b2b

File tree

17 files changed

+359
-525
lines changed

17 files changed

+359
-525
lines changed

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ python:
66
- 3.4
77
- 3.5
88
env:
9-
- INSTALL_DEB_DEPENDECIES=true
10-
- INSTALL_DEB_DEPENDECIES=false
11-
- INSTALL_DEB_DEPENDECIES=true DUECREDIT_ENABLE=yes
9+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
10+
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
11+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit"
1212
before_install:
1313
- function bef_inst {
1414
wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh
@@ -28,16 +28,15 @@ before_install:
2828
export FSLOUTPUTTYPE=NIFTI_GZ; }
2929
- travis_retry bef_inst
3030
install:
31+
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi &&
3132
- function inst {
3233
conda config --add channels conda-forge &&
3334
conda update --yes conda &&
3435
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
35-
conda install -y nipype matplotlib nitime &&
36-
pip install python-coveralls coverage doctest-ignore-unicode &&
37-
if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi &&
36+
conda install -y nipype &&
3837
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
3938
pip install -r requirements.txt &&
40-
pip install -e . &&
39+
pip install -e .[$NIPYPE_EXTRAS] &&
4140
export COVERAGE_PROCESS_START=$(pwd)/.coveragerc &&
4241
export COVERAGE_DATA_FILE=$(pwd)/.coverage &&
4342
echo "data_file = ${COVERAGE_DATA_FILE}" >> ${COVERAGE_PROCESS_START}; }

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Upcoming release 0.13
22
=====================
33

4+
* ENH: Add AFNI 3dNote interface (https://github.com/nipy/nipype/pull/1637)
45
* FIX: Minor bugfixes related to unicode literals (https://github.com/nipy/nipype/pull/1656)
56
* ENH: Add a DVARS calculation interface (https://github.com/nipy/nipype/pull/1606)
67
* ENH: New interface to b0calc of FSL-POSSUM (https://github.com/nipy/nipype/pull/1399)

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# rsync -e ssh nipype-0.1-py2.5.egg cburns,[email protected]:/home/frs/project/n/ni/nipy/nipype/nipype-0.1/
44

55
PYTHON ?= python
6-
NOSETESTS ?= nosetests
6+
NOSETESTS=`which nosetests`
77

88
.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-doc test-coverage test html specs check-before-commit check
99

@@ -56,7 +56,7 @@ inplace:
5656
$(PYTHON) setup.py build_ext -i
5757

5858
test-code: in
59-
$(NOSETESTS) -s nipype --with-doctest --with-doctest-ignore-unicode
59+
python -W once:FSL:UserWarning:nipype $(NOSETESTS) --with-doctest --with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
6060

6161
test-doc:
6262
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --doctest-tests --doctest-extension=rst \
@@ -66,7 +66,8 @@ test-coverage: clean-tests in
6666
$(NOSETESTS) -s --with-doctest --with-doctest-ignore-unicode --with-coverage --cover-package=nipype \
6767
--config=.coveragerc
6868

69-
test: clean test-code
69+
test: tests # just another name
70+
tests: clean test-code
7071

7172
html:
7273
@echo "building docs"

circle.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
machine:
2+
environment:
3+
OSF_NIPYPE_URL: "https://files.osf.io/v1/resources/nefdp/providers/osfstorage"
4+
DATA_NIPYPE_TUTORIAL_URL: "${OSF_NIPYPE_URL}/57f4739cb83f6901ed94bf21"
5+
DATA_NIPYPE_FSL_COURSE: "${OSF_NIPYPE_URL}/57f472cf9ad5a101f977ecfe"
6+
DATA_NIPYPE_FSL_FEEDS: "${OSF_NIPYPE_URL}/57f473066c613b01f113e7af"
7+
28
services:
39
- docker
410

@@ -15,9 +21,9 @@ dependencies:
1521

1622
override:
1723
- mkdir -p ~/examples ~/scratch/nose ~/scratch/logs
18-
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2 && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
19-
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
20-
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/fsl-5.0.9-feeds.tar.gz && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
24+
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
25+
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-fsl_course_data.tar.gz "${DATA_NIPYPE_FSL_COURSE}" && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
26+
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O fsl-5.0.9-feeds.tar.gz "${DATA_NIPYPE_FSL_FEEDS}" && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
2127
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
2228
- docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35 . :
2329
timeout: 1600

doc/devel/testing_nipype.rst

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _dev_testing_nipype:
2+
13
==============
24
Testing nipype
35
==============
@@ -14,37 +16,91 @@ If both batteries of tests are passing, the following badges should be shown in
1416
:target: https://circleci.com/gh/nipy/nipype/tree/master
1517

1618

17-
Tests implementation
18-
--------------------
19+
Installation for developers
20+
---------------------------
21+
22+
To check out the latest development version::
23+
24+
git clone https://github.com/nipy/nipype.git
25+
26+
After cloning::
27+
28+
cd nipype
29+
pip install -r requirements.txt
30+
python setup.py develop
31+
32+
or::
33+
34+
cd nipype
35+
pip install -r requirements.txt
36+
pip install -e .[tests]
37+
38+
39+
40+
Test implementation
41+
-------------------
1942

2043
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
2144
By the time these guidelines are written, Nipype implements 17638 tests.
2245

23-
To run the tests locally, first get nose installed::
46+
After installation in developer mode, the tests can be run with the
47+
following simple command at the root folder of the project ::
48+
49+
make tests
2450

25-
pip install nose
51+
If ``make`` is not installed in the system, it is possible to run the tests using::
2652

53+
python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54+
--with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
2755

28-
Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_,
29-
the tests can be run with the following simple command::
3056

31-
make tests
57+
A successful test run should complete in a few minutes and end with
58+
something like::
3259

60+
----------------------------------------------------------------------
61+
Ran 17922 tests in 107.254s
62+
63+
OK (SKIP=27)
64+
65+
66+
All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR```
67+
environment variable is not set, some FreeSurfer related tests will fail.
68+
If any of the tests failed, please report them on our `bug tracker
69+
<http://github.com/nipy/nipype/issues>`_.
70+
71+
On Debian systems, set the following environment variable before running
72+
tests::
73+
74+
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
75+
76+
where ``$pathtomatlabdir`` is the path to your matlab installation and
77+
``$platform`` is the directory referring to x86 or x64 installations
78+
(typically ``glnxa64`` on 64-bit installations).
3379

3480
Skip tests
35-
----------
81+
~~~~~~~~~~
3682

3783
Nipype will skip some tests depending on the currently available software and data
3884
dependencies. Installing software dependencies and downloading the necessary data
3985
will reduce the number of skip tests.
4086

4187
Some tests in Nipype make use of some images distributed within the `FSL course data
4288
<http://fsl.fmrib.ox.ac.uk/fslcourse/>`_. This reduced version of the package can be downloaded `here
43-
<https://3552243d5be815c1b09152da6525cb8fe7b900a6.googledrive.com/host/0BxI12kyv2olZVUswazA3NkFvOXM/nipype-fsl_course_data.tar.gz>`_.
89+
<https://files.osf.io/v1/resources/nefdp/providers/osfstorage/57f472cf9ad5a101f977ecfe>`_.
4490
To enable the tests depending on these data, just unpack the targz file and set the :code:`FSL_COURSE_DATA` environment
4591
variable to point to that folder.
4692

4793

94+
Avoiding any MATLAB calls from testing
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
97+
On unix systems, set an empty environment variable::
98+
99+
export NIPYPE_NO_MATLAB=
100+
101+
This will skip any tests that require matlab.
102+
103+
48104
Testing Nipype using Docker
49105
---------------------------
50106

doc/users/install.rst

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ or::
4343
pip install nipype
4444

4545

46+
If you want to install all the optional features of ``nipype``,
47+
use the following command (only for ``nipype>=0.13``)::
48+
49+
pip install nipype[all]
50+
51+
4652
Debian and Ubuntu
4753
~~~~~~~~~~~~~~~~~
4854

@@ -73,77 +79,24 @@ If you downloaded the source distribution named something
7379
like ``nipype-x.y.tar.gz``, then unpack the tarball, change into the
7480
``nipype-x.y`` directory and install nipype using::
7581

76-
pip install -r requirements.txt
7782
python setup.py install
7883

7984
**Note:** Depending on permissions you may need to use ``sudo``.
8085

8186

82-
Nipype for developers
83-
---------------------
84-
85-
To check out the latest development version::
86-
87-
git clone git://github.com/nipy/nipype.git
88-
89-
or::
90-
91-
git clone https://github.com/nipy/nipype.git
92-
93-
After cloning::
94-
95-
pip install -r requirements.txt
96-
python setup.py develop
97-
98-
99-
Check out the list of nipype's `current dependencies <https://github.com/nipy/nipype/blob/master/requirements.txt>`_.
100-
101-
10287
Testing the install
10388
-------------------
10489

105-
The best way to test the install is to run the test suite. If you have
106-
nose_ installed, then do the following::
107-
108-
python -c "import nipype; nipype.test()"
109-
110-
you can also test with nosetests::
111-
112-
nosetests --with-doctest <installation filepath>/nipype --exclude=external --exclude=testing
113-
114-
or::
115-
116-
nosetests --with-doctest nipype
117-
118-
A successful test run should complete in a few minutes and end with
119-
something like::
120-
121-
Ran 13053 tests in 126.618s
122-
123-
OK (SKIP=66)
124-
125-
All tests should pass (unless you're missing a dependency). If SUBJECTS_DIR
126-
variable is not set some FreeSurfer related tests will fail. If any tests
127-
fail, please report them on our `bug tracker
128-
<http://github.com/nipy/nipype/issues>`_.
129-
130-
On Debian systems, set the following environment variable before running
131-
tests::
132-
133-
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
90+
The best way to test the install is checking nipype's version ::
13491

135-
where ``$pathtomatlabdir`` is the path to your matlab installation and
136-
``$platform`` is the directory referring to x86 or x64 installations
137-
(typically ``glnxa64`` on 64-bit installations).
92+
python -c "import nipype; print(nipype.__version__)"
13893

139-
Avoiding any MATLAB calls from testing
140-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14194

142-
On unix systems, set an empty environment variable::
95+
Installation for developers
96+
---------------------------
14397

144-
export NIPYPE_NO_MATLAB=
98+
Developers should start `here <../devel/testing_nipype.html>`_.
14599

146-
This will skip any tests that require matlab.
147100

148101
Recommended Software
149102
------------

docker/nipype_test/Dockerfile_py27

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ RUN chmod +x /usr/bin/run_*
4040
# Speed up building
4141
RUN mkdir -p /root/src/nipype
4242
COPY requirements.txt /root/src/nipype/requirements.txt
43-
RUN pip install -r /root/src/nipype/requirements.txt
43+
RUN pip install -r /root/src/nipype/requirements.txt && \
44+
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc
4445

4546
# Re-install nipype
4647
COPY . /root/src/nipype
4748
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
4849
cd /root/src/nipype && \
49-
pip install -e .
50+
pip install -e .[all]
5051

5152
CMD ["/bin/bash"]

docker/nipype_test/Dockerfile_py34

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ RUN rm -r ${FSLDIR}/bin/imglob && \
4545
# Speed up building
4646
RUN mkdir -p /root/src/nipype
4747
COPY requirements.txt /root/src/nipype/requirements.txt
48-
RUN pip install -r /root/src/nipype/requirements.txt
48+
RUN pip install -r /root/src/nipype/requirements.txt && \
49+
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python3.4/site-packages/matplotlib/mpl-data/matplotlibrc
4950

5051
# Re-install nipype
5152
COPY . /root/src/nipype
5253
RUN rm -r /usr/local/miniconda/lib/python3.4/site-packages/nipype* && \
5354
cd /root/src/nipype && \
54-
pip install -e .
55+
pip install -e .[all]
5556

5657
CMD ["/bin/bash"]

docker/nipype_test/Dockerfile_py35

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FROM nipype/nipype_test:base-0.0.2
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

3232
WORKDIR /root
33-
33+
3434
COPY docker/circleci/run_* /usr/bin/
3535
RUN chmod +x /usr/bin/run_*
3636

@@ -43,12 +43,13 @@ RUN rm -r ${FSLDIR}/bin/imglob && \
4343
# Speed up building
4444
RUN mkdir -p /root/src/nipype
4545
COPY requirements.txt /root/src/nipype/requirements.txt
46-
RUN pip install -r /root/src/nipype/requirements.txt
46+
RUN pip install -r /root/src/nipype/requirements.txt && \
47+
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python3.5/site-packages/matplotlib/mpl-data/matplotlibrc
4748

4849
# Re-install nipype
4950
COPY . /root/src/nipype
5051
RUN rm -r /usr/local/miniconda/lib/python3.5/site-packages/nipype* && \
5152
cd /root/src/nipype && \
52-
pip install -e .
53+
pip install -e .[all]
5354

5455
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)