Skip to content

Commit 585c0fc

Browse files
committed
Remove nitime from requirements
- Skip DVARS test if nitime is not present - Add nitime and matplotlib to travis
1 parent 1785cd7 commit 585c0fc

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ install:
3131
- conda update --all -y python=$TRAVIS_PYTHON_VERSION
3232
# - if [[ "${INSTALL_DEB_DEPENDECIES}" == "true" && ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then
3333
# conda install -y vtk mayavi; fi
34-
- conda install -y nipype
34+
- conda install -y nipype matplotlib nitime
3535
- pip install python-coveralls coverage doctest-ignore-unicode
3636
- if [ ! -z "$DUECREDIT_ENABLE"]; then pip install duecredit; fi
3737
- rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*

nipype/algorithms/tests/test_confounds.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import os
4-
from nipype.testing import (assert_equal, example_data)
4+
from nipype.testing import (assert_equal, example_data, skipif)
55
from nipype.algorithms.confounds import FramewiseDisplacement, ComputeDVARS
66
import numpy as np
77
from tempfile import mkdtemp
88
from shutil import rmtree
99

10+
nonitime = True
11+
try:
12+
import nitime
13+
nonitime = False
14+
except ImportError:
15+
pass
16+
17+
1018
def test_fd():
1119
tempdir = mkdtemp()
1220
ground_truth = np.loadtxt(example_data('fsl_motion_outliers_fd.txt'))
@@ -17,6 +25,7 @@ def test_fd():
1725
yield assert_equal, np.abs(ground_truth.mean() - res.outputs.fd_average) < 1e-4, True
1826
rmtree(tempdir)
1927

28+
@skipif(nonitime)
2029
def test_dvars():
2130
tempdir = mkdtemp()
2231
ground_truth = np.loadtxt(example_data('ds003_sub-01_mc.DVARS'))

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ xvfbwrapper
1212
psutil
1313
funcsigs
1414
configparser
15-
nitime

0 commit comments

Comments
 (0)