From cb7187e3ca6544d2e8babe708686dfa49045b57a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 24 Sep 2014 16:34:50 -0500 Subject: [PATCH 01/70] Update build requirements and documentation --- DEPENDS.txt | 11 +++++------ requirements.txt | 7 +++---- setup.py | 42 +++++++++++++++++++++++++----------------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index eb7cc09c..1b301ca2 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -1,11 +1,8 @@ Build Requirements ------------------ -* `Python >= 2.5 `__ +* `Python >= 2.6 `__ * `Numpy >= 1.6 `__ -* `Cython >= 0.17 `__ - -`Matplotlib >= 1.0 `__ is needed to generate the -examples in the documentation. +* `Cython >= 0.19 `__ You can use pip to automatically install the base dependencies as follows:: @@ -13,8 +10,10 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- -* `SciPy >= 0.10 `__ +* `SciPy >= 0.9 `__ * `NetworkX >= 1.8 `__ +`Matplotlib >= 1.0 `__ is needed to generate the +examples in the documentation. Known build errors ------------------ diff --git a/requirements.txt b/requirements.txt index 7543d867..1af07ec6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -cython>=0.17 -matplotlib>=1.0 +cython>=0.19 numpy>=1.6 -six>=1.3.0 -networkx>=1.8.0 +scipy>=0.9 +six>=1.3 diff --git a/setup.py b/setup.py index 640329fc..c51ef097 100755 --- a/setup.py +++ b/setup.py @@ -18,25 +18,33 @@ URL = 'http://scikit-image.org' LICENSE = 'Modified BSD' DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image' VERSION = '0.11dev' -PYTHON_VERSION = (2, 5) +PYTHON_VERSION = (2, 6) + +import re +import os +import sys + +import setuptools +from distutils.command.build_py import build_py + # These are manually checked. # These packages are sometimes installed outside of the setuptools scope -DEPENDENCIES = { - 'numpy': (1, 6), - } - -# Only require Cython if we have a developer checkout -if VERSION.endswith('dev'): - DEPENDENCIES['Cython'] = (0, 17) - - - -import os -import sys -import re -import setuptools -from distutils.command.build_py import build_py +DEPENDENCIES = {} +with open('requirements.txt') as fid: + data = fid.read().decode('utf-8', 'replace') +for line in data.splitlines(): + pkg, _, version_info = line.partition('>=') + # Only require Cython if we have a developer checkout + if pkg.lower() == 'cython' and not VERSION.endswith('dev'): + continue + version = [] + for part in re.split('\D+', version_info): + try: + version.append(int(part)) + except ValueError: + pass + DEPENDENCIES[pkg.lower()] = version def configuration(parent_package='', top_path=None): @@ -142,7 +150,7 @@ if __name__ == "__main__": configuration=configuration, install_requires=[ - "six>=1.3" + "six>=%s" % DEPENDENCIES['six'] ], packages=setuptools.find_packages(exclude=['doc']), include_package_data=True, From d440cade5110f88dc8925e8c137d7275b6756194 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 05:08:02 -0500 Subject: [PATCH 02/70] Reorganized dependencies in DEPENDS.txt. --- DEPENDS.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 1b301ca2..027bfa49 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -3,6 +3,7 @@ Build Requirements * `Python >= 2.6 `__ * `Numpy >= 1.6 `__ * `Cython >= 0.19 `__ +* `Six >=1.3 `__ You can use pip to automatically install the base dependencies as follows:: @@ -11,9 +12,6 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- * `SciPy >= 0.9 `__ -* `NetworkX >= 1.8 `__ -`Matplotlib >= 1.0 `__ is needed to generate the -examples in the documentation. Known build errors ------------------ @@ -35,6 +33,11 @@ Optional Requirements You can use this scikit with the basic requirements listed above, but some functionality is only available with the following installed: +* `NetworkX >= 1.8 `__ + +* `Matplotlib >= 1.0 `__ is needed to generate the +examples in the documentation. + * `PyQt4 `__ The ``qt`` plugin that provides ``imshow(x, fancy=True)`` and `skivi`. From c92f54c54daf7c5305c8be3bd83d16ac7151c4ba Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 05:31:45 -0500 Subject: [PATCH 03/70] Fix install_requires string formatting --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c51ef097..38288356 100755 --- a/setup.py +++ b/setup.py @@ -150,7 +150,7 @@ if __name__ == "__main__": configuration=configuration, install_requires=[ - "six>=%s" % DEPENDENCIES['six'] + "six>=%s" % '.'.join(str(d) for d in DEPENDENCIES['six']) ], packages=setuptools.find_packages(exclude=['doc']), include_package_data=True, From 75448b8579aa042b28bf224cf8f8dea30e005c81 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 05:45:12 -0500 Subject: [PATCH 04/70] Fix python 3 unicode error --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 38288356..ec39034c 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ from distutils.command.build_py import build_py # These are manually checked. # These packages are sometimes installed outside of the setuptools scope DEPENDENCIES = {} -with open('requirements.txt') as fid: +with open('requirements.txt', 'rb') as fid: data = fid.read().decode('utf-8', 'replace') for line in data.splitlines(): pkg, _, version_info = line.partition('>=') From 984782ee54735d1f4541928f426d35b5b0da18c0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 05:59:48 -0500 Subject: [PATCH 05/70] Remove unicode decode --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ec39034c..1fda18f5 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ from distutils.command.build_py import build_py # These packages are sometimes installed outside of the setuptools scope DEPENDENCIES = {} with open('requirements.txt', 'rb') as fid: - data = fid.read().decode('utf-8', 'replace') + data = fid.read() for line in data.splitlines(): pkg, _, version_info = line.partition('>=') # Only require Cython if we have a developer checkout From 075b40b92ed53f7da96da36a147d9d90c785b138 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 06:35:35 -0500 Subject: [PATCH 06/70] Fix python3.3+ builds --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 1fda18f5..1a15582d 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ from distutils.command.build_py import build_py # These packages are sometimes installed outside of the setuptools scope DEPENDENCIES = {} with open('requirements.txt', 'rb') as fid: - data = fid.read() + data = fid.read().decode('utf-8', 'replace') for line in data.splitlines(): pkg, _, version_info = line.partition('>=') # Only require Cython if we have a developer checkout @@ -44,7 +44,7 @@ for line in data.splitlines(): version.append(int(part)) except ValueError: pass - DEPENDENCIES[pkg.lower()] = version + DEPENDENCIES[pkg.lower()] = tuple(version) def configuration(parent_package='', top_path=None): From 78bcf17c18ec5c5895bfb6bd2153ff0f947d6dd0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 27 Sep 2014 07:31:52 -0500 Subject: [PATCH 07/70] Look for version instead of version --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 1a15582d..4058b602 100755 --- a/setup.py +++ b/setup.py @@ -99,6 +99,8 @@ def check_requirements(): % PYTHON_VERSION) for package_name, min_version in DEPENDENCIES.items(): + if package_name == 'cython': + package_name = 'Cython' dep_error = False try: package = __import__(package_name) From 6a2f682552f0a09a9508fef91485400f69a91001 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 28 Sep 2014 04:56:56 -0500 Subject: [PATCH 08/70] Add description for networkx optional requirment --- DEPENDS.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 027bfa49..8cf3388d 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -33,7 +33,8 @@ Optional Requirements You can use this scikit with the basic requirements listed above, but some functionality is only available with the following installed: -* `NetworkX >= 1.8 `__ +* `NetworkX >= 1.8 `__ is needed to use region +adjacency graph (RAG)-based segmentation functions. * `Matplotlib >= 1.0 `__ is needed to generate the examples in the documentation. From 7157c197163300a39a6cce6b090e59e14d4cc98c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:12:19 -0500 Subject: [PATCH 09/70] Make matplotlib a requirement. --- .travis.yml | 11 ++++++++--- DEPENDS.txt | 4 +--- requirements.txt | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f31692d..f4309e2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,12 @@ before_install: travis_retry conda create -n test $ENV six scipy pip flake8 nose; source activate test; fi - - travis_retry pip install coveralls pillow + - travis_retry pip install wheel; + - if [[ $END != python=2.6* ]] then + travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; + else + pip install matplotlib==1.0 + end - python check_bento_build.py install: @@ -74,16 +79,16 @@ script: # https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/-DLG2ZdTkw0 - if [[ $ENV == python=3.2 ]]; then travis_retry sudo apt-get install python3-pyqt4; - travis_retry pip install matplotlib==1.3.1; travis_retry pip install networkx; else - travis_retry conda install matplotlib pyqt networkx; + travis_retry conda install networkx; sudo cp ~/miniconda/envs/test/include/png* /usr/include; rm ~/miniconda/envs/test/lib/libm-2.5.so; rm ~/miniconda/envs/test/lib/libm.*; sudo apt-get install libtiff4-dev libwebp-dev xcftools; travis_retry pip install imread; travis_retry pip install pyfits; + travis_retry pip install pillow; fi - sudo apt-get install libfreeimage3 # TODO: update when SimpleITK become available on py34 or hopefully pip diff --git a/DEPENDS.txt b/DEPENDS.txt index 8cf3388d..9d6092bb 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -4,6 +4,7 @@ Build Requirements * `Numpy >= 1.6 `__ * `Cython >= 0.19 `__ * `Six >=1.3 `__ +* `Matplotlib >= 1.0 `__ You can use pip to automatically install the base dependencies as follows:: @@ -36,9 +37,6 @@ functionality is only available with the following installed: * `NetworkX >= 1.8 `__ is needed to use region adjacency graph (RAG)-based segmentation functions. -* `Matplotlib >= 1.0 `__ is needed to generate the -examples in the documentation. - * `PyQt4 `__ The ``qt`` plugin that provides ``imshow(x, fancy=True)`` and `skivi`. diff --git a/requirements.txt b/requirements.txt index 1af07ec6..9bb56a8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ cython>=0.19 +matplotlib>=1.0 numpy>=1.6 scipy>=0.9 six>=1.3 From 75365cf893f26d31cce415a82e69e827d5b4225b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:18:15 -0500 Subject: [PATCH 10/70] Fix travis syntax errors --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4309e2f..d9884f87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,11 +46,11 @@ before_install: source activate test; fi - travis_retry pip install wheel; - - if [[ $END != python=2.6* ]] then + - if [[ $END != python=2.6* ]]; then travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; else pip install matplotlib==1.0 - end + fi - python check_bento_build.py install: From 74f26316c79159810f71daba7a423f4265692eb1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:21:58 -0500 Subject: [PATCH 11/70] Fix another travis syntax error --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d9884f87..8fea2c54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,7 @@ before_install: - if [[ $END != python=2.6* ]]; then travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; else - pip install matplotlib==1.0 + pip install matplotlib==1.0; fi - python check_bento_build.py From fc2c319f225a769d34ce5131ea593127ddc4f359 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:23:29 -0500 Subject: [PATCH 12/70] Move matplotlib to a runtime requirement --- DEPENDS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 9d6092bb..659a0655 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -4,7 +4,6 @@ Build Requirements * `Numpy >= 1.6 `__ * `Cython >= 0.19 `__ * `Six >=1.3 `__ -* `Matplotlib >= 1.0 `__ You can use pip to automatically install the base dependencies as follows:: @@ -13,6 +12,7 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- * `SciPy >= 0.9 `__ +* `Matplotlib >= 1.0 `__ Known build errors ------------------ From 606807ee78d7d061b12a7301554fb98cb61236b9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:23:59 -0500 Subject: [PATCH 13/70] Remove redundant 'usage requirements' --- DEPENDS.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 659a0655..25bdf700 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -24,11 +24,6 @@ example at ``C:\Python26\Lib\distutils\distutils.cfg``) to contain:: [build] compiler=mingw32 - -Usage Requirements ------------------- -* `Scipy `__ - Optional Requirements --------------------- You can use this scikit with the basic requirements listed above, but some From e8123999ba55a3e1e5da51b885a5c039076cdc96 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:25:15 -0500 Subject: [PATCH 14/70] Replace PIL with matplotlib in build_versions.py --- tools/build_versions.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/build_versions.py b/tools/build_versions.py index 5e33dbfa..f598866e 100755 --- a/tools/build_versions.py +++ b/tools/build_versions.py @@ -4,12 +4,9 @@ from __future__ import print_function import numpy as np import scipy as sp -from PIL import Image +import matplotlib as mpl import six -for m in (np, sp, Image, six): +for m in (np, sp, mpl, six): if not m is None: - if m is Image: - print('PIL'.rjust(10), ' ', Image.VERSION) - else: - print(m.__name__.rjust(10), ' ', m.__version__) + print(m.__name__.rjust(10), ' ', m.__version__) From 83907807234890f34a4bea399c55e96b08e3f54d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:30:16 -0500 Subject: [PATCH 15/70] Fix typo in travis preventing mpl 1.0 from installing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8fea2c54..191a60e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ before_install: source activate test; fi - travis_retry pip install wheel; - - if [[ $END != python=2.6* ]]; then + - if [[ $ENV != python=2.6* ]]; then travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; else pip install matplotlib==1.0; From cb3b5c5e4c50a0c4dcfab34d60337fc43d8690de Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 30 Sep 2014 21:36:26 -0500 Subject: [PATCH 16/70] Install matplotlib build dependencies --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 191a60e0..db73c829 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ before_install: - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update + - sudo apt-get build-dep python-matplotlib # Python 3.2 is not supported by Miniconda, so we use the package manager for that run. # NumPy has a bug in python 3 that is only fixed in the latest version, From 36e5628e4f444b69a4817aa3cd90dd7183a5057c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 1 Oct 2014 05:02:24 -0500 Subject: [PATCH 17/70] Fix matplotlib base version and install libjpeg-dev --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index db73c829..0e90238e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_install: - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update - - sudo apt-get build-dep python-matplotlib + - sudo apt-get build-dep python-matplotlib libjpeg-dev # Python 3.2 is not supported by Miniconda, so we use the package manager for that run. # NumPy has a bug in python 3 that is only fixed in the latest version, @@ -50,7 +50,7 @@ before_install: - if [[ $ENV != python=2.6* ]]; then travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; else - pip install matplotlib==1.0; + pip install matplotlib==1.0.1; fi - python check_bento_build.py From 3b1b3f64af3f9d62fc8bde4b83b2c558c3010015 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 1 Oct 2014 05:02:59 -0500 Subject: [PATCH 18/70] Install libjpeg-dev, not build-dep libjpeg-dev --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e90238e..33b6059b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,8 @@ before_install: - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update - - sudo apt-get build-dep python-matplotlib libjpeg-dev + - sudo apt-get build-dep python-matplotlib + - sudo apt-get install libjpeg-dev # Python 3.2 is not supported by Miniconda, so we use the package manager for that run. # NumPy has a bug in python 3 that is only fixed in the latest version, From 15fb553cfb77a540232eff3e4faa1590c4ba5157 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 1 Oct 2014 05:28:08 -0500 Subject: [PATCH 19/70] Try explicit apt installs for matplotlib --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33b6059b..62d55886 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,7 @@ before_install: - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update - - sudo apt-get build-dep python-matplotlib - - sudo apt-get install libjpeg-dev + - sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev # Python 3.2 is not supported by Miniconda, so we use the package manager for that run. # NumPy has a bug in python 3 that is only fixed in the latest version, From ac6fbaa4ef4b6e0645546fa3adc55b90ea3d9729 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 15:24:01 -0500 Subject: [PATCH 20/70] Allow for unicode version info --- setup.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 4058b602..56f0039d 100755 --- a/setup.py +++ b/setup.py @@ -82,14 +82,19 @@ version='%s' def get_package_version(package): version = [] for version_attr in ('version', 'VERSION', '__version__'): - if hasattr(package, version_attr) \ - and isinstance(getattr(package, version_attr), str): - version_info = getattr(package, version_attr, '') - for part in re.split('\D+', version_info): - try: - version.append(int(part)) - except ValueError: - pass + version_info = getattr(package, version_attr, None) + try: + parts = re.split('\D+', version_info) + except TypeError: + continue + for part in parts: + try: + version.append(int(part)) + except ValueError: + pass + if not version: + print(package) + return tuple(version) @@ -112,6 +117,7 @@ def check_requirements(): dep_error = True if dep_error: + print('***********', package_version) raise ImportError('You need `%s` version %d.%d or later.' \ % ((package_name, ) + min_version)) From 0d29ded91452d25ea3ed076b2164c656899fde80 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 15:58:27 -0500 Subject: [PATCH 21/70] Try a newer mpl due to Tkinter err on install --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62d55886..594145d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,8 +49,8 @@ before_install: - travis_retry pip install wheel; - if [[ $ENV != python=2.6* ]]; then travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; - else - pip install matplotlib==1.0.1; + else + pip install matplotlib==1.1.0; fi - python check_bento_build.py From 124db3274fb9099bc1f15521c9a92d5fc6773611 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 15:58:28 -0500 Subject: [PATCH 22/70] Fix error in viewer test when mpl is present but not qt. --- skimage/viewer/utils/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skimage/viewer/utils/core.py b/skimage/viewer/utils/core.py index 19a5c73d..90521f9c 100644 --- a/skimage/viewer/utils/core.py +++ b/skimage/viewer/utils/core.py @@ -15,6 +15,9 @@ try: if 'agg' not in mpl.get_backend().lower(): print("Recommended matplotlib backend is `Agg` for full " "skimage.viewer functionality.") + else: + FigureCanvasQTAgg = object + LinearSegmentedColormap = object except ImportError: FigureCanvasQTAgg = object # hack to prevent nosetest and autodoc errors LinearSegmentedColormap = object From 9ea43d777ba351b1c6aaf89d65a2185c1c60c6b2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 21:41:35 -0500 Subject: [PATCH 23/70] Avoid type incompatibility warnings --- skimage/draw/draw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/draw/draw.py b/skimage/draw/draw.py index 2f03b018..01fb4bf3 100644 --- a/skimage/draw/draw.py +++ b/skimage/draw/draw.py @@ -63,7 +63,7 @@ def ellipse(cy, cx, yradius, xradius, shape=None): return _ellipse_in_shape(shape, center, radiuses) else: # rounding here is necessary to avoid rounding issues later - upper_left = np.floor(center - radiuses) + upper_left = np.floor(center - radiuses).astype(int) shifted_center = center - upper_left From 8e318d070f696daca4d12b1c926d9dbd11938c10 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:09:21 -0500 Subject: [PATCH 24/70] Add networkx to requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 9bb56a8a..2180d724 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ matplotlib>=1.0 numpy>=1.6 scipy>=0.9 six>=1.3 +networkx>=1.6.2 From d844e437792726f85c123c929695e84055e91491 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:09:49 -0500 Subject: [PATCH 25/70] Update depends and add simpleitk and imread --- DEPENDS.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 25bdf700..79bda5ed 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -12,7 +12,8 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- * `SciPy >= 0.9 `__ -* `Matplotlib >= 1.0 `__ +* `Matplotlib >= 1.0 `__ +* `NetworkX >= 1.8 ` Known build errors ------------------ @@ -29,9 +30,6 @@ Optional Requirements You can use this scikit with the basic requirements listed above, but some functionality is only available with the following installed: -* `NetworkX >= 1.8 `__ is needed to use region -adjacency graph (RAG)-based segmentation functions. - * `PyQt4 `__ The ``qt`` plugin that provides ``imshow(x, fancy=True)`` and `skivi`. @@ -47,7 +45,15 @@ adjacency graph (RAG)-based segmentation functions. (or `PIL `__) The ``Pillow`` library (or equivalently ``PIL``) is used for Input/Output. -* `Astropy `__ is required to use the FITS io plug-in. +* `Astropy `__ provides FITS io capability. + +*`SimpleITK ` + Optional io plugin providing a wide variety of `formats `__. + including specialized formats using in Medical imagery. + +*`imread ` + Optional io plugin providing most standard `formats `__. + Testing requirements -------------------- From 92c28f97a1fc650414a02ee1b7430ad8df25ba3e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:10:04 -0500 Subject: [PATCH 26/70] Update travis to better reflect requirements --- .travis.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 594145d2..a615a96c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,12 @@ before_install: install: - tools/header.py "Dependency versions" - tools/build_versions.py + # Matplotlib settings + - export MPL_DIR=$HOME/.config/matplotlib + - mkdir -p $MPL_DIR + - touch $MPL_DIR/matplotlibrc + - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc" - export PYTHONWARNINGS=all - python setup.py build_ext --inplace @@ -73,22 +79,19 @@ script: # Install optional dependencies to get full test coverage # Notes: - # - pyfits and imread do NOT support py3.2 + # - imread does NOT support py3.2 # - Use the png headers included in anaconda (from matplotlib install) # TODO: Remove the libm removal when anaconda fixes their libraries # The solution was suggested here # https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/-DLG2ZdTkw0 - if [[ $ENV == python=3.2 ]]; then travis_retry sudo apt-get install python3-pyqt4; - travis_retry pip install networkx; else - travis_retry conda install networkx; sudo cp ~/miniconda/envs/test/include/png* /usr/include; rm ~/miniconda/envs/test/lib/libm-2.5.so; rm ~/miniconda/envs/test/lib/libm.*; sudo apt-get install libtiff4-dev libwebp-dev xcftools; travis_retry pip install imread; - travis_retry pip install pyfits; travis_retry pip install pillow; fi - sudo apt-get install libfreeimage3 @@ -96,13 +99,8 @@ script: - if [[ $ENV != python=3.4* ]]; then travis_retry easy_install SimpleITK; fi - - # Matplotlib settings - - export MPL_DIR=$HOME/.config/matplotlib - - mkdir -p $MPL_DIR - - touch $MPL_DIR/matplotlibrc - - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc" + - travis_retry pip install pyamg + - travis_retry pip install --no-deps astropy - echo -e $SPACER From 1ce325008abec0c0abaa37eceb54ef7297877739 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:33:44 -0500 Subject: [PATCH 27/70] Allow for 3-part dependency versions --- requirements.txt | 4 ++-- setup.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2180d724..5ddda45f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -cython>=0.19 -matplotlib>=1.0 +cython>=0.19.2 +matplotlib>=1.1 numpy>=1.6 scipy>=0.9 six>=1.3 diff --git a/setup.py b/setup.py index 56f0039d..ffbb7e6f 100755 --- a/setup.py +++ b/setup.py @@ -117,9 +117,8 @@ def check_requirements(): dep_error = True if dep_error: - print('***********', package_version) raise ImportError('You need `%s` version %d.%d or later.' \ - % ((package_name, ) + min_version)) + % ((package_name, ) + min_version[:2])) if __name__ == "__main__": From 3d4a0812818d2fffe820c23d19f013644dc8dd0e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:36:23 -0500 Subject: [PATCH 28/70] Print full required version str --- setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index ffbb7e6f..3d71f3f4 100755 --- a/setup.py +++ b/setup.py @@ -92,8 +92,6 @@ def get_package_version(package): version.append(int(part)) except ValueError: pass - if not version: - print(package) return tuple(version) @@ -117,8 +115,8 @@ def check_requirements(): dep_error = True if dep_error: - raise ImportError('You need `%s` version %d.%d or later.' \ - % ((package_name, ) + min_version[:2])) + raise ImportError('You need `%s` version %s or later.' \ + % (package_name, '.'.join(str(i) for i in min_version))) if __name__ == "__main__": From b4b7760a9c7c4b566d26d80e91f50918594900ba Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 4 Oct 2014 22:57:43 -0500 Subject: [PATCH 29/70] Install networkx up front --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a615a96c..f187bb57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_install: sudo apt-get install python3-numpy; wget https://raw.githubusercontent.com/numpy/numpy/master/numpy/_import_tools.py -O /home/travis/virtualenv/python3.2_with_system_site_packages/lib/python3.2/site-packages/numpy/_import_tools.py; sudo apt-get install python3-scipy; - travis_retry pip install cython flake8 six; + travis_retry pip install cython flake8 six networkx; else wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; @@ -43,7 +43,7 @@ before_install: conda config --set always_yes yes; conda update conda; conda info -a; - travis_retry conda create -n test $ENV six scipy pip flake8 nose; + travis_retry conda create -n test $ENV six scipy pip flake8 nose networkx; source activate test; fi - travis_retry pip install wheel; From e6270c52b671156958e03479a436056520ef1ba3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 07:07:19 -0500 Subject: [PATCH 30/70] Do not require jpg support from io plugins in novice test --- skimage/novice/tests/test_novice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/novice/tests/test_novice.py b/skimage/novice/tests/test_novice.py index a1f750ab..02d5c7a8 100644 --- a/skimage/novice/tests/test_novice.py +++ b/skimage/novice/tests/test_novice.py @@ -143,14 +143,14 @@ def test_update_on_save(): assert pic.modified assert pic.path is None - fd, filename = tempfile.mkstemp(suffix=".jpg") + fd, filename = tempfile.mkstemp(suffix=".png") os.close(fd) try: pic.save(filename) assert not pic.modified assert_equal(pic.path, os.path.abspath(filename)) - assert_equal(pic.format, "jpeg") + assert_equal(pic.format, "png") finally: os.unlink(filename) From ec55adf4ea04e5af5067ec623f325af02de9c3c9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 10:03:34 -0500 Subject: [PATCH 31/70] Add pillow to requirements (but allow for PIL) --- requirements.txt | 1 + setup.py | 6 ++++-- skimage/novice/tests/test_novice.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5ddda45f..13a6f59b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ numpy>=1.6 scipy>=0.9 six>=1.3 networkx>=1.6.2 +pillow>=1.1.7 diff --git a/setup.py b/setup.py index 3d71f3f4..83979b1a 100755 --- a/setup.py +++ b/setup.py @@ -80,7 +80,6 @@ version='%s' def get_package_version(package): - version = [] for version_attr in ('version', 'VERSION', '__version__'): version_info = getattr(package, version_attr, None) try: @@ -105,8 +104,11 @@ def check_requirements(): if package_name == 'cython': package_name = 'Cython' dep_error = False + if package_name.lower() == 'pillow': + package_name = 'PIL.Image' try: - package = __import__(package_name) + package = __import__(package_name, + fromlist=[package_name.split('.')[-1]]) except ImportError: dep_error = True else: diff --git a/skimage/novice/tests/test_novice.py b/skimage/novice/tests/test_novice.py index 02d5c7a8..a1f750ab 100644 --- a/skimage/novice/tests/test_novice.py +++ b/skimage/novice/tests/test_novice.py @@ -143,14 +143,14 @@ def test_update_on_save(): assert pic.modified assert pic.path is None - fd, filename = tempfile.mkstemp(suffix=".png") + fd, filename = tempfile.mkstemp(suffix=".jpg") os.close(fd) try: pic.save(filename) assert not pic.modified assert_equal(pic.path, os.path.abspath(filename)) - assert_equal(pic.format, "png") + assert_equal(pic.format, "jpeg") finally: os.unlink(filename) From 4a41febde45c5be5992213a507f0dca452925db8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 10:05:17 -0500 Subject: [PATCH 32/70] Move Pillow to runtime reqs in DEPENDS --- DEPENDS.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 79bda5ed..3711796c 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -13,7 +13,9 @@ Runtime requirements -------------------- * `SciPy >= 0.9 `__ * `Matplotlib >= 1.0 `__ -* `NetworkX >= 1.8 ` +* `NetworkX >= 1.8 `__ +* `Pillow `__ + (or `PIL `__) Known build errors ------------------ @@ -41,10 +43,6 @@ functionality is only available with the following installed: The ``pyamg`` module is used for the fast `cg_mg` mode of random walker segmentation. -* `Pillow `__ - (or `PIL `__) - The ``Pillow`` library (or equivalently ``PIL``) is used for Input/Output. - * `Astropy `__ provides FITS io capability. *`SimpleITK ` From 1ae929224e5b7520c8ddbce4888cb878cdb22dcb Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 10:31:18 -0500 Subject: [PATCH 33/70] Fix setup version requirement handling --- setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 83979b1a..838c7410 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ for line in data.splitlines(): version.append(int(part)) except ValueError: pass - DEPENDENCIES[pkg.lower()] = tuple(version) + DEPENDENCIES[str(pkg.lower())] = tuple(version) def configuration(parent_package='', top_path=None): @@ -86,20 +86,19 @@ def get_package_version(package): parts = re.split('\D+', version_info) except TypeError: continue + version = [] for part in parts: try: version.append(int(part)) except ValueError: pass - return tuple(version) - + return tuple(version) def check_requirements(): if sys.version_info < PYTHON_VERSION: raise SystemExit('You need Python version %d.%d or later.' \ % PYTHON_VERSION) - for package_name, min_version in DEPENDENCIES.items(): if package_name == 'cython': package_name = 'Cython' @@ -115,7 +114,6 @@ def check_requirements(): package_version = get_package_version(package) if min_version > package_version: dep_error = True - if dep_error: raise ImportError('You need `%s` version %s or later.' \ % (package_name, '.'.join(str(i) for i in min_version))) From 558dfad3f0456b0e14474aab397d0e43df1ca077 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 13:07:35 -0500 Subject: [PATCH 34/70] Fix __import__ fromlist --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 838c7410..856a9710 100755 --- a/setup.py +++ b/setup.py @@ -107,7 +107,7 @@ def check_requirements(): package_name = 'PIL.Image' try: package = __import__(package_name, - fromlist=[package_name.split('.')[-1]]) + fromlist=[package_name.rpartition('.')[0]]) except ImportError: dep_error = True else: From 71c51a42392b5cbc4a7d289f1565b856ae386f63 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 13:31:08 -0500 Subject: [PATCH 35/70] Add the rest of the packages to the build_versions script --- tools/build_versions.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/build_versions.py b/tools/build_versions.py index f598866e..af1faac2 100755 --- a/tools/build_versions.py +++ b/tools/build_versions.py @@ -6,7 +6,14 @@ import numpy as np import scipy as sp import matplotlib as mpl import six +from PIL import Image +import Cython +import networkx -for m in (np, sp, mpl, six): - if not m is None: - print(m.__name__.rjust(10), ' ', m.__version__) + +for m in (np, sp, mpl, six, Image, networkx, Cython): + if m is Image: + version = m.VERSION + else: + version = m.__version__ + print(m.__name__.rjust(10), ' ', version) From 99f5fd8f6ee7e5fe91e6841c2dad878aca15d6c5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 15:14:15 -0500 Subject: [PATCH 36/70] Use distutils LooseVersion for version check --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 856a9710..2a3cb690 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ import sys import setuptools from distutils.command.build_py import build_py +from distutils.version import LooseVersion # These are manually checked. @@ -112,7 +113,7 @@ def check_requirements(): dep_error = True else: package_version = get_package_version(package) - if min_version > package_version: + if LooseVersion(min_version) > LooseVersion(package_version): dep_error = True if dep_error: raise ImportError('You need `%s` version %s or later.' \ From a765e96c114a882569d46852879dd6e63c325d0c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 15:32:35 -0500 Subject: [PATCH 37/70] Install pillow from wheelhouse --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f187bb57..fb9d6acc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,10 +48,11 @@ before_install: fi - travis_retry pip install wheel; - if [[ $ENV != python=2.6* ]]; then - travis_retry pip install --no-index --find-links=http://wheels.scikit-image.org/ matplotlib; + travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; else pip install matplotlib==1.1.0; fi + - pip install pillow --no-index --find-links=http://wheels.scikit-image.org/ - python check_bento_build.py install: From 7cb883999cc8de56eaa4d3ff44b05ee018050ccc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 15:34:33 -0500 Subject: [PATCH 38/70] Use strings as required by LooseVersion --- setup.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/setup.py b/setup.py index 2a3cb690..a211fb7a 100755 --- a/setup.py +++ b/setup.py @@ -39,13 +39,7 @@ for line in data.splitlines(): # Only require Cython if we have a developer checkout if pkg.lower() == 'cython' and not VERSION.endswith('dev'): continue - version = [] - for part in re.split('\D+', version_info): - try: - version.append(int(part)) - except ValueError: - pass - DEPENDENCIES[str(pkg.lower())] = tuple(version) + DEPENDENCIES[str(pkg.lower())] = str(version_info) def configuration(parent_package='', top_path=None): @@ -83,18 +77,8 @@ version='%s' def get_package_version(package): for version_attr in ('version', 'VERSION', '__version__'): version_info = getattr(package, version_attr, None) - try: - parts = re.split('\D+', version_info) - except TypeError: - continue - version = [] - for part in parts: - try: - version.append(int(part)) - except ValueError: - pass - - return tuple(version) + if version_info: + return str(version_info) def check_requirements(): if sys.version_info < PYTHON_VERSION: From 4b18721c485b3012ceb3889ef308ba118497d26f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 16:40:32 -0500 Subject: [PATCH 39/70] Fix syntax for python3 in setup.py --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a211fb7a..b191d659 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ for line in data.splitlines(): # Only require Cython if we have a developer checkout if pkg.lower() == 'cython' and not VERSION.endswith('dev'): continue - DEPENDENCIES[str(pkg.lower())] = str(version_info) + DEPENDENCIES[str(pkg).lower()] = str(version_info) def configuration(parent_package='', top_path=None): @@ -80,11 +80,12 @@ def get_package_version(package): if version_info: return str(version_info) + def check_requirements(): if sys.version_info < PYTHON_VERSION: raise SystemExit('You need Python version %d.%d or later.' \ % PYTHON_VERSION) - for package_name, min_version in DEPENDENCIES.items(): + for (package_name, min_version) in DEPENDENCIES.items(): if package_name == 'cython': package_name = 'Cython' dep_error = False From 9355ecd02687be9d9c98f127836cf3d6c8ac2cd5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 21:12:37 -0500 Subject: [PATCH 40/70] Turn off doc examples to see if the build passes otherwise --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb9d6acc..89b8c78b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -107,8 +107,8 @@ script: # Run all doc examples - export PYTHONPATH=$(pwd):$PYTHONPATH - - for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - - for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done + # for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done + # for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - echo -e $SPACER From c3ffc5ed5150aebb1de3522167178e5448599220 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 21:48:44 -0500 Subject: [PATCH 41/70] Fix handling of version_attr for python3 --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b191d659..451ba468 100755 --- a/setup.py +++ b/setup.py @@ -75,9 +75,9 @@ version='%s' def get_package_version(package): - for version_attr in ('version', 'VERSION', '__version__'): + for version_attr in ('__version__', 'VERSION', 'version'): version_info = getattr(package, version_attr, None) - if version_info: + if version_info and str(version_attr) == version_attr: return str(version_info) @@ -98,6 +98,9 @@ def check_requirements(): dep_error = True else: package_version = get_package_version(package) + print(repr(package_version)) + print(repr(min_version)) + if LooseVersion(min_version) > LooseVersion(package_version): dep_error = True if dep_error: From c8e73d87f1bdcdfbf35d890437581ec15b85ca7c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 5 Oct 2014 22:30:19 -0500 Subject: [PATCH 42/70] Do not change matplotlibrc settings until after pyqt install --- .travis.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89b8c78b..190d2830 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,12 +58,6 @@ before_install: install: - tools/header.py "Dependency versions" - tools/build_versions.py - # Matplotlib settings - - export MPL_DIR=$HOME/.config/matplotlib - - mkdir -p $MPL_DIR - - touch $MPL_DIR/matplotlibrc - - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc" - export PYTHONWARNINGS=all - python setup.py build_ext --inplace @@ -103,12 +97,19 @@ script: - travis_retry pip install pyamg - travis_retry pip install --no-deps astropy + # Matplotlib settings - must be updated after PyQt is installed + - export MPL_DIR=$HOME/.config/matplotlib + - mkdir -p $MPL_DIR + - touch $MPL_DIR/matplotlibrc + - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc" + - echo -e $SPACER # Run all doc examples - export PYTHONPATH=$(pwd):$PYTHONPATH - # for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - # for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done + - for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done + - for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - echo -e $SPACER From 82176abea05c03ee127b3de4d4670c5301b0fcc0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 05:20:23 -0500 Subject: [PATCH 43/70] Only install pyamg on py2.6 and py2.7 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 190d2830..81dabf69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,7 +94,10 @@ script: - if [[ $ENV != python=3.4* ]]; then travis_retry easy_install SimpleITK; fi - - travis_retry pip install pyamg + # PyAMG is only available on Py2.6 and Py2.7 + - if [[ $ENV == python=2.* ]]; then + travis_retry pip install pyamg; + fi - travis_retry pip install --no-deps astropy # Matplotlib settings - must be updated after PyQt is installed From 34505437031fd76a072cbcbb7d549c010b769c0a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 05:23:17 -0500 Subject: [PATCH 44/70] Reinstate pyqt install. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81dabf69..746dda9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,7 +87,7 @@ script: rm ~/miniconda/envs/test/lib/libm.*; sudo apt-get install libtiff4-dev libwebp-dev xcftools; travis_retry pip install imread; - travis_retry pip install pillow; + conda install pyqt; fi - sudo apt-get install libfreeimage3 # TODO: update when SimpleITK become available on py34 or hopefully pip @@ -98,7 +98,7 @@ script: - if [[ $ENV == python=2.* ]]; then travis_retry pip install pyamg; fi - - travis_retry pip install --no-deps astropy + - travis_retry pip install --no-deps astropy # Matplotlib settings - must be updated after PyQt is installed - export MPL_DIR=$HOME/.config/matplotlib From 76bbb9f6e75281ef1c52df8f0930139832040d0f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 05:37:37 -0500 Subject: [PATCH 45/70] Try a reinstall of matplotlib with pyqt support --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 746dda9e..07d59c72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,6 +100,14 @@ script: fi - travis_retry pip install --no-deps astropy + # Reinstall matplotlib with pyqt support + - pip uninstall matplotlib + - if [[ $ENV != python=2.6* ]]; then + travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; + else + pip install matplotlib==1.1.0; + fi + # Matplotlib settings - must be updated after PyQt is installed - export MPL_DIR=$HOME/.config/matplotlib - mkdir -p $MPL_DIR From d6ad6ead01e9a36488289930ffa922e0d8165f0f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 06:05:09 -0500 Subject: [PATCH 46/70] Fix yaml syntax --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07d59c72..9df842ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,7 +102,7 @@ script: # Reinstall matplotlib with pyqt support - pip uninstall matplotlib - - if [[ $ENV != python=2.6* ]]; then + - if [[ $ENV != python=2.6* ]]; then travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; else pip install matplotlib==1.1.0; From bc1ce12248e2f9840b876ae63f7a708ef2d85e90 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 06:17:02 -0500 Subject: [PATCH 47/70] Revert to mostly working travis --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9df842ce..746dda9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,14 +100,6 @@ script: fi - travis_retry pip install --no-deps astropy - # Reinstall matplotlib with pyqt support - - pip uninstall matplotlib - - if [[ $ENV != python=2.6* ]]; then - travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; - else - pip install matplotlib==1.1.0; - fi - # Matplotlib settings - must be updated after PyQt is installed - export MPL_DIR=$HOME/.config/matplotlib - mkdir -p $MPL_DIR From 028fb533688bb234821b449488c177c3a863c64f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 14:43:44 -0500 Subject: [PATCH 48/70] Bump matplotlib to 1.2 --- .travis.yml | 2 +- DEPENDS.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 746dda9e..4f1ac94f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [[ $ENV != python=2.6* ]]; then travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; else - pip install matplotlib==1.1.0; + pip install matplotlib==1.2.0; fi - pip install pillow --no-index --find-links=http://wheels.scikit-image.org/ - python check_bento_build.py diff --git a/DEPENDS.txt b/DEPENDS.txt index 3711796c..0003de6b 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -12,7 +12,7 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- * `SciPy >= 0.9 `__ -* `Matplotlib >= 1.0 `__ +* `Matplotlib >= 1.2 `__ * `NetworkX >= 1.8 `__ * `Pillow `__ (or `PIL `__) diff --git a/requirements.txt b/requirements.txt index 13a6f59b..2b55f91e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cython>=0.19.2 -matplotlib>=1.1 +matplotlib>=1.2 numpy>=1.6 scipy>=0.9 six>=1.3 From d19a04192965c185974eae5a3ae22a2e92bbb705 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 15:15:39 -0500 Subject: [PATCH 49/70] Try matplotlib 1.1.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4f1ac94f..c6b88c8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [[ $ENV != python=2.6* ]]; then travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; else - pip install matplotlib==1.2.0; + pip install matplotlib==1.1.1; fi - pip install pillow --no-index --find-links=http://wheels.scikit-image.org/ - python check_bento_build.py From 69e137be1b7f5987ba2fbd3350e20f7540cce38e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 15:25:17 -0500 Subject: [PATCH 50/70] Fix required version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2b55f91e..13a6f59b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cython>=0.19.2 -matplotlib>=1.2 +matplotlib>=1.1 numpy>=1.6 scipy>=0.9 six>=1.3 From 20155926b5a2f6e0143ab5bdad796d6c58fc86da Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:05:31 -0500 Subject: [PATCH 51/70] Update to use wheelhouse --- .travis.yml | 118 +++++++++++++++++++---------------------------- requirements.txt | 4 +- 2 files changed, 50 insertions(+), 72 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6b88c8f..f21c53d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,54 +5,33 @@ language: python - -# Tthe Travis python is set to 3.2 for all builds, since we use the default python for the 3.2 build and the anaconda python otherwise python: + - 2.6 + - "2.7_with_system_site_packages" - 3.2 + - 3.3 + - 3.4 env: - - ENV="python=2.6 numpy=1.6 cython=0.19.2" - - ENV="python=2.7 numpy cython" - - ENV="python=3.2" - - ENV="python=3.3 numpy cython" - - ENV="python=3.4 numpy cython" - -virtualenv: - system_site_packages: true + WHEELHOUSE="--no-index --find-links=http://wheels.scikit-image.org/" before_install: - export DISPLAY=:99.0 - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update - - sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev - # Python 3.2 is not supported by Miniconda, so we use the package manager for that run. - # NumPy has a bug in python 3 that is only fixed in the latest version, - # hence the below wget of numpy/_import_tools.py from github. - - if [[ $ENV == python=3.2 ]]; then - sudo apt-get install python3-numpy; - wget https://raw.githubusercontent.com/numpy/numpy/master/numpy/_import_tools.py -O /home/travis/virtualenv/python3.2_with_system_site_packages/lib/python3.2/site-packages/numpy/_import_tools.py; - sudo apt-get install python3-scipy; - travis_retry pip install cython flake8 six networkx; - else - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda; - export PATH="$HOME/miniconda/bin:$PATH"; - hash -r; - conda config --set always_yes yes; - conda update conda; - conda info -a; - travis_retry conda create -n test $ENV six scipy pip flake8 nose networkx; - source activate test; - fi - - travis_retry pip install wheel; - - if [[ $ENV != python=2.6* ]]; then - travis_retry pip install matplotlib --no-index --find-links=http://wheels.scikit-image.org/; - else - pip install matplotlib==1.1.1; - fi - - pip install pillow --no-index --find-links=http://wheels.scikit-image.org/ + - travis_retry pip install wheel flake8 coveralls nose six + # on Python 2.7, use the system versions of numpy, scipy, and matplotlib + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + travis_retry sudo apt-get install python-scipy python-matplotlib; + travis_retry sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ + libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev \ + python-dev python-tk + travis_retry pip install pillow cython $WHEELHOUSE; + else + travis_retry pip install -r requirements.txt $WHEELHOUSE; + fi - python check_bento_build.py install: @@ -72,40 +51,41 @@ script: - echo -e $SPACER - # Install optional dependencies to get full test coverage - # Notes: - # - imread does NOT support py3.2 - # - Use the png headers included in anaconda (from matplotlib install) - # TODO: Remove the libm removal when anaconda fixes their libraries - # The solution was suggested here - # https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/-DLG2ZdTkw0 - - if [[ $ENV == python=3.2 ]]; then - travis_retry sudo apt-get install python3-pyqt4; - else - sudo cp ~/miniconda/envs/test/include/png* /usr/include; - rm ~/miniconda/envs/test/lib/libm-2.5.so; - rm ~/miniconda/envs/test/lib/libm.*; - sudo apt-get install libtiff4-dev libwebp-dev xcftools; - travis_retry pip install imread; - conda install pyqt; - fi - - sudo apt-get install libfreeimage3 - # TODO: update when SimpleITK become available on py34 or hopefully pip - - if [[ $ENV != python=3.4* ]]; then - travis_retry easy_install SimpleITK; - fi - # PyAMG is only available on Py2.6 and Py2.7 - - if [[ $ENV == python=2.* ]]; then - travis_retry pip install pyamg; - fi - - travis_retry pip install --no-deps astropy + # Install Qt and then update the Matplotlib settings + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + sudo apt-get install python-qt4; + else + sudo apt-get install libqt4-dev; + travis_retry pip install PySide $WHEELHOUSE; + python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; + fi - # Matplotlib settings - must be updated after PyQt is installed + # Matplotlib settings - must be after we install Pyside - export MPL_DIR=$HOME/.config/matplotlib - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc" + + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc"; + else + "echo 'backend.qt4 : PySide' >> $MPL_DIR/matplotlibrc"; + fi + + # - imread does NOT support py3.2 + - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then + sudo apt-get install libtiff4-dev libwebp-dev xcftools; + travis_retry pip install imread; + fi + # TODO: update when SimpleITK become available on py34 or hopefully pip + - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then + travis_retry easy_install SimpleITK; + fi + - travis_retry pip install --no-deps astropy + + - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then + travis_retry pip install pyamg; + fi - echo -e $SPACER @@ -118,13 +98,11 @@ script: # run tests again with optional dependencies to get more coverage # measure coverage on py3.3 - - if [[ $ENV == python=3.3* ]]; then + - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then nosetests --exe -v --with-doctest --with-cov --cover-package skimage; else nosetests --exe -v --with-doctest skimage; fi after_success: - - if [[ $ENV == python=3.3* ]]; then - coveralls; - fi + - coveralls; diff --git a/requirements.txt b/requirements.txt index 13a6f59b..7464d13d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cython>=0.19.2 -matplotlib>=1.1 -numpy>=1.6 +matplotlib>=1.1.1 +numpy>=1.6.1 scipy>=0.9 six>=1.3 networkx>=1.6.2 From 85711410b056291742853e70417931fd6ebf83ee Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:19:19 -0500 Subject: [PATCH 52/70] Fix travis syntax and use tools/header.py --- .travis.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index f21c53d1..7de2255d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ env: before_install: - export DISPLAY=:99.0 - - export SPACER="\n\n\n\n\n\n\n\n\n\n*************************\n\n" - sh -e /etc/init.d/xvfb start - sudo apt-get update @@ -44,21 +43,21 @@ script: # Run all tests with minimum dependencies - nosetests --exe -v skimage - - echo -e $SPACER + - tools/header.py "Pep8 and Flake tests" # Run pep8 and flake tests - flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples - - echo -e $SPACER + - tools/header.py "Install optional dependencies" # Install Qt and then update the Matplotlib settings - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then sudo apt-get install python-qt4; - else - sudo apt-get install libqt4-dev; - travis_retry pip install PySide $WHEELHOUSE; - python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; - fi + else + sudo apt-get install libqt4-dev; + travis_retry pip install PySide $WHEELHOUSE; + python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; + fi # Matplotlib settings - must be after we install Pyside - export MPL_DIR=$HOME/.config/matplotlib @@ -66,11 +65,11 @@ script: - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then - "echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc"; - else - "echo 'backend.qt4 : PySide' >> $MPL_DIR/matplotlibrc"; - fi + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc; + else + echo 'backend.qt4 : PySide' >> $MPL_DIR/matplotlibrc; + fi # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then @@ -87,14 +86,14 @@ script: travis_retry pip install pyamg; fi - - echo -e $SPACER + - tools/header.py "Run doc examples" # Run all doc examples - export PYTHONPATH=$(pwd):$PYTHONPATH - for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - - echo -e $SPACER + - tools/header.py "Run tests with all dependencies" # run tests again with optional dependencies to get more coverage # measure coverage on py3.3 From 0c288dee3d71baa4e90f03f9900cec659dd87300 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:25:57 -0500 Subject: [PATCH 53/70] Clean up travis --- .travis.yml | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7de2255d..8f9ba45f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,17 +20,14 @@ before_install: - sh -e /etc/init.d/xvfb start - sudo apt-get update - - travis_retry pip install wheel flake8 coveralls nose six + - travis_retry pip install wheel flake8 coveralls nose + # on Python 2.7, use the system versions of numpy, scipy, and matplotlib - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; - travis_retry sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ - libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev \ - python-dev python-tk - travis_retry pip install pillow cython $WHEELHOUSE; - else - travis_retry pip install -r requirements.txt $WHEELHOUSE; - fi + fi + + - travis_retry pip install -r requirements.txt $WHEELHOUSE; - python check_bento_build.py install: @@ -40,23 +37,24 @@ install: - python setup.py build_ext --inplace script: - # Run all tests with minimum dependencies + - tools/header.py "Run all tests with minimum dependencies" - nosetests --exe -v skimage - tools/header.py "Pep8 and Flake tests" - - # Run pep8 and flake tests - flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples - - tools/header.py "Install optional dependencies" + - tools/header.py "Install optional dependencies" # Install Qt and then update the Matplotlib settings - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then - sudo apt-get install python-qt4; + sudo apt-get install -q python-qt4; + export QT_API=PyQt4; + else - sudo apt-get install libqt4-dev; + sudo apt-get install -q libqt4-dev; travis_retry pip install PySide $WHEELHOUSE; python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; + export QT_API=Pyside; fi # Matplotlib settings - must be after we install Pyside @@ -64,22 +62,19 @@ script: - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then - echo 'backend.qt4 : PyQt4' >> $MPL_DIR/matplotlibrc; - else - echo 'backend.qt4 : PySide' >> $MPL_DIR/matplotlibrc; - fi + - "echo 'backend.qt4 : $(QT_API)' >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then - sudo apt-get install libtiff4-dev libwebp-dev xcftools; + sudo apt-get install -q libtiff4-dev libwebp-dev xcftools; travis_retry pip install imread; fi + # TODO: update when SimpleITK become available on py34 or hopefully pip - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then travis_retry easy_install SimpleITK; fi + - travis_retry pip install --no-deps astropy - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then @@ -87,14 +82,11 @@ script: fi - tools/header.py "Run doc examples" - - # Run all doc examples - export PYTHONPATH=$(pwd):$PYTHONPATH - for f in doc/examples/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - for f in doc/examples/applications/*.py; do python "$f"; if [ $? -ne 0 ]; then exit 1; fi done - tools/header.py "Run tests with all dependencies" - # run tests again with optional dependencies to get more coverage # measure coverage on py3.3 - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then From 967b1912c23d60441760f53954a772377bd4b958 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:30:39 -0500 Subject: [PATCH 54/70] Remove print statements --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 451ba468..f8169691 100755 --- a/setup.py +++ b/setup.py @@ -98,8 +98,6 @@ def check_requirements(): dep_error = True else: package_version = get_package_version(package) - print(repr(package_version)) - print(repr(min_version)) if LooseVersion(min_version) > LooseVersion(package_version): dep_error = True From 0be4a38260dba6f65a858cc5297816439e8aeb87 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:47:56 -0500 Subject: [PATCH 55/70] Use all min reqs on Python2.7, fix syntax error and variable overshadow --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f9ba45f..c6c4b5a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,10 @@ before_install: - travis_retry pip install wheel flake8 coveralls nose # on Python 2.7, use the system versions of numpy, scipy, and matplotlib + # and the minimum version of the rest of the requirements - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; + pip install cython==0.19.2 networkx==1.6.2 six==1.3; fi - travis_retry pip install -r requirements.txt $WHEELHOUSE; @@ -48,13 +50,13 @@ script: # Install Qt and then update the Matplotlib settings - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then sudo apt-get install -q python-qt4; - export QT_API=PyQt4; + export SCI_QT_API=PyQt4; else sudo apt-get install -q libqt4-dev; travis_retry pip install PySide $WHEELHOUSE; python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; - export QT_API=Pyside; + export SCI_QT_API=Pyside; fi # Matplotlib settings - must be after we install Pyside @@ -62,7 +64,7 @@ script: - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : $(QT_API)' >> $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : $(SCI_QT_API)' >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then @@ -77,7 +79,7 @@ script: - travis_retry pip install --no-deps astropy - - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then + - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then travis_retry pip install pyamg; fi From 4645dc8d9909e1d0e991951d4a7e183f4ef640fd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 18:59:43 -0500 Subject: [PATCH 56/70] Use github downloads for specific versions on Py2.7 --- .travis.yml | 5 +++-- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6c4b5a1..13f93387 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,10 +23,11 @@ before_install: - travis_retry pip install wheel flake8 coveralls nose # on Python 2.7, use the system versions of numpy, scipy, and matplotlib - # and the minimum version of the rest of the requirements + # and the minimum version of cython and networkx - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; - pip install cython==0.19.2 networkx==1.6.2 six==1.3; + pip install https://github.com/cython/cython/archive/0.19.2.tar.gz + pip install https://github.com/networkx/networkx/archive/networkx-1.6.tar.gz fi - travis_retry pip install -r requirements.txt $WHEELHOUSE; diff --git a/requirements.txt b/requirements.txt index 7464d13d..6c842e53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ matplotlib>=1.1.1 numpy>=1.6.1 scipy>=0.9 six>=1.3 -networkx>=1.6.2 +networkx>=1.6 pillow>=1.1.7 From bdb59ce505179b15d192d28d814ed2371c5e4465 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 19:05:30 -0500 Subject: [PATCH 57/70] Fix travis syntax errors --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13f93387..31a19e67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,8 @@ before_install: # and the minimum version of cython and networkx - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; - pip install https://github.com/cython/cython/archive/0.19.2.tar.gz - pip install https://github.com/networkx/networkx/archive/networkx-1.6.tar.gz + pip install https://github.com/cython/cython/archive/0.19.2.tar.gz; + pip install https://github.com/networkx/networkx/archive/networkx-1.6.tar.gz; fi - travis_retry pip install -r requirements.txt $WHEELHOUSE; From cad3f96b2661a33c0544b40c339c82481f94ecc3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 19:20:45 -0500 Subject: [PATCH 58/70] Fix syntax error and QT API var handling. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31a19e67..c90b7619 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ script: - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : $(SCI_QT_API)' >> $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : $SCI_QT_API' >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then @@ -78,7 +78,7 @@ script: travis_retry easy_install SimpleITK; fi - - travis_retry pip install --no-deps astropy + - travis_retry pip install --no-deps astropy - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then travis_retry pip install pyamg; From f2d5435c1960c34e106a432aa815162d4ea918cd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 20:35:25 -0500 Subject: [PATCH 59/70] Fix string interpolation error --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c90b7619..6608ddad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,8 +64,8 @@ script: - export MPL_DIR=$HOME/.config/matplotlib - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : $SCI_QT_API' >> $MPL_DIR/matplotlibrc" + - echo "backend : Agg" > $MPL_DIR/matplotlibrc + - echo "backend.qt4 : $SCI_QT_API" >> $MPL_DIR/matplotlibrc # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then From 60db60ff9cccfd3f66d4bd92dd35002e7d84c8ea Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 20:55:35 -0500 Subject: [PATCH 60/70] Clean up required versions --- .travis.yml | 2 +- DEPENDS.txt | 8 ++++---- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6608ddad..31627b2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_install: - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; pip install https://github.com/cython/cython/archive/0.19.2.tar.gz; - pip install https://github.com/networkx/networkx/archive/networkx-1.6.tar.gz; + pip install https://github.com/networkx/networkx/archive/networkx-1.8.tar.gz; fi - travis_retry pip install -r requirements.txt $WHEELHOUSE; diff --git a/DEPENDS.txt b/DEPENDS.txt index 0003de6b..6a6507ff 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -2,7 +2,7 @@ Build Requirements ------------------ * `Python >= 2.6 `__ * `Numpy >= 1.6 `__ -* `Cython >= 0.19 `__ +* `Cython >= 0.19.2 `__ * `Six >=1.3 `__ You can use pip to automatically install the base dependencies as follows:: @@ -11,9 +11,9 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- -* `SciPy >= 0.9 `__ -* `Matplotlib >= 1.2 `__ -* `NetworkX >= 1.8 `__ +* `SciPy `__ +* `Matplotlib `__ +* `NetworkX `__ * `Pillow `__ (or `PIL `__) diff --git a/requirements.txt b/requirements.txt index 6c842e53..435803b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ matplotlib>=1.1.1 numpy>=1.6.1 scipy>=0.9 six>=1.3 -networkx>=1.6 +networkx>=1.8 pillow>=1.1.7 From 98e230aab660d961346645f71bf70d97a7e37b84 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 21:00:10 -0500 Subject: [PATCH 61/70] Another attempt at variable substitution --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31627b2f..cff89939 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,8 +64,8 @@ script: - export MPL_DIR=$HOME/.config/matplotlib - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - - echo "backend : Agg" > $MPL_DIR/matplotlibrc - - echo "backend.qt4 : $SCI_QT_API" >> $MPL_DIR/matplotlibrc + - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : '$SCI_QT_API\'' >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then From 75928e87ee8ba9086c749755746dddcff704be61 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 21:01:57 -0500 Subject: [PATCH 62/70] Yet another attempt at variable substitution --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cff89939..ed303a5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ script: - mkdir -p $MPL_DIR - touch $MPL_DIR/matplotlibrc - "echo 'backend : Agg' > $MPL_DIR/matplotlibrc" - - "echo 'backend.qt4 : '$SCI_QT_API\'' >> $MPL_DIR/matplotlibrc" + - "echo 'backend.qt4 : '$SCI_QT_API >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then From 6ec45274c8501331ef53c99765ead7e67b967104 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 21:45:04 -0500 Subject: [PATCH 63/70] Fix installs for libfreeimage3 and astropy --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ed303a5b..e61fd93e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,7 +78,8 @@ script: travis_retry easy_install SimpleITK; fi - - travis_retry pip install --no-deps astropy + - travis_retry sudo apt-get install libfreeimage3 + - travis_retry pip install astropy - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then travis_retry pip install pyamg; From b46276427a6c191b60a855bf0425ebb4e91c0ec3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 6 Oct 2014 21:46:02 -0500 Subject: [PATCH 64/70] Fix install of imread --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e61fd93e..26d487de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ script: # - imread does NOT support py3.2 - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then - sudo apt-get install -q libtiff4-dev libwebp-dev xcftools; + sudo apt-get install -q libtiff4-dev libwebp-dev libpng12-dev xcftools; travis_retry pip install imread; fi From 2f61421c33083d62d7290594b8e96450d889ed82 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 7 Oct 2014 05:37:21 -0500 Subject: [PATCH 65/70] Clean up simpleitk description and imread link --- DEPENDS.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index 6a6507ff..aa3cd021 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -47,9 +47,9 @@ functionality is only available with the following installed: *`SimpleITK ` Optional io plugin providing a wide variety of `formats `__. - including specialized formats using in Medical imagery. + including specialized formats using in medical imaging. -*`imread ` +*`imread ` Optional io plugin providing most standard `formats `__. From 53c4d93f425b1b68a81f342ee66cfd02d328a0ea Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 7 Oct 2014 07:56:19 -0500 Subject: [PATCH 66/70] Add notes about Travis usage --- .travis.yml | 2 ++ doc/travis_notes.txt | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 doc/travis_notes.txt diff --git a/.travis.yml b/.travis.yml index 26d487de..ab2aaf53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ # After changing this file, check it on: # http://lint.travis-ci.org/ +# See docs/travis_notes.txt for some guidelines + language: python python: diff --git a/doc/travis_notes.txt b/doc/travis_notes.txt new file mode 100644 index 00000000..41118669 --- /dev/null +++ b/doc/travis_notes.txt @@ -0,0 +1,20 @@ + + +Travis Notes: + +- Use http://lint.travis-ci.org/ to make sure it is valid yaml. +- Make sure all of your "-" lines start on the same column +- Make sure all of your "if" lines are aligned with the "else" and "fi" lines +- "If" blocks must be on one travis statement and have semicolons at the end of each line: + +``` + - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then + echo "2.7"; + else + echo "Not 2.7"; + end +``` + +- "If" blocks cannot contain comments +- Use `travis_retry` before a command to have it try several times before failing + (useful for installing from third party sources) From 3cecfd8711ea23c2a5103c9d4c0204691a2c1890 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 7 Oct 2014 08:16:56 -0500 Subject: [PATCH 67/70] Add notes about and variable substitution --- doc/travis_notes.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/travis_notes.txt b/doc/travis_notes.txt index 41118669..7256b007 100644 --- a/doc/travis_notes.txt +++ b/doc/travis_notes.txt @@ -16,5 +16,10 @@ Travis Notes: ``` - "If" blocks cannot contain comments +- All travis commands are run with `eval` and quotes are taken as literal characters + unless you wrap the whole line in quotes: +`echo "hello : world"` is interpreted as `echo \"hello : world\"` +`"echo 'hello : world'"` is interpreted as `echo 'hello : world'` +`"echo 'hello : '$(MYVAR)'world'"` is interpreted as `echo 'hello : $(MYVAR)world'` - Use `travis_retry` before a command to have it try several times before failing (useful for installing from third party sources) From e384689f0cece59dfdac347568c06615e3b64d0c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 8 Oct 2014 17:53:01 -0500 Subject: [PATCH 68/70] Use tabs to line up if blocks --- .travis.yml | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab2aaf53..7d0091f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,11 +26,11 @@ before_install: # on Python 2.7, use the system versions of numpy, scipy, and matplotlib # and the minimum version of cython and networkx - - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then travis_retry sudo apt-get install python-scipy python-matplotlib; pip install https://github.com/cython/cython/archive/0.19.2.tar.gz; pip install https://github.com/networkx/networkx/archive/networkx-1.8.tar.gz; - fi + fi - travis_retry pip install -r requirements.txt $WHEELHOUSE; - python check_bento_build.py @@ -51,16 +51,16 @@ script: - tools/header.py "Install optional dependencies" # Install Qt and then update the Matplotlib settings - - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then - sudo apt-get install -q python-qt4; - export SCI_QT_API=PyQt4; + - if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then + sudo apt-get install -q python-qt4; + export SCI_QT_API=PyQt4; - else - sudo apt-get install -q libqt4-dev; - travis_retry pip install PySide $WHEELHOUSE; - python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; - export SCI_QT_API=Pyside; - fi + else + sudo apt-get install -q libqt4-dev; + travis_retry pip install PySide $WHEELHOUSE; + python ~/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/pyside_postinstall.py -install; + export SCI_QT_API=Pyside; + fi # Matplotlib settings - must be after we install Pyside - export MPL_DIR=$HOME/.config/matplotlib @@ -70,22 +70,22 @@ script: - "echo 'backend.qt4 : '$SCI_QT_API >> $MPL_DIR/matplotlibrc" # - imread does NOT support py3.2 - - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then - sudo apt-get install -q libtiff4-dev libwebp-dev libpng12-dev xcftools; - travis_retry pip install imread; - fi + - if [[ $TRAVIS_PYTHON_VERSION != 3.2 ]]; then + sudo apt-get install -q libtiff4-dev libwebp-dev libpng12-dev xcftools; + travis_retry pip install imread; + fi # TODO: update when SimpleITK become available on py34 or hopefully pip - - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then - travis_retry easy_install SimpleITK; - fi + - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then + travis_retry easy_install SimpleITK; + fi - travis_retry sudo apt-get install libfreeimage3 - travis_retry pip install astropy - - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then - travis_retry pip install pyamg; - fi + - if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then + travis_retry pip install pyamg; + fi - tools/header.py "Run doc examples" - export PYTHONPATH=$(pwd):$PYTHONPATH @@ -95,11 +95,11 @@ script: - tools/header.py "Run tests with all dependencies" # run tests again with optional dependencies to get more coverage # measure coverage on py3.3 - - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then - nosetests --exe -v --with-doctest --with-cov --cover-package skimage; - else - nosetests --exe -v --with-doctest skimage; - fi + - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then + nosetests --exe -v --with-doctest --with-cov --cover-package skimage; + else + nosetests --exe -v --with-doctest skimage; + fi after_success: - coveralls; From 878a1f3381a8070339789ae231c65951b6fed7e2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 Oct 2014 06:00:54 -0500 Subject: [PATCH 69/70] Update Travis notes --- doc/travis_notes.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/travis_notes.txt b/doc/travis_notes.txt index 7256b007..16481108 100644 --- a/doc/travis_notes.txt +++ b/doc/travis_notes.txt @@ -5,14 +5,15 @@ Travis Notes: - Use http://lint.travis-ci.org/ to make sure it is valid yaml. - Make sure all of your "-" lines start on the same column - Make sure all of your "if" lines are aligned with the "else" and "fi" lines +- Recommend using tab stops (but not tab chars) everywhere for alignment - "If" blocks must be on one travis statement and have semicolons at the end of each line: ``` - - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then - echo "2.7"; - else - echo "Not 2.7"; - end + - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then + echo "2.7"; + else + echo "Not 2.7"; + end ``` - "If" blocks cannot contain comments @@ -21,5 +22,8 @@ Travis Notes: `echo "hello : world"` is interpreted as `echo \"hello : world\"` `"echo 'hello : world'"` is interpreted as `echo 'hello : world'` `"echo 'hello : '$(MYVAR)'world'"` is interpreted as `echo 'hello : $(MYVAR)world'` -- Use `travis_retry` before a command to have it try several times before failing - (useful for installing from third party sources) +- Use `travis_retry` before a command to have it try several times before +failing (useful for installing from third party sources) +- Feel free to cancel a build rather than waiting for it to go to completion +if you have made a change to that branch. +- A VM with 64bit Ubuntu 12.04 is a huge help. From 1ca05d77cb3cbf90c0c7901fc99da6bda7694f9f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 Oct 2014 06:07:54 -0500 Subject: [PATCH 70/70] More updates to travis documentation --- .travis.yml | 4 ++-- doc/travis_notes.txt | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d0091f1..9325de32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ # vim ft=yaml # After changing this file, check it on: -# http://lint.travis-ci.org/ +# http://yaml-online-parser.appspot.com/ -# See docs/travis_notes.txt for some guidelines +# See doc/travis_notes.txt for some guidelines language: python diff --git a/doc/travis_notes.txt b/doc/travis_notes.txt index 16481108..787e7c11 100644 --- a/doc/travis_notes.txt +++ b/doc/travis_notes.txt @@ -1,12 +1,12 @@ - -Travis Notes: - -- Use http://lint.travis-ci.org/ to make sure it is valid yaml. +- Use http://yaml-online-parser.appspot.com/ to make sure it is valid yaml. + http://lint.travis-ci.org/ is recommended elsewhere but does not give helpful + error reports. - Make sure all of your "-" lines start on the same column - Make sure all of your "if" lines are aligned with the "else" and "fi" lines - Recommend using tab stops (but not tab chars) everywhere for alignment -- "If" blocks must be on one travis statement and have semicolons at the end of each line: +- "If" blocks must be on one travis statement and have semicolons at the + end of each line: ``` - if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then @@ -17,13 +17,14 @@ Travis Notes: ``` - "If" blocks cannot contain comments -- All travis commands are run with `eval` and quotes are taken as literal characters - unless you wrap the whole line in quotes: +- All travis commands are run with `eval` and quotes are taken as literal + characters unless you wrap the whole line in quotes: `echo "hello : world"` is interpreted as `echo \"hello : world\"` `"echo 'hello : world'"` is interpreted as `echo 'hello : world'` -`"echo 'hello : '$(MYVAR)'world'"` is interpreted as `echo 'hello : $(MYVAR)world'` +`"echo 'hello : '$(MYVAR)'world'"` is interpreted as + `echo 'hello : $(MYVAR)world'` - Use `travis_retry` before a command to have it try several times before failing (useful for installing from third party sources) - Feel free to cancel a build rather than waiting for it to go to completion -if you have made a change to that branch. + if you have made a change to that branch. - A VM with 64bit Ubuntu 12.04 is a huge help.