Skip to content

Commit

Permalink
Merge pull request #4 from joshloyal/josh/coveralls
Browse files Browse the repository at this point in the history
added coverage report generation (coveralls.io)
  • Loading branch information
joshloyal committed Jun 12, 2016
2 parents b845c88 + 4dad92c commit 752c5bf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[run]
branch = True
source = rgforest
omit =
*/setup.py
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ language: python
matrix:
include:
- python: 2.7
env: TEST_MODE=TESTS
env: TEST_MODE=TESTS COVERAGE=true
#- python: 2.7
# env: TEST_MODE=PEP8

Expand All @@ -16,8 +16,5 @@ install:
script:
bash build_tools/test_script.sh

#after_success:
# # Report coverage results to codecov.io
# # and export tox environment variables
# - pip install codecov
# - codecov -e TOX_ENV TRAVIS_OS_NAME
after_success:
- coveralls || echo "Coveralls upload failed"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Regularized Greedy Forest
[![Build Status](https://travis-ci.org/joshloyal/RegularizedGreedyForest.svg?branch=master)](https://travis-ci.org/joshloyal/RegularizedGreedyForest)
[![Coverage Status](https://coveralls.io/repos/github/joshloyal/RegularizedGreedyForest/badge.svg?branch=master)](https://coveralls.io/github/joshloyal/RegularizedGreedyForest?branch=master)

## Description
Cython wrapper around the Regularized Greedy Forest algorithm
8 changes: 7 additions & 1 deletion build_tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ conda info -a
# install dependencies
conda create -q -n testvenv python=$TRAVIS_PYTHON_VERSION numpy scipy cython scikit-learn pytest
source activate testvenv
pip install pytest-cov
pip install pytest-xdist

# if we also need to generate a coverage report
if [[ "$COVERAGE" == "true" ]]; then
#pip install pytest-cov python-coveralls coverage==3.7.1
pip install pytest-cov coverage coveralls
fi

# install package
python --version
Expand Down
6 changes: 5 additions & 1 deletion build_tools/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
set -e

# run tests
py.test rgforest
if [[ "$COVERAGE" == "true" ]]; then
py.test --cov=rgforest --cov-report=term --cov-report=html -s rgforest
else
py.test -s rgforest
fi

0 comments on commit 752c5bf

Please sign in to comment.