forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
164 lines (153 loc) · 7.93 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
language: c
sudo: false
cache:
apt: true
directories:
- $HOME/.cache/pip
- $HOME/.ccache
env:
global: PYTHON_VERSION=2.7 DISPLAY=:99.0 MNE_LOGGING_LEVEL=warning TEST_LOCATION=src
matrix:
include:
# Full (Linux, 2.7) first half
- os: linux
env: CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels mayavi"
PIP_DEPENDENCIES="pysurfer nitime faulthandler joblib nibabel codecov nose-timer nose-faulthandler"
MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"
# Full (Linux, 2.7) second half
- os: linux
env: CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels mayavi"
PIP_DEPENDENCIES="pysurfer nitime faulthandler joblib nibabel codecov nose-timer nose-faulthandler"
MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"
# OSX first half
- os: osx
env: CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels mayavi"
PIP_DEPENDENCIES="pysurfer nitime faulthandler joblib nibabel codecov nose-timer nose-faulthandler"
MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"
# OSX second half
- os: osx
env: CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels mayavi"
PIP_DEPENDENCIES="pysurfer nitime faulthandler joblib nibabel codecov nose-timer nose-faulthandler"
MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"
# Py3k + non-default stim channel first half
- os: linux
env: PYTHON_VERSION=3.5 TEST_LOCATION=install MNE_STIM_CHANNEL=STI101
CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels"
PIP_DEPENDENCIES="nitime joblib nibabel codecov nose-timer"
MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"
# Py3k + non-default stim channel second half
- os: linux
env: PYTHON_VERSION=3.5 TEST_LOCATION=install MNE_STIM_CHANNEL=STI101
CONDA_DEPENDENCIES="numpy scipy matplotlib pandas scikit-learn h5py pillow statsmodels"
PIP_DEPENDENCIES="nitime joblib nibabel codecov nose-timer"
MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"
# Old dependencies first half
- os: linux
env: CONDA_DEPENDENCIES="numpy=1.8 scipy=0.12 matplotlib=1.3 pandas=0.12 scikit-learn=0.14"
PIP_DEPENDENCIES="codecov nose-timer nose-faulthandler"
MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"
# Old dependencies second half
- os: linux
env: CONDA_DEPENDENCIES="numpy=1.8 scipy=0.12 matplotlib=1.3 pandas=0.12 scikit-learn=0.14"
PIP_DEPENDENCIES="codecov nose-timer nose-faulthandler"
MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"
# Minimal first half
- os: linux
env: DEPS=minimial
CONDA_DEPENDENCIES="numpy scipy matplotlib"
PIP_DEPENDENCIES="codecov nose-timer nose-faulthandler"
MNE_DIRS=". beamformer channels commands connectivity datasets decoding forward gui inverse_sparse io"
# Minimal second half
- os: linux
env: DEPS=minimial
CONDA_DEPENDENCIES="numpy scipy matplotlib"
PIP_DEPENDENCIES="codecov nose-timer nose-faulthandler"
MNE_DIRS="minimum_norm preprocessing realtime simulation stats time_frequency viz"
# No data + style testing
- os: linux
env: DEPS=nodata MNE_DONTWRITE_HOME=true MNE_FORCE_SERIAL=true MNE_SKIP_NETWORK_TEST=1
CONDA_DEPENDENCIES="numpy scipy matplotlib sphinx"
PIP_DEPENDENCIES="flake8 numpydoc codespell git+git://github.com/PyCQA/pydocstyle.git codecov nose-timer nose-faulthandler check-manifest"
MNE_DIRS=""
# Setup anaconda
before_install:
- git clone https://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
- if [ "${DEPS}" == "" && "${TRAVIS_OS_NAME}" == "linux" ]; then
curl https://staff.washington.edu/larsoner/minimal_cmds.tar.gz | tar xz;
export MNE_ROOT="${PWD}/minimal_cmds";
export NEUROMAG2FT_ROOT="${PWD}/minimal_cmds/bin";
source ${MNE_ROOT}/bin/mne_setup_sh;
fi;
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
fi;
install:
# Suppress the parallel outputs for logging cleanliness
- python setup.py build
- python setup.py install
- python -c "import mne; mne.sys_info()"
- SRC_DIR=$(pwd)
- cd ~
# Trigger download of testing data. Note that
# the testing dataset has been constructed to contain the necessary
# files to act as a FREESURFER_HOME for the coreg tests
- if [ "${DEPS}" != "nodata" ]; then
python -c 'import mne; mne.datasets.testing.data_path(verbose=True)';
if [ "${DEPS}" == "" && "${TRAVIS_OS_NAME}" == "linux" ]; then
export FREESURFER_HOME=$(python -c 'import mne; print(mne.datasets.testing.data_path())');
export MNE_SKIP_FS_FLASH_CALL=1;
fi;
else
export MNE_SKIP_TESTING_DATASET_TESTS=true;
fi;
- MNE_DIR=$(python -c 'import mne;print(mne.__path__[0])')
# We run two versions: one out of the source directory (that makes
# coveralls coverage work), and one out of the install directory (that
# ensures we have included all necessary files).
- if [ "${TEST_LOCATION}" == "install" ]; then
ln -s ${SRC_DIR}/mne/io/tests/data ${MNE_DIR}/io/tests/data;
ln -s ${SRC_DIR}/mne/io/bti/tests/data ${MNE_DIR}/io/bti/tests/data;
ln -s ${SRC_DIR}/mne/io/edf/tests/data ${MNE_DIR}/io/edf/tests/data;
ln -s ${SRC_DIR}/mne/io/kit/tests/data ${MNE_DIR}/io/kit/tests/data;
ln -s ${SRC_DIR}/mne/io/brainvision/tests/data ${MNE_DIR}/io/brainvision/tests/data;
ln -s ${SRC_DIR}/mne/io/egi/tests/data ${MNE_DIR}/io/egi/tests/data;
ln -s ${SRC_DIR}/mne/io/nicolet/tests/data ${MNE_DIR}/io/nicolet/tests/data;
ln -s ${SRC_DIR}/mne/preprocessing/tests/data ${MNE_DIR}/preprocessing/tests/data;
ln -s ${SRC_DIR}/setup.cfg ${MNE_DIR}/../setup.cfg;
ln -s ${SRC_DIR}/.coveragerc ${MNE_DIR}/../.coveragerc;
cd ${MNE_DIR}/../;
COVERAGE=;
else
cd ${SRC_DIR};
COVERAGE=--with-coverage;
fi;
script:
# OSX runs ~2x slower than Linux on Travis, so skip any slow ones there
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
CONDITION='!slow_test';
else
CONDITION='!ultra_slow_test';
fi;
# Determine directories to test
- if [ "${MNE_DIRS}" != "" ]; then
USE_DIRS="";
for DIR in ${MNE_DIRS}; do
USE_DIRS="mne/${DIR}/tests ${USE_DIRS}";
done;
else
USE_DIRS="mne/";
fi;
- echo Testing with -a "${CONDITION}" ${COVERAGE} ${USE_DIRS}
- nosetests -a "${CONDITION}" --with-timer --timer-top-n 30 --timer-ok 5 --timer-warning 30 --verbosity=2 ${COVERAGE} ${USE_DIRS};
- if [ "${DEPS}" == "nodata" ]; then
make pep;
check-manifest --ignore doc,logo,mne/io/*/tests/data*,mne/io/tests/data,mne/preprocessing/tests/data;
fi;
after_success:
# Need to run from source dir to exectue "git" commands
- if [ "${TEST_LOCATION}" == "src" ]; then
echo "Running codecov";
cd ${SRC_DIR};
codecov;
fi;