Skip to content

Commit 2c9754b

Browse files
committed
enh: added coveralls support
1 parent ff3fedd commit 2c9754b

File tree

4 files changed

+45
-33
lines changed

4 files changed

+45
-33
lines changed

.coveragerc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ branch = True
33
source = nipype
44
include = */nipype/*
55
omit =
6-
*/nipype/externals/*
6+
*/nipype/external/*
7+
*/nipype/workflows/*
8+
*/nipype/fixes/*
79
*/setup.py

.travis.yml

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
11
language: python
2-
env:
3-
- COVERAGE=--with-coverage
42
python:
5-
- "2.7"
3+
- 2.7
4+
# Setup anaconda
65
before_install:
7-
- deactivate
8-
- sudo rmdir /dev/shm
9-
- sudo ln -Tsf /{run,dev}/shm
10-
- sudo apt-get update -qq
11-
- sudo apt-get install lsb-release
12-
- source /etc/lsb-release
13-
- echo ${DISTRIB_CODENAME}
14-
- wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
15-
- sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
16-
- sudo apt-get update -qq
17-
- sudo apt-get install -qq python-scipy python-nose
18-
- sudo apt-get install -qq python-networkx python-traits python-setuptools
19-
- sudo apt-get install -qq python-nibabel
20-
- sudo apt-get install -qq --no-install-recommends fsl afni
21-
- sudo apt-get install -qq fsl-atlases
22-
- source /etc/fsl/fsl.sh
23-
- virtualenv --system-site-packages ~/virtualenv/this
24-
- source ~/virtualenv/this/bin/activate
25-
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
26-
- pip install https://github.com/satra/prov/archive/enh/rdf.zip
27-
- pip install coverage
28-
- pip install coveralls
6+
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-2.0.3-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-2.0.3-Linux-x86_64.sh -O miniconda.sh; fi
7+
- chmod +x miniconda.sh
8+
- ./miniconda.sh -b
9+
- export PATH=/home/travis/anaconda/bin:$PATH
10+
# The next couple lines fix a crash with multiprocessing on Travis
11+
- sudo rm -rf /dev/shm
12+
- sudo ln -s /run/shm /dev/shm
13+
- sudo apt-get update -qq
14+
- sudo apt-get install lsb-release
15+
- source /etc/lsb-release
16+
- echo ${DISTRIB_CODENAME}
17+
- wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
18+
- sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
19+
- sudo apt-get update -qq
20+
- sudo apt-get install -qq --no-install-recommends fsl afni
21+
- sudo apt-get install -qq fsl-atlases
22+
- source /etc/fsl/fsl.sh
23+
24+
# Install packages
2925
install:
30-
- source ~/virtualenv/this/bin/activate
31-
- python setup.py build_ext --inplace
26+
- conda install --yes pip python=$TRAVIS_PYTHON_VERSION numpy scipy nose traits networkx dateutil
27+
- pip install nibabel --use-mirrors
28+
- pip install python-coveralls --use-mirrors
29+
- pip install nose-cov --use-mirrors
30+
- pip install https://github.com/RDFLib/rdflib/archive/master.zip
31+
- pip install https://github.com/satra/prov/archive/enh/rdf.zip
32+
- python setup.py install
33+
34+
# Run test
3235
script:
33-
- source ~/virtualenv/this/bin/activate
34-
- make test-coverage
36+
- nosetests --with-doctest --with-cov --cov nipype --cov-config .coveragerc --logging-level=INFO
37+
38+
# Calculate coverage
3539
after_success:
36-
- coveralls
40+
- coveralls --config_file .coveragerc

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ test-doc:
5757
--doctest-fixtures=_fixture doc/
5858

5959
test-coverage:
60-
rm -rf coverage .coverage
61-
$(NOSETESTS) -s --with-doctest --with-coverage nipype
60+
$(NOSETESTS) -s --with-doctest --with-coverage --cover-package=nipype \
61+
--config=.coveragerc
6262

6363
test: clean test-code
6464

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
33
========================================================
44

5+
.. image:: https://travis-ci.org/nipy/nipype.png?branch=master
6+
:target: https://travis-ci.org/nipy/nipype
7+
8+
.. image:: https://coveralls.io/repos/nipy/nipype/badge.png
9+
:target: https://coveralls.io/r/nipy/nipype
10+
511

612
Current neuroimaging software offer users an incredible opportunity to
713
analyze data using a variety of different algorithms. However, this has

0 commit comments

Comments
 (0)