You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently don't collect and report coverage information to codecov for the CUDA CI, see #31829 (comment)
The .github/workflows/unit-tests.yml script contains a working setup for collecting coverage and uploading it to codecov using GitHub Actions. This is probably a good starting point for the CUDA CI which is defined in .github/workflows/cuda-ci.yml. We might also have to adjust the options passed to pytest in the CUDA CI so that it generates coverage statistics.
One thing to double check/think about is how having a CI that only runs sometimes ends up being displayed on codecov when comparing commits. For example, if main has no coverage for some code because we don't run the CUDA CI on main will it always look like you have missing coverage on a PR? Or does it not matter because our coverage requirements are calculated on the diff only?
Uploading coverage for the CUDA CI seems doable in finite time but I am wondering about how useful this would actually be in practice.
As an not-related data point, we don't have coverage on Windows (was removed because it was too slow a while ago) and I don't think that it a blind spot that has harmed us in the past.
Personally I only look at the coverage when it is red and if the not covered lines are a bit of an edge case, I am like "let's not bother about it".
One thing to double check/think about is how having a CI that only runs sometimes ends up being displayed on codecov when comparing commits
I think patch coverage is based on difference between the PR and main (or the common ancestor
between the PR branch and main?) and not between one commit and the next one.
The codecov page tells you the commit it is comparing against for example this one
One thing to double check/think about is how having a CI that only runs sometimes ends up being displayed on codecov when comparing commits. For example, if main has no coverage for some code because we don't run the CUDA CI on main will it always look like you have missing coverage on a PR?
If I had a bet to place, I would guess it's the other way around, a PR with the CUDA label will always have more coverage than main (assuming we don't run the CUDA CI on main which is what we do currently)? I would guess that the additional coverage would be quite small though and would be ignored in practice.
In the linked PR it came up that we are missing a bit of coverage. Hence this issue. If it isn't a lot of work and doesn't add a lot of runtime I'd vote for adding it. But low priority.
In the linked PR it came up that we are missing a bit of coverage. Hence this issue.
Yep I got that. I was talking mostly about main without CUDA CI compared to PR with CUDA CI (in the case we do add coverage to the CUDA CI), which I thought was one of the worries/questions.
Thanks for the work you've done so far. The goal of this comment
is to set expectations.
Deciding on new features or substantial changes is a lengthy
process. It frequently happens that no maintainer is available
to take on this task right now.
Please do not create a Pull Request before a decision has been
made regarding the proposed work. Making this decision can
often take a significant amount of time and effort.
If someone wants to implement this, it would be welcome. It should mostly be a question of copying the relevant bit of .github/workflows/unit-tests.yml to the cuda-ci.yml. Then fixing what doesn't work.
It isn't a super high priority though as we only rarely run into the problem of missing coverage.
A few months later now I think we don't need this. We use array_api_strict in our normal CI that runs all the time on everything. This should cover all "not numpy" paths. The only exception being branches that are specific to a particular GPU library (if is_cupy(X) style). We have very few to none of those and don't really want to have them either.
In conclusion I think it isn't worth the work and maintenance to do this. A better way to spend our effort would be to work on array_api_strict to make sure it is top notch for testing (no weird quirks and edge cases due to how it is made).
Activity
lesteve commentedon Nov 12, 2025
Uploading coverage for the CUDA CI seems doable in finite time but I am wondering about how useful this would actually be in practice.
As an not-related data point, we don't have coverage on Windows (was removed because it was too slow a while ago) and I don't think that it a blind spot that has harmed us in the past.
Personally I only look at the coverage when it is red and if the not covered lines are a bit of an edge case, I am like "let's not bother about it".
I think patch coverage is based on difference between the PR and
main(or the common ancestorbetween the PR branch and
main?) and not between one commit and the next one.The codecov page tells you the commit it is comparing against for example this one
If I had a bet to place, I would guess it's the other way around, a PR with the CUDA label will always have more coverage than
main(assuming we don't run the CUDA CI onmainwhich is what we do currently)? I would guess that the additional coverage would be quite small though and would be ignored in practice.betatim commentedon Nov 12, 2025
In the linked PR it came up that we are missing a bit of coverage. Hence this issue. If it isn't a lot of work and doesn't add a lot of runtime I'd vote for adding it. But low priority.
lesteve commentedon Nov 13, 2025
Yep I got that. I was talking mostly about
mainwithout CUDA CI compared to PR with CUDA CI (in the case we do add coverage to the CUDA CI), which I thought was one of the worries/questions.github-actions commentedon Nov 17, 2025
Thanks for the work you've done so far. The goal of this comment
is to set expectations.
Deciding on new features or substantial changes is a lengthy
process. It frequently happens that no maintainer is available
to take on this task right now.
Please do not create a Pull Request before a decision has been
made regarding the proposed work. Making this decision can
often take a significant amount of time and effort.
betatim commentedon Nov 27, 2025
If someone wants to implement this, it would be welcome. It should mostly be a question of copying the relevant bit of
.github/workflows/unit-tests.ymlto thecuda-ci.yml. Then fixing what doesn't work.It isn't a super high priority though as we only rarely run into the problem of missing coverage.
betatim commentedon Mar 23, 2026
A few months later now I think we don't need this. We use
array_api_strictin our normal CI that runs all the time on everything. This should cover all "not numpy" paths. The only exception being branches that are specific to a particular GPU library (if is_cupy(X)style). We have very few to none of those and don't really want to have them either.In conclusion I think it isn't worth the work and maintenance to do this. A better way to spend our effort would be to work on
array_api_strictto make sure it is top notch for testing (no weird quirks and edge cases due to how it is made).