New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating Coverage.py with cesium #211
Conversation
… and added .coveragerc file to limit files checked by coverage.py
after_success: .drone/deploy_docs.sh | ||
after_success: | ||
- .drone/deploy_docs.sh | ||
- codecov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at deploy_docs.sh to see how to only run this on one Python version
Problem: the test suite will now get run twice, once without and once with coverage, under Python 3.5. Can we change it so that it only is run once? |
if [[$COVERAGE == 1]] | ||
|
||
then | ||
echo "Python version: 3.4/3.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get rid of this line
set -e | ||
|
||
if [[$COVERAGE == 1]] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this blank line
echo "Running coverage.py" | ||
nosetests -v --exe --with-coverage | ||
else | ||
echo "Python version: 2.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this "else" segment
@@ -7,7 +7,17 @@ source ~/envs/cesium/bin/activate | |||
|
|||
section "Tests" | |||
|
|||
make ${TEST_TARGET} | |||
if [[$COVERAGE == 1]] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove blank line
if [[$COVERAGE == 1]] | ||
|
||
then | ||
echo "Python version: 3.4/3.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line
else | ||
echo "Python version: 2.x" | ||
echo "Coverage not set up for python 2.x" | ||
make ${TEST_TARGET} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like TEST_TARGET is unused. Let's remove it from .travis.yml, and then do something like this:
if [[ $COVERAGE == 1 ]]; then
NOSE_FLAGS="--with-coverage"
fi
nose -v $NOSE_FLAGS cesium
We probably also need a command to upload the coverage report to cov.io? |
@stefanv I'm not entirely sure, this seems to suggest that integration is handled automatically: https://github.com/codecov/codecov-python (specifically the Configuration section). Thoughts? |
It looks like they have the following:
|
Hmm I am a little confused in that case. Initially, that same line |
In most cases, that command just won't do anything, since there's no
coverage information to upload:
https://travis-ci.org/scikit-image/scikit-image/jobs/174340273#L7563
|
Alright, I have added that line back in. Thanks for catching it. Also, does the cesium-ml repo might have to be registered at |
I've registered cesium with them now, so we should be good to go!
|
Looks like codecov is missing (no pip install?):
https://travis-ci.org/cesium-ml/cesium/jobs/175605412#L1617
Also, code coverage is enabled for two items in the matrix, instead
of just one.
|
Excellent, thanks @arkwave ! |
This does not appear to actually work (see: all the PRs since this was merged). |
See #237 |
coverage.py
from testing scikit-learn imports