16
16
- DEPENDS="six numpy scipy matplotlib h5py pillow pydicom"
17
17
- OPTIONAL_DEPENDS=""
18
18
- INSTALL_TYPE="setup"
19
+ - CHECK_TYPE="test"
19
20
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
20
21
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
21
22
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
@@ -32,10 +33,18 @@ matrix:
32
33
- python : 2.7
33
34
env :
34
35
- COVERAGE=1
36
+ - python : 3.5
37
+ env :
38
+ - COVERAGE=1
35
39
# Absolute minimum dependencies
36
40
- python : 2.7
37
41
env :
38
42
- DEPENDS="numpy==1.7.1"
43
+ # Absolute minimum dependencies
44
+ - python : 2.7
45
+ env :
46
+ - DEPENDS="numpy==1.7.1"
47
+ - CHECK_TYPE="import"
39
48
# Absolute minimum dependencies plus oldest MPL
40
49
# Check these against:
41
50
# nibabel/info.py
@@ -60,10 +69,6 @@ matrix:
60
69
- python : 3.5
61
70
env :
62
71
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
63
- # Documentation doctests
64
- - python : 2.7
65
- env :
66
- - DOC_DOC_TEST=1
67
72
- python : 2.7
68
73
env :
69
74
- INSTALL_TYPE=sdist
@@ -75,13 +80,17 @@ matrix:
75
80
- INSTALL_TYPE=requirements
76
81
- python : 2.7
77
82
env :
78
- - STYLE=1
83
+ - CHECK_TYPE="style"
79
84
- python : 3.5
80
85
env :
81
- - STYLE=1
86
+ - CHECK_TYPE="style"
87
+ # Documentation doctests
88
+ - python : 2.7
89
+ env :
90
+ - CHECK_TYPE="doc_doctests"
82
91
- python : 3.5
83
92
env :
84
- - DOC_DOC_TEST=1
93
+ - CHECK_TYPE="doc_doctests"
85
94
# Run tests with indexed_gzip present
86
95
- python : 2.7
87
96
env :
@@ -97,7 +106,12 @@ before_install:
97
106
- source venv/bin/activate
98
107
- python --version # just to check
99
108
- pip install -U pip setuptools>=27.0 wheel
100
- - retry pip install nose flake8 mock # always
109
+ - if [ "${CHECK_TYPE}" == "test" ]; then
110
+ retry pip install nose mock;
111
+ fi
112
+ - if [ "${CHECK_TYPE}" == "style" ]; then
113
+ retry pip install flake8;
114
+ fi
101
115
- pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
102
116
- if [ "${COVERAGE}" == "1" ]; then
103
117
pip install coverage;
@@ -126,25 +140,29 @@ install:
126
140
# command to run tests, e.g. python setup.py test
127
141
script :
128
142
- |
129
- if [ "${STYLE }" == "1 " ]; then
143
+ if [ "${CHECK_TYPE }" == "style " ]; then
130
144
# Run styles only on core nibabel code.
131
145
flake8 nibabel
132
- else
146
+ elif [ "${CHECK_TYPE}" == "import" ]; then
147
+ # Import nibabel without attempting to test
148
+ # Allows us to check missing dependencies masked by testing libraries
149
+ python -c 'import nibabel; print(nibabel.__version__)'
150
+ elif [ "${CHECK_TYPE}" == "doc_doctests" ]; then
151
+ cd doc
152
+ pip install -r ../doc-requirements.txt
153
+ make html;
154
+ make doctest;
155
+ elif [ "${CHECK_TYPE}" == "test" ]; then
133
156
# Change into an innocuous directory and find tests from installation
134
157
mkdir for_testing
135
158
cd for_testing
136
159
if [ "${COVERAGE}" == "1" ]; then
137
160
cp ../.coveragerc .;
138
161
COVER_ARGS="--with-coverage --cover-package nibabel";
139
162
fi
140
- if [ "$DOC_DOC_TEST" == "1" ]; then
141
- cd ../doc;
142
- pip install -r ../doc-requirements.txt
143
- make html;
144
- make doctest;
145
- else
146
- nosetests --with-doctest $COVER_ARGS nibabel;
147
- fi
163
+ nosetests --with-doctest $COVER_ARGS nibabel;
164
+ else
165
+ false
148
166
fi
149
167
after_success :
150
168
- if [ "${COVERAGE}" == "1" ]; then coveralls; codecov; fi
0 commit comments