-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-106690: Add a .coveragerc file to the CPython repository #8150
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
Conversation
@terryjreedy https://codecov.io/gh/python/cpython/pull/8150 This is probably a good place to start a discussion on if there's any other common patterns in the python code that should also be excluded. Getting a review from someone knowledgeable with the build process like Brett or Zach would be good for this. |
Also, |
@ammaraskar Can you rebase this please? I think this is good to merge. |
cf182e6
to
60303af
Compare
@zware Sorry for the late response. I needed some time to context-switch back to this, it didn't work last time I tried and I believe it's because codecov itself needs to be aware of the |
@zware, do you want to take another look before merging? Thanks! |
I've not had a chance to swap this back into my brain lately and don't foresee such an opportunity in the near future. I'm in favor of adding a |
Pinging @terryjreedy to resolve this PR stuck for five years total. |
I requested this back when coverage was run with CI and, as I remember, it was proposed that decreased coverage should block merging. Without exclusion of code that cannot be covered by unittests, improvements can decrease 'coverage'. While removal of CI coverage and withdrawal of the gateway proposal removed he urgency of this patch, the accuracy point remains true. My (biased) feeling is that this should still be added (with the comment I added). It is unclear to me whether or when the addition would affect a particular coverage run. The way I run IDLE coverage, it needs to be in the directory that contains the repository. But others cannot, if needed, copy to another place without something in the repository to copy. |
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.
Since CI is green without branch = True
, let us see what happens now with it added.
EDIT: If codecov is not run even unofficially (not sure), this will not do any good. I am running tests sequentially on a fresh local build and will try to manually run with my .coveragerc.
When you're done making the requested changes, leave the comment: |
@Yhg1s Should I backport this to 3.12? It is a new feature, but does not affect any code that does not run coverage or look at repository directory. |
Tests / Docs failure are bogus due to the low PR number (8150). Reported on #106689. |
@terryjreedy, sorry for intruding, but I took the liberty to rename the NEWS file; it used the PR number, not the issue number, in its file name. |
@erlend-aasland Intrude? Thank you for the fix. I just opened the issue to enable that. |
Bogus failure in required test: test_threading changed environment: rerunning. |
…thon#8150) The added file is the coverage default at some point in time + checking branches both ways + IDLE additions, labelled as such and somewhat designed to be unlikely to affect other files. Located in the CPython repository directory, it can be used where it is or copied elsewhere, depending on how one runs coverage. --------- Co-authored-by: Terry Jan Reedy <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
This was requested by Terry Reedy, the coveragerc file is theirs. It ignores code blocks that don't really matter and raise false alarms in terms of missed coverage.
(Can be marked with skip issue and skip news as it pertains to the build process)