diff --git a/.travis.yml b/.travis.yml index 661959c6ec..3545a5f573 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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: @@ -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: @@ -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 @@ -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 diff --git a/doc/source/coordinate_systems.rst b/doc/source/coordinate_systems.rst index 93103fae76..600ed1d578 100644 --- a/doc/source/coordinate_systems.rst +++ b/doc/source/coordinate_systems.rst @@ -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 diff --git a/doc/source/installation.rst b/doc/source/installation.rst index a8d69d3bb3..6b53841c05 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -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) diff --git a/doc/source/nifti_images.rst b/doc/source/nifti_images.rst index 8b78fd1148..32c9bee621 100644 --- a/doc/source/nifti_images.rst +++ b/doc/source/nifti_images.rst @@ -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.]], diff --git a/nibabel/info.py b/nibabel/info.py index 7f269eec1b..5a55e12fec 100644 --- a/nibabel/info.py +++ b/nibabel/info.py @@ -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