Skip to content

Coveralls config doesn't allow viewing source code coverage changes #331

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

Closed
bcipolli opened this issue Jul 21, 2015 · 4 comments
Closed

Comments

@bcipolli
Copy link
Contributor

So, I submitted a PR and am getting a failure check because coveralls reports decreased code coverage. I want to fix this:
image

So I click on the source file to see the coverage changes. But, the repo root directory is not set properly, so I see:
image

Not sure how to fix this. Spent about 20 mins trying to find an answer, but only found other people with the same question. Perhaps someone else has solved this before?

@larsoner
Copy link
Contributor

I've had this problem on other repos. Tried a lot of things (symlinks, etc.) and the only solution was to ensure nosetests (or py.test) was run from the git root directory, so it imported from the src path instead of the install path. This lead to splitting some builds into install version and some to src version testing.

In the meantime you can get coverage locally. Not as convenient, but looking at the files that have been touched can work okay.

@larsoner
Copy link
Contributor

It looks like there are some other workarounds I didn't try (lemurheavy/coveralls-public#471), but I'm not sure it would work.

@bcipolli
Copy link
Contributor Author

@Eric89GXL The link you found is one of the ones I found as well.. but couldn't figure out how to change the settings, even for repos that I own. Note that this is essentially the same as nipy/nipy#311

In the meantime, how would I go about getting coverage locally?

@larsoner
Copy link
Contributor

nosetests --with-coverage --cover-package=nibabel should work. FYI you can look at what .travis.yml says the call should be is since it generates coverage reports (it's the same as what I wrote).

If you want it nicely annotated, I think you can do --cov-html as well.

You can also look at the report generated by the Travis bots, but that's a lot slower than running it on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants