Repository navigation
Fix coverage checking - #8057
Merged
Merged
Conversation
sklam
reviewed
May 17, 2022
Comment on lines
+38
to
+39
| os.path.dirname(__file__), | ||
| 'coverage.conf') |
Member
There was a problem hiding this comment.
There's already a .coveragerc (https://github.com/numba/numba/blob/main/.coveragerc)
| @@ -0,0 +1,15 @@ | |||
| # configuration file used by run_coverage.py | |||
Due to various slight oddities in `numba._runtests._main()`'s handling of arguments, it's actually hard to make this script work robustly across platforms and different invocation methods. Instead it would be better to document how to use the `coverage` CLI tool, as is done in practice by maintainers when investigating coverage.
Member
Author
|
@sklam thanks for the feedback. WIth testing across Linux and Windows, and different ways of invoking it, e.g. I found there's a bunch of fiddly issues still to resolve that seem a bit pointless to plough much time into. Instead, I think it's better to document the workflow using the coverage CLI tool, so I've updated this PR accordingly.
|
Member
|
Yes, that's how I use it mostly. (referring to the added docs) The only other tip is to only get a report on changed files when reviewing PRs to speed things up. I use something like: #! /usr/bin/env ipython
changed_files = !git diff --name-only origin/main...
print("changed files...")
for f in changed_files:
print(" ", f)
changed_files = ','.join(changed_files)
!coverage xml -o cov.xml --include=$changed_files |
Member
|
Thank you for the patch! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run_coverage.pyseemed to be broken in a couple of ways - these updates allow me to run it locally again - for example, invokingresults in running the CUDA tests, with a coverage report produced in the
htmlcovdirectory.