Skip to content

Commit

Permalink
CI: condense back to just one .coveragerc file
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel committed May 28, 2019
1 parent 321619e commit b72fde0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 122 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Expand Up @@ -2,6 +2,7 @@
[run]
source = statsmodels
branch = True
plugins = Cython.Coverage

omit =
# print_version is untestable
Expand Down Expand Up @@ -47,6 +48,7 @@ exclude_lines =
except NotImplementedError
except ImportError
except (HTTPError, URLError, SSLError, timeout)

# Ignore pass
pass

Expand Down
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -143,11 +143,7 @@ before_install:
- |
if [ ${COVERAGE} = true ]; then
pip install codecov coverage coveralls pytest-cov
if [ -z ${SM_CYTHON_COVERAGE} ] || [ ${SM_CYTHON_COVERAGE} = false ]; then
export COVERAGE_OPTS="--cov-config=tools/coveragerc/.coveragerc_travis --cov=statsmodels --cov-report="
else
export COVERAGE_OPTS="--cov-config=tools/coveragerc/.coveragerc_cython --cov=statsmodels --cov-report="
fi
export COVERAGE_OPTS="--cov=statsmodels --cov-report="
echo "Cython coverage:" ${SM_CYTHON_COVERAGE}
else
export COVERAGE_OPTS=""
Expand Down Expand Up @@ -179,5 +175,5 @@ script:
- ./lint.sh

after_success:
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/tools/coveragerc/.coveragerc_travis; fi
- if [ ${COVERAGE} = true ]; then coveralls; fi
- if [ ${COVERAGE} = true ]; then codecov; fi
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -2,8 +2,7 @@
To build with coverage of Cython files
export SM_CYTHON_COVERAGE=1
python setup.py develop
pytest --cov-config=tools/coveragerc/.coveragerc_cython --cov=statsmodels \
statsmodels
pytest --cov=statsmodels statsmodels
"""
import fnmatch
import os
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/travis_conda.sh
Expand Up @@ -18,7 +18,7 @@ PKGS="${PKGS} patsy"; if [ ${PATSY} ]; then PKGS="${PKGS}=${PATSY}"; fi
PKGS="${PKGS} pandas"; if [ ${PANDAS} ]; then PKGS="${PKGS}=${PANDAS}"; fi
PKGS="${PKGS} Cython"; if [ ${CYTHON} ]; then PKGS="${PKGS}=${CYTHON}"; fi
if [ ${USEMPL} = true ]; then PKGS="${PKGS} matplotlib"; if [ ${MATPLOTLIB} ]; then PKGS="${PKGS}=${MATPLOTLIB}"; fi; fi
if [ ${COVERAGE} = true ]; then export COVERAGE_OPTS=" --cov-config=.coveragerc_travis --cov=statsmodels "; else export COVERAGE_OPTS=""; fi
if [ ${COVERAGE} = true ]; then export COVERAGE_OPTS=" --cov=statsmodels "; else export COVERAGE_OPTS=""; fi
echo conda create --yes --quiet -n statsmodels-test python=${PYTHON} ${BLAS} ${PKGS} ${OPTIONAL} ${DEPEND_ALWAYS}
conda create --yes --quiet -n statsmodels-test python=${PYTHON} ${BLAS} ${PKGS} ${OPTIONAL} ${DEPEND_ALWAYS}
source activate statsmodels-test
Expand Down
56 changes: 0 additions & 56 deletions tools/coveragerc/.coveragerc_cython

This file was deleted.

55 changes: 0 additions & 55 deletions tools/coveragerc/.coveragerc_travis

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -52,7 +52,7 @@ setenv =
changedir = {toxinidir}
commands =
coverage erase
pytest -n 2 --cov-config .coveragerc --cov-report html --cov=statsmodels statsmodels
pytest -n 2 --cov-report html --cov=statsmodels statsmodels

[testenv:cython-coverage]
usedevelop = True
Expand All @@ -65,4 +65,4 @@ setenv =
changedir = {toxinidir}
commands =
coverage erase
pytest -n 2 --cov-config tools/coveragerc/.coveragerc_cython --cov-report html --cov=statsmodels statsmodels
pytest -n 2 --cov-report html --cov=statsmodels statsmodels

0 comments on commit b72fde0

Please sign in to comment.