Permalink
Browse files

TST: CI testing based upon Miniconda with coverage

CI testing using Travis-CI now uses Miniconda to build a Python enviroment.
This allows use to use pre-build binaries of the various required by Py-ART from
binstar.  With this all unit tests are run (none skipped).  This commit also
adds test coverage reporting to [Coveralls](https://coveralls.io/)/
  • Loading branch information...
1 parent d8e1cf8 commit 35fdd06e38e0a254a6b1ec6150be5eebb35f922b @jjhelmus jjhelmus committed Jan 20, 2014
Showing with 45 additions and 18 deletions.
  1. +7 −0 .coveragerc
  2. +38 −18 .travis.yml
View
@@ -1,3 +1,10 @@
+[run]
+source = pyart
+include = */pyart/*
+omit =
+ */setup.py
+ */tests*
+
[report]
exclude_lines =
pragma: no cover
View
@@ -2,25 +2,45 @@
# This is a modified version of the .travis.yml file from the scikit-learn
# project: https://github.com/scikit-learn/scikit-learn
#
-# Currently we are testing only using the host Python 2.7 in order to avoid
-# compiling SciPy from source. Using wheel binaries may allow us to
-# efficiently test on other Python versions, but requires significant
-# additional work.
+# We are using Miniconda to provide a Python environment. This
+# allows us to perform a conda based install of the SciPy stack on multiple
+# versions of python as well as use conda and binstar to install additional
+# module which are not in the default Anaconda repository.
+#
language: python
python:
- "2.7"
+# - "2.6" # disable while testing, also broken
before_install:
- - deactivate
- # Add the adrian-m-benson Ubuntu repo so we can apt-get python-netcdf4
- - sudo add-apt-repository -y ppa:adrian-m-benson/ppa
- - sudo apt-get update -qq
- # Install the SciPy stack
- - sudo apt-get install -qq python-scipy python-nose python-matplotlib
- # Install additional Py-ART dependencies
- - sudo apt-get install -qq python-cvxopt python-netcdf4
- - virtualenv --system-site-packages ~/virtualenv/this
- - source ~/virtualenv/this/bin/activate
-install: python setup.py build_ext --inplace
-# run the tests inside a virtual X server so that matplotlib can plot
-# No RSL related tests are executed as we do not install RSL
-script: xvfb-run nosetests -v pyart
+ # Download and install Miniconda
+ - wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh
+ - chmod +x miniconda.sh
+ - ./miniconda.sh -b
+ - export PATH=/home/travis/anaconda/bin:$PATH
+ # Update conda
+ - conda update --yes conda
+ - conda update --yes conda
+ # Create a testenv
+ - conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
+ - source activate testenv
+ # Install dependencies from the anaconda repo to the environment
+ - conda install --yes numpy scipy matplotlib netcdf4 basemap nose
+ # Install additional packages from Binstar
+ - conda install --yes -c http://conda.binstar.org/jjhelmus pyproj trmm_rsl
+ # LP solver cylp and its dependancy CBC
+ - conda install --yes -c http://conda.binstar.org/jjhelmus cbc cylp
+ # LP solvers pyglpk based on GLPK
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq libglpk-dev
+ - conda install --yes -c http://conda.binstar.org/jjhelmus pyglpk
+ # LP solvers cvxopt with GLPK support
+ - conda install --yes -c http://conda.binstar.org/jjhelmus cvxopt_glpk
+install:
+ - export RSL_PATH=~/anaconda/envs/testenv
+ - pip install python-coveralls --use-mirrors
+ - pip install nose-cov --use-mirrors
+ - python setup.py build_ext --inplace
+
+script: xvfb-run nosetests -v --with-cov --cov pyart pyart
+after_success:
+ - coveralls

0 comments on commit 35fdd06

Please sign in to comment.