44# for it to be on multiple physical lines, so long as you remember: - There
55# can't be any leading "-"s - All newlines will be removed, so use ";"s
66
7+ os : linux
78dist : xenial
8- sudo : true
99language : python
10-
1110cache : pip
11+
1212env :
1313 global :
1414 - SETUP_REQUIRES="pip setuptools>=30.3.0 wheel"
1515 - DEPENDS="numpy scipy matplotlib h5py pillow pydicom indexed_gzip"
1616 - INSTALL_TYPE="setup"
1717 - CHECK_TYPE="test"
18- - OLD_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
1918 - EXTRA_WHEELS="https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com"
2019 - PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
21- - EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS --find-links=$OLD_WHEELS "
20+ - EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
2221 - PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
2322
2423python :
25- - 3.6
2624 - 3.7
2725 - 3.8
2826
29- matrix :
27+ jobs :
3028 include :
3129 # Basic dependencies only
32- - python : 3.5
30+ - python : 3.6
3331 env :
3432 - DEPENDS="-r requirements.txt"
3533 # Clean install
36- - python : 3.5
34+ - python : 3.6
3735 env :
3836 - DEPENDS=""
3937 - CHECK_TYPE=skiptests
4038 # Absolute minimum dependencies
41- - python : 3.5
39+ - python : 3.6
4240 env :
4341 - SETUP_REQUIRES="setuptools==30.3.0"
4442 - DEPENDS="-r min-requirements.txt"
4543 # Absolute minimum dependencies plus oldest MPL
46- - python : 3.5
44+ - python : 3.6
4745 env :
48- - DEPENDS="-r min-requirements.txt matplotlib==1.3.1 "
46+ - DEPENDS="-r min-requirements.txt matplotlib==1.5.3 "
4947 # Minimum pydicom dependency
50- - python : 3.5
48+ - python : 3.6
5149 env :
5250 - DEPENDS="-r min-requirements.txt pydicom==0.9.9 pillow==2.6"
5351 # pydicom master branch
54- - python : 3.5
52+ - python : 3.6
5553 env :
5654 - DEPENDS="numpy git+https://github.com/pydicom/pydicom.git@master"
57- # test 3.7 against pre-release builds of everything
58- - python : 3.7
55+ # test 3.8 against pre-release builds of everything
56+ - python : 3.8
57+ env :
58+ - EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
59+ # OSX Python support is basically accidental. Take whatever version we can
60+ # get and test with full dependencies...
61+ - os : osx
62+ language : minimal
63+ # and pre-releases. No min-requirements.txt because we can't assume a wheel that old.
64+ - os : osx
65+ language : minimal
5966 env :
6067 - EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
61- - python : 3.5
68+ # Test that PyPI installs from source pass
69+ - python : 3.6
6270 env :
6371 - INSTALL_TYPE=sdist
64- - python : 3.5
72+ # Wheels (binary distributions)
73+ - python : 3.6
6574 env :
6675 - INSTALL_TYPE=wheel
67- - python : 3.5
76+ # Install from git archive (e.g., https://github.com/nipy/nibabel/archive/master.zip)
77+ - python : 3.6
6878 env :
6979 - INSTALL_TYPE=archive
70- - python : 3.5
80+ # Run flake8... Might not be needed now we have pep8speaks
81+ - python : 3.6
7182 env :
7283 - CHECK_TYPE="style"
7384 # Documentation doctests
74- - python : 3.5
85+ - python : 3.6
7586 env :
7687 - CHECK_TYPE="doc"
7788
7889# Set up virtual environment, build package, build from depends
7990before_install :
80- - travis_retry python -m pip install --upgrade pip virtualenv
81- - virtualenv --python=python venv
91+ - travis_retry python3 -m pip install --upgrade pip virtualenv
92+ - virtualenv --python=python3 venv
8293 - source venv/bin/activate
83- - python --version # just to check
84- - travis_retry pip install -U $SETUP_REQUIRES
94+ - python3 --version # just to check
95+ - travis_retry python3 -m pip install -U $SETUP_REQUIRES
96+ - which python3
97+ - which pip
8598 - |
8699 if [ "$INSTALL_TYPE" == "sdist" ]; then
87- python setup.py egg_info # check egg_info while we're here
88- python setup.py sdist
100+ python3 setup.py egg_info # check egg_info while we're here
101+ python3 setup.py sdist
89102 export ARCHIVE=$( ls dist/*.tar.gz )
90103 elif [ "$INSTALL_TYPE" == "wheel" ]; then
91- python setup.py bdist_wheel
104+ python3 setup.py bdist_wheel
92105 export ARCHIVE=$( ls dist/*.whl )
93106 elif [ "$INSTALL_TYPE" == "archive" ]; then
94107 export ARCHIVE="package.tar.gz"
@@ -100,19 +113,19 @@ before_install:
100113install :
101114 - |
102115 if [ "$INSTALL_TYPE" == "setup" ]; then
103- python setup.py install
116+ python3 setup.py install
104117 else
105118 pip install $EXTRA_PIP_FLAGS $ARCHIVE
106119 fi
107120 # Basic import check
108- - python -c 'import nibabel; print(nibabel.__version__)'
121+ - python3 -c 'import nibabel; print(nibabel.__version__)'
109122 - if [ "$CHECK_TYPE" == "skiptests" ]; then exit 0; fi
110123
111124before_script :
112125 # Point to nibabel data directory
113126 - export NIBABEL_DATA_DIR="$PWD/nibabel-data"
114127 # Because nibabel is already installed, will just look up the extra
115- - pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
128+ - python3 -m pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
116129
117130# command to run tests, e.g. python setup.py test
118131script :
@@ -122,20 +135,19 @@ script:
122135 flake8 nibabel
123136 elif [ "${CHECK_TYPE}" == "doc" ]; then
124137 cd doc
125- make html;
126- make doctest;
138+ make html && make doctest
127139 elif [ "${CHECK_TYPE}" == "test" ]; then
128140 # Change into an innocuous directory and find tests from installation
129141 mkdir for_testing
130142 cd for_testing
131143 cp ../.coveragerc .
132- nosetests --with- doctest --with-coverage --cover-package nibabel nibabel
144+ pytest --doctest-modules --cov nibabel -v --pyargs nibabel
133145 else
134146 false
135147 fi
136148
137149after_script :
138- - travis_retry pip install codecov
150+ - travis_retry python3 -m pip install codecov
139151 - codecov
140152
141153notifications :
0 commit comments