Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# .coveragerc to control coverage.py
#

[run]
branch = True
omit =
lib/iris/fileformats/_pyke_rules/compiled_krb/*
lib/iris/tests/*
setup.py
source = lib/iris


[report]
exclude_lines =
pragma: no cover
def __repr__
if __name__ == .__main__.:
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sudo: false

env:
- TEST_TARGET=default
- TEST_TARGET=default COVERAGE=true
- TEST_TARGET=default TEST_MINIMAL=true
- TEST_TARGET=coding
- TEST_TARGET=example
Expand Down Expand Up @@ -59,6 +60,7 @@ install:
conda install --quiet --file conda-requirements.txt;
fi
fi
- pip install coveralls

- PREFIX=$HOME/miniconda/envs/$ENV_NAME

Expand All @@ -77,7 +79,7 @@ install:

# prepare iris build directory
- python setup.py --with-unpack build_ext --include-dirs=${PREFIX}/include --library-dirs=${PREFIX}/lib
- if [[ $TEST_TARGET -ne 'coding' ]]; then
- if [[ $TEST_TARGET != 'coding' && $COVERAGE != true ]]; then
IRIS=$(ls -d1 build/lib*/iris);
mkdir $IRIS/etc;
else
Expand All @@ -94,7 +96,7 @@ install:

# The coding standards tests expect all the standard names and PyKE
# modules to be present.
- if [[ $TEST_TARGET == 'coding' ]]; then
- if [[ $TEST_TARGET == 'coding' || $COVERAGE == true ]]; then
python setup.py std_names;
PYTHONPATH=lib python setup.py pyke_rules;
fi
Expand All @@ -105,7 +107,14 @@ install:

script:
- if [[ $TEST_TARGET == 'default' ]]; then
python -m iris.tests.runner --default-tests --system-tests --print-failed-images;
if [[ $COVERAGE == true ]]; then
SITECUSTOMIZE=$PREFIX/lib/python$TRAVIS_PYTHON_VERSION/site-packages/sitecustomize.py;
echo 'import coverage; coverage.process_startup()' > "$SITECUSTOMIZE";
export COVERAGE_PROCESS_START="$PWD/.coveragerc";
coverage run --concurrency=multiprocessing -p setup.py test --default-tests --system-tests --print-failed-images;
else
python -m iris.tests.runner --default-tests --system-tests --print-failed-images;
fi
fi
- if [[ $TEST_TARGET == 'example' ]]; then
python -m iris.tests.runner --example-tests --print-failed-images;
Expand All @@ -128,3 +137,8 @@ script:
- if [[ $TEST_TARGET == 'coding' ]]; then
python setup.py test --coding-tests;
fi
after_success:
- if [[ $COVERAGE == true ]]; then
coverage combine;
coveralls;
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Iris

[![Build Status](https://api.travis-ci.org/repositories/SciTools/iris.svg?branch=master)](http://travis-ci.org/SciTools/iris/branches)
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.51860.svg)](http://dx.doi.org/10.5281/zenodo.51860)
[![Coverage Status](https://coveralls.io/repos/github/SciTools/iris/badge.svg?branch=master)](https://coveralls.io/github/SciTools/iris?branch=master)

(C) British Crown Copyright 2010 - 2015, Met Office

Expand Down
2 changes: 1 addition & 1 deletion conda-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ netcdf4
numpy
pyke
udunits2
cf_units
cf_units<1.1.1

# Iris build dependencies
setuptools
Expand Down