Add a script to create env variables and travis folding helpers

Implement travis folding helpers

Add a script to create env variables and travis folding helpers

Implement travis folding helpers

Source all of the shell scripts

Remove  since we are sourcing

Fix syntax of travis fold commands

Put the travis folds in the individual files

Put the min test and flake in their own files

Reinstate top level venv activation

Remove unused script commands

Fix travis_fold syntax
This commit is contained in:
Steven Silvester
2014-12-14 12:25:19 -06:00
parent 8f7972474f
commit b9a02e0957
5 changed files with 53 additions and 34 deletions
+7 -16
View File
@@ -25,36 +25,27 @@ python:
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- export PYTHONWARNINGS="all"
- export WHEELHOUSE="--no-index --find-links=http://travis-wheels.scikit-image.org/"
- export TEST_ARGS="--exe --ignore-files=^_test -v --with-doctest --ignore-files=^setup.py$"
- export PIP_DEFAULT_TIMEOUT=60
- sudo apt-get update
- travis_retry tools/travis_setup.sh
- travis_retry tools/travis_install_min.sh
- source ~/venv/bin/activate
- which python
- python --version
- which python; python --version
- python check_bento_build.py
- tools/header.py "Dependency versions"
- tools/build_versions.py
install:
- python setup.py build_ext --inplace
- python setup.py install
script:
- tools/header.py "Run all tests with minimum dependencies"
- nosetests $TEST_ARGS skimage
- tools/header.py "Pep8 and Flake tests"
- flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples
- travis_retry tools/travis_install_optional.sh
- tools/travis_test.sh
- travis_retry tools/travis_test_min.sh
- travis_retry tools/travis_install_all.sh
- travis_retry tools/travis_test_all.sh
after_success:
- coveralls
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -ex
echo -en "travis_fold:start:install.all\r"
tools/header.py "Install optional dependencies"
# Install Qt and then update the Matplotlib settings
@@ -48,3 +50,23 @@ if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then
fi
pip install -q tifffile
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
MPL_QT_API=PyQt4
MPL_DIR=$HOME/.matplotlib
export QT_API=pyqt
else
MPL_QT_API=PySide
MPL_DIR=$HOME/.config/matplotlib
export QT_API=pyside
fi
# Matplotlib settings - do not show figures during doc examples
mkdir -p $MPL_DIR
touch $MPL_DIR/matplotlibrc
echo 'backend : Template' > $MPL_DIR/matplotlibrc
echo -n "travis_fold:end:install.all\r"
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -ex
echo -en "travis_fold:start:install.all\r"
# 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
@@ -29,3 +31,5 @@ pip install $WHEELHOUSE -r requirements.txt
# clean up disk space
sudo apt-get clean
sudo rm -r /tmp/*
echo -en "travis_fold:end:install.all\r"
@@ -1,24 +1,8 @@
#!/usr/bin/env bash
set -ex
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
MPL_QT_API=PyQt4
MPL_DIR=$HOME/.matplotlib
export QT_API=pyqt
echo -en "travis_fold:start:doc.examples\r"
else
MPL_QT_API=PySide
MPL_DIR=$HOME/.config/matplotlib
export QT_API=pyside
fi
# Matplotlib settings - do not show figures during doc examples
mkdir -p $MPL_DIR
touch $MPL_DIR/matplotlibrc
echo 'backend : Template' > $MPL_DIR/matplotlibrc
tools/header.py "Run doc examples"
for f in doc/examples/*.py; do
python "$f"
if [ $? -ne 0 ]; then
@@ -26,6 +10,7 @@ for f in doc/examples/*.py; do
fi
done
for f in doc/examples/applications/*.py; do
python "$f"
if [ $? -ne 0 ]; then
@@ -33,15 +18,22 @@ for f in doc/examples/applications/*.py; do
fi
done
echo -en "travis_fold:end:doc.examples\r"
echo -en "travis_fold:start:test.all\r"
# Now configure Matplotlib to use Qt4
echo 'backend: Agg' > $MPL_DIR/matplotlibrc
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
tools/header.py "Run tests with all dependencies"
fold_start "Test_all_dependencies"
# run tests again with optional dependencies to get more coverage
if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then
TEST_ARGS="$TEST_ARGS --with-cov --cover-package skimage"
fi
nosetests $TEST_ARGS
echo -en "travis_fold:end:test.all\r"
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -ex
echo -en "travis_fold:start:test.min\r"
nosetests $TEST_ARGS skimage
echo -en "travis_fold:end:test.min\r"
echo -en "travis_fold:start:test.flake8\r"
flake8 --exit-zero --exclude=test_*,six.py skimage doc/examples viewer_examples
echo -en "travis_fold:end:test.flake8\r"