Skip to content

MAINT: update numpy dependency; add Python 3.6 #506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ env:
- DEPENDS="numpy scipy matplotlib h5py pillow"
- PYDICOM=1
- INSTALL_TYPE="setup"
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
python:
- 3.3
- 3.4
- 3.5
- 3.6
matrix:
include:
- python: 2.7
Expand All @@ -35,19 +37,19 @@ matrix:
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS=numpy==1.5.1 PYDICOM=0
- DEPENDS=numpy==1.6.0 PYDICOM=0
# Absolute minimum dependencies plus oldest MPL
# Check these against:
# nibabel/info.py
# doc/source/installation.rst
# requirements.txt
# .travis.yml
- python: 2.7
env:
- DEPENDS="numpy==1.5.1 matplotlib==1.3.1" PYDICOM=0
- DEPENDS="numpy==1.6.0 matplotlib==1.3.1" PYDICOM=0
# Minimum pydicom dependency
- python: 2.7
env:
- DEPENDS="numpy==1.5.1 pydicom==0.9.7 pillow==2.6"
- DEPENDS="numpy==1.6.0 pydicom==0.9.7 pillow==2.6"
# test against numpy 1.7
- python: 2.7
env:
Expand All @@ -59,7 +61,7 @@ matrix:
# test against pre-release builds
- python: 2.7
env:
- EXTRA_PIP_FLAGS="--pre"
- EXTRA_PIP_FLAGS="--pre --find-links=$EXTRA_WHEELS"
# Documentation doctests
- python: 2.7
env:
Expand All @@ -84,12 +86,14 @@ matrix:
- DOC_DOC_TEST=1
before_install:
- source tools/travis_tools.sh
- python -m pip install --upgrade pip
- pip install --upgrade virtualenv
- virtualenv --python=python venv
- source venv/bin/activate
- python --version # just to check
- pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
- pip install -U pip wheel # needed at one point
- retry pip install nose flake8 mock # always
- wheelhouse_pip_install $EXTRA_PIP_FLAGS $DEPENDS
- pip install $EXTRA_PIP_FLAGS $DEPENDS
# pydicom <= 0.9.8 doesn't install on python 3
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
if [ "$PYDICOM" == "1" ]; then
Expand All @@ -111,13 +115,13 @@ install:
elif [ "$INSTALL_TYPE" == "sdist" ]; then
python setup_egg.py egg_info # check egg_info while we're here
python setup_egg.py sdist
wheelhouse_pip_install $EXTRA_PIP_FLAGS dist/*.tar.gz
pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup_egg.py bdist_wheel
wheelhouse_pip_install $EXTRA_PIP_FLAGS dist/*.whl
pip install $EXTRA_PIP_FLAGS dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
wheelhouse_pip_install $EXTRA_PIP_FLAGS -r requirements.txt
pip install $EXTRA_PIP_FLAGS -r requirements.txt
python setup.py install
fi
# Point to nibabel data directory
Expand Down
8 changes: 4 additions & 4 deletions doc/source/coordinate_systems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ middle voxel in the EPI data array like this:
:nofigs:

>>> n_i, n_j, n_k = epi_img_data.shape
>>> center_i = (n_i - 1) / 2.
>>> center_j = (n_j - 1) / 2.
>>> center_k = (n_k - 1) / 2.
>>> center_i = (n_i - 1) // 2 # // for integer division
>>> center_j = (n_j - 1) // 2
>>> center_k = (n_k - 1) // 2
>>> center_i, center_j, center_k
(26.0, 30.0, 16.0)
(26, 30, 16)
>>> center_vox_value = epi_img_data[center_i, center_j, center_k]
>>> center_vox_value
81.549287796020508
Expand Down
4 changes: 2 additions & 2 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Requirements
requirements.txt
.travis.yml

* Python_ 2.7 or greater
* NumPy_ 1.5 or greater
* Python_ 2.7, or >= 3.4
* NumPy_ 1.6 or greater
* SciPy_ (optional, for full SPM-ANALYZE support)
* PyDICOM_ 0.9.7 or greater (optional, for DICOM support)
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/nifti_images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Now we save the image and load it again:
The data array has the scaling applied:

>>> scaled_img.get_data()
memmap([[[ 10., 12., 14., 16.],
...([[[ 10., 12., 14., 16.],
[ 18., 20., 22., 24.],
[ 26., 28., 30., 32.]],
<BLANKLINE>
Expand Down
2 changes: 1 addition & 1 deletion nibabel/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def cmp_pkg_version(version_str, pkg_version_str=__version__):
# doc/source/installation.rst
# requirements.txt
# .travis.yml
NUMPY_MIN_VERSION = '1.5.1'
NUMPY_MIN_VERSION = '1.6.0'
PYDICOM_MIN_VERSION = '0.9.7'

# Main setup parameters
Expand Down