Skip to content

Commit b8017c9

Browse files
Merge pull request #506 from matthew-brett/extend-testing
MAINT: update numpy dependency; add Python 3.6 This will also trigger tests against the latest wheels.
2 parents e7f23f6 + 98dcd77 commit b8017c9

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

.travis.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ env:
2323
- DEPENDS="numpy scipy matplotlib h5py pillow"
2424
- PYDICOM=1
2525
- INSTALL_TYPE="setup"
26+
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
27+
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
2628
python:
27-
- 3.3
2829
- 3.4
2930
- 3.5
31+
- 3.6
3032
matrix:
3133
include:
3234
- python: 2.7
@@ -35,19 +37,19 @@ matrix:
3537
# Absolute minimum dependencies
3638
- python: 2.7
3739
env:
38-
- DEPENDS=numpy==1.5.1 PYDICOM=0
40+
- DEPENDS=numpy==1.6.0 PYDICOM=0
3941
# Absolute minimum dependencies plus oldest MPL
4042
# Check these against:
43+
# nibabel/info.py
4144
# doc/source/installation.rst
4245
# requirements.txt
43-
# .travis.yml
4446
- python: 2.7
4547
env:
46-
- DEPENDS="numpy==1.5.1 matplotlib==1.3.1" PYDICOM=0
48+
- DEPENDS="numpy==1.6.0 matplotlib==1.3.1" PYDICOM=0
4749
# Minimum pydicom dependency
4850
- python: 2.7
4951
env:
50-
- DEPENDS="numpy==1.5.1 pydicom==0.9.7 pillow==2.6"
52+
- DEPENDS="numpy==1.6.0 pydicom==0.9.7 pillow==2.6"
5153
# test against numpy 1.7
5254
- python: 2.7
5355
env:
@@ -59,7 +61,7 @@ matrix:
5961
# test against pre-release builds
6062
- python: 2.7
6163
env:
62-
- EXTRA_PIP_FLAGS="--pre"
64+
- EXTRA_PIP_FLAGS="--pre --find-links=$EXTRA_WHEELS"
6365
# Documentation doctests
6466
- python: 2.7
6567
env:
@@ -84,12 +86,14 @@ matrix:
8486
- DOC_DOC_TEST=1
8587
before_install:
8688
- source tools/travis_tools.sh
89+
- python -m pip install --upgrade pip
90+
- pip install --upgrade virtualenv
8791
- virtualenv --python=python venv
8892
- source venv/bin/activate
8993
- python --version # just to check
90-
- pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
94+
- pip install -U pip wheel # needed at one point
9195
- retry pip install nose flake8 mock # always
92-
- wheelhouse_pip_install $EXTRA_PIP_FLAGS $DEPENDS
96+
- pip install $EXTRA_PIP_FLAGS $DEPENDS
9397
# pydicom <= 0.9.8 doesn't install on python 3
9498
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
9599
if [ "$PYDICOM" == "1" ]; then
@@ -111,13 +115,13 @@ install:
111115
elif [ "$INSTALL_TYPE" == "sdist" ]; then
112116
python setup_egg.py egg_info # check egg_info while we're here
113117
python setup_egg.py sdist
114-
wheelhouse_pip_install $EXTRA_PIP_FLAGS dist/*.tar.gz
118+
pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
115119
elif [ "$INSTALL_TYPE" == "wheel" ]; then
116120
pip install wheel
117121
python setup_egg.py bdist_wheel
118-
wheelhouse_pip_install $EXTRA_PIP_FLAGS dist/*.whl
122+
pip install $EXTRA_PIP_FLAGS dist/*.whl
119123
elif [ "$INSTALL_TYPE" == "requirements" ]; then
120-
wheelhouse_pip_install $EXTRA_PIP_FLAGS -r requirements.txt
124+
pip install $EXTRA_PIP_FLAGS -r requirements.txt
121125
python setup.py install
122126
fi
123127
# Point to nibabel data directory

doc/source/coordinate_systems.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ middle voxel in the EPI data array like this:
9797
:nofigs:
9898

9999
>>> n_i, n_j, n_k = epi_img_data.shape
100-
>>> center_i = (n_i - 1) / 2.
101-
>>> center_j = (n_j - 1) / 2.
102-
>>> center_k = (n_k - 1) / 2.
100+
>>> center_i = (n_i - 1) // 2 # // for integer division
101+
>>> center_j = (n_j - 1) // 2
102+
>>> center_k = (n_k - 1) // 2
103103
>>> center_i, center_j, center_k
104-
(26.0, 30.0, 16.0)
104+
(26, 30, 16)
105105
>>> center_vox_value = epi_img_data[center_i, center_j, center_k]
106106
>>> center_vox_value
107107
81.549287796020508

doc/source/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Requirements
8686
requirements.txt
8787
.travis.yml
8888
89-
* Python_ 2.7 or greater
90-
* NumPy_ 1.5 or greater
89+
* Python_ 2.7, or >= 3.4
90+
* NumPy_ 1.6 or greater
9191
* SciPy_ (optional, for full SPM-ANALYZE support)
9292
* PyDICOM_ 0.9.7 or greater (optional, for DICOM support)
9393
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)

doc/source/nifti_images.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Now we save the image and load it again:
401401
The data array has the scaling applied:
402402

403403
>>> scaled_img.get_data()
404-
memmap([[[ 10., 12., 14., 16.],
404+
...([[[ 10., 12., 14., 16.],
405405
[ 18., 20., 22., 24.],
406406
[ 26., 28., 30., 32.]],
407407
<BLANKLINE>

nibabel/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def cmp_pkg_version(version_str, pkg_version_str=__version__):
186186
# doc/source/installation.rst
187187
# requirements.txt
188188
# .travis.yml
189-
NUMPY_MIN_VERSION = '1.5.1'
189+
NUMPY_MIN_VERSION = '1.6.0'
190190
PYDICOM_MIN_VERSION = '0.9.7'
191191

192192
# Main setup parameters

0 commit comments

Comments
 (0)