-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[py] Run type checks in CI and report typing coverage to codecov #9523
Conversation
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
…tura reports Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
Here's the initial report for the upstream repo. Of course, there's nothing on master to compare against yet, so the codecov-bot will leave no comments as of now. |
Kudos, SonarCloud Quality Gate passed! |
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.
Is there a way to this by using SonarQube? We already use it for the Java bindings and probably keeping an eye on different places is not ideal.
@diemol sure, but AFAIK SonarQube doesn't support |
Codecov Report
@@ Coverage Diff @@
## trunk #9523 +/- ##
========================================
Coverage ? 44.09%
========================================
Files ? 82
Lines ? 5445
Branches ? 247
========================================
Hits ? 2401
Misses ? 2797
Partials ? 247 Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! |
Description
This PR adds another Github action that runs type checks (using the
mypy
toxenv) and reports the current status to https://codecov.io. An example report, generated from this branch in my fork, can be viewed here: in the typing context,100%
coverage means all types could be successfully resolved and verified, while<100%
indicates missing, incomplete or erroneous type hints. Navigating to a module unveils the spots in question.Example: In the above example, the
selenium.common
package is fully typed (green color & 100% coverage), whileselenium.webdriver.chrome.options
module is not - more details can be found intox_mypy
job log, wheremypy
will report an error for the line. In this example:(relevant spot in the job log for reference)
This way, one should be able to easily track the typing errors.
Motivation and Context
This is a proposal to address the discussion in #9482. It is added for @AutomatedTester for an evaluation!
Also, once merged into master,
codecov
should start tracking the changes in upcoming PRs, comparing typing coverage against the current master (an example on how it will look like, although this comment actually reports code coverage difference).Once all typing errors are resolved (thus a 100% typing coverage achieved for the complete Python codebase), we can stop reporting the typing coverage and just run
tox -c py/tox.ini
intox_mypy
job. It will then simply fail on new typing errors.Types of changes
Checklist