Skip to content

Commit

Permalink
Merge branch 'sklearn-0.17-coverage-tox-integration' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsmith61591 committed Oct 20, 2016
2 parents e94c364 + 4f9d112 commit 69d4660
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ addons:
- g++
- gfortran

env:
- COMBINATION=python-2-7-sklearn-0-17
- COMBINATION=python-2-7-sklearn-0-18
# - COMBINATION=python-3-5-sklearn-0-17
# - COMBINATION=python-3-5-sklearn-0-18

## Install the packages
install:
# We do this conditionally because it saves us some downloading if the
Expand All @@ -33,37 +39,37 @@ install:
- conda info -a

# dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy scikit-learn pandas coverage cython
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy pandas coverage cython
- source activate test-environment

# Coverage packages
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda install --yes -c dan_blanchard python-coveralls nose-cov;
fi

- chmod 777 ./.travis/install.sh
- ./.travis/install.sh
- pip install coveralls
- pip install matplotlib
- pip install seaborn
- pip install tox
- pip install http://h2o-release.s3.amazonaws.com/h2o/rel-turchin/9/Python/h2o-3.8.2.9-py2.py3-none-any.whl
- python setup.py develop

## Run prep for Plotting libraries
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 5 # give xvfb some time to start by sleeping for 5 seconds

## Run tests
script:
script:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
nosetests --with-coverage --cover-package=skutil --logging-level=INFO;
else
nosetests --logging-level=INFO;
fi

## Compute coverage
# Compute Coverage Using Coveralls
after_success:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
coveralls;
fi

fi
10 changes: 10 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

case "${COMBINATION}" in
python-2-7-sklearn-0-17)
pip install scikit-learn==0.17.1
;;
python-2-7-sklearn-0-18)
pip install scikit-learn==0.18
;;
esac
37 changes: 37 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tox]
envlist = python-2-7-sklearn-0-{17,18}

[testenv]
usedevelop=True

[testenv:python-2-7-sklearn-0-17]
basepython = python2.7
deps = scikit-learn==0.17.1
tox
coverage
coveralls
Cython>=0.22
h2o>=3.8.2.9
matplotlib
nose-cov
numpy>=1.6
pandas>=0.18
python-coveralls
scipy>=0.17
seaborn

[testenv:python-2-7-sklearn-0-18]
basepython = python2.7
deps = scikit-learn==0.18
tox
coverage
coveralls
Cython>=0.22
h2o>=3.8.2.9
matplotlib
nose-cov
numpy>=1.6
pandas>=0.18
python-coveralls
scipy>=0.17
seaborn

0 comments on commit 69d4660

Please sign in to comment.