-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
codecov/project fail #796
Comments
@moazreyad It is very strange that the test analyzes the coverage on tensor.h in this PR which is totally unrelated |
There is a problem in this PR because it installs singa in python 3.6 and executes the test cases from python3.7/site-packages folder which does not work. Please fix this different python versions problem. Note also that the project coverage threshold can be set in .codecov.yml like this:
The value of threshold can be chosen by the development team based on the quality needs. In the best case, every PR should not reduce the coverage because this means it either added code without test case or it removed (or disabled) the test cases for existing code. However, if the team think this is too strict requirement, we may choose the threshold to 5% or even more. But this means that a PR can be allowed to pass even if it reduces the code coverage too much. The PR #795 reduces the coverage by 4.97%, so setting the threshold to 5% should make it pass. But this is not recommended solution. We can use it only if the team thinks it is too strict to keep the coverage change always zero or positive. In this case, we may allow threshold of 1% or 2% to pass. But 5% seems high to me and it means there is a lot of code that was not tested and there is a problem. And thanks to the strict code coverage, we found the different python versions problem. Without the strict coverage check, may be this problem will be hidden and will cause other problems later. |
After fixing the python version issue, code coverage fails again.. |
Seems it does not provide the suggestions on how to improve the code coverage. |
The coverage is now decreased by 0.01% instead of 4.97%. It still fails because we did not specify a threshold, so any decrease any in the coverage will make test fails. To solve this problem, either add a small threshold like 0.1 % to allow small drops in coverage generally in all PRs, or leave the threshold decision to each pull request reviewer to decide if the decrease in the specific PR is fine and it can be merged or it is not fine and must be fixed.
Yes, it just reports the coverage results without suggestions on how to fix. This is similar to all the test cases which report the error but of course they do not usually suggest how to fix it. To improve the coverage, the developer needs to investigate more how to create the suitable test cases to cover his new code, or how not to prevent current test cases from running (like the problem that we had in #795). |
Thanks for the explanation. |
Pls check https://github.com/apache/singa/pull/795/checks?check_run_id=1115935742
The text was updated successfully, but these errors were encountered: