-
Notifications
You must be signed in to change notification settings - Fork 597
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
Add coverage report generation #346
Conversation
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.
I like the coverage report.
I can't really comment but just a reminder to try keep changes isolated - the neovi stuff looks fine but is not on the topic of coverage report generation. :-)
setup.py
Outdated
] | ||
'pytest-cov ~= 2.5', | ||
] + extras_require['serial'] | ||
#for key, requirements in extras_require.items(): |
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.
Please remove the commented out lines
setup.py
Outdated
@@ -8,6 +8,7 @@ | |||
from sys import version_info | |||
import re | |||
import logging | |||
from itertools import chain |
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.
Not used?
return [{ | ||
'serial': NeoViBus.get_serial_number(device) | ||
} for device in ics.find_devices()] | ||
except Exception as e: |
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.
I wonder if this try
/for
should be inverted - if the try
was around each call to get_serial_number
then any working devices can be returned?
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.
I made the code a bit clearer to show that only the call to ics.find_devices()
is wrapped in a try-catch clause. The method NeoViBus.get_serial_number()
itself should never fail.
I've added the codecov integration and travis should now report coverage... Let's see |
Codecov Report
@@ Coverage Diff @@
## develop #346 +/- ##
==========================================
Coverage ? 58.66%
==========================================
Files ? 54
Lines ? 4292
Branches ? 0
==========================================
Hits ? 2518
Misses ? 1774
Partials ? 0
Continue to review full report at Codecov.
|
@hardbyte Well, after changing |
This adds very simple statement coverage reports like this one to the Travis CI & AppVeyor test routines.
It would be nice to also add some tool like Codecov.io. That might help us identify poorly tested regions of code.
Adding coverage tool support via the GitHub Marketplace should be quite straightforward, but I do not have the required admin permissions. @hardbyte Can you do that?