-
-
Notifications
You must be signed in to change notification settings - Fork 330
Use Coveralls #118
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
Use Coveralls #118
Conversation
An example of the coverage report from Coveralls can be seen in this report. |
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.
Thank you for this, happy to merge with slight change to tox setup.
tox.ini
Outdated
py27,py34,py35: nosetests -v zarr | ||
py36: nosetests -v --with-coverage --cover-erase --cover-min-percentage=100 --cover-package=zarr --with-doctest --doctest-options=+NORMALIZE_WHITESPACE zarr | ||
py27: nosetests -v --with-coverage --cover-erase --cover-package=zarr zarr | ||
py34,py35,py36: nosetests -v --with-coverage --cover-erase --cover-package=zarr --with-doctest --doctest-options=+NORMALIZE_WHITESPACE zarr |
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.
Could you modify this so that the doctests are only run under PY36? There are some dict ordering issues which mean getting consistent doctest runs across all PY3.X versions is hard, I'm happy if doctests are only run for PY36.
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.
No problem.
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.
Done.
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.
Are the dict
ordering issues related to Python's salting of hashes? If so, I would have thought setting PYTHONHASHSEED
to a fixed value would solve this issue. Though a more robust solution would probably be to use OrderedDict
s. That said, given you have set PYTHONHASHSEED
and it was working before, I'm a bit curious to know if there is more to the story.
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.
Yeah, I don't understand. It's something new in PY36, works fine in both PY34 and PY35. I know dict implementation has changed in PY36, guessing that has something to do with it.
Instead of just gathering coverage statistics on Python 3.6, gather coverage on all Pythons so that it can be reported. Also drop the 100% coverage constraint as there are better ways to enforce that with Coveralls.
Alright, I think this is ready on my end. Is Coveralls already enabled on this repo? |
Thanks. Coveralls is enabled, could you add the badge to the README:
|
[ci skip]
Of course. Added. |
Should add that Coveralls by default is enabled to leave comments and/or statuses on PRs/commits. My recommendation would be to turn off comments, but leave on the status. Also one can add a coverage threshold. So this would be a good way to enforce 100%. Plus it is very visible as it can show up in the PR status, which makes it easy to see that coverage dropped for a PR and to go back and figure out why coverage dropped. |
Awesome, thank you! |
Fixes https://github.com/alimanfoo/zarr/issues/117
Displays line numbers missed by the test coverage. Reports coverage to Coveralls. Needs to have Coveralls enabled on the repo to work.