-
Notifications
You must be signed in to change notification settings - Fork 35
Decide how to test numba functions #77
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
Comments
Just wanted to mention pytest markers, it doesn't solve the main issue but might be useful here. |
Why is code coverage only possible on the original functions? I like your alternative if that's the case. I don't think it's important for #76, but I think in most cases we should have |
Hey @daletovar! I'm not sure except that codecov recognizes that there's code to be covered in an |
@eric-czech, thanks for clarifying all of that for me. I'm still +1 on your alternative idea. |
I wonder if we can close this given that we are turning off coverage for numba functions (see #380 and linked issue)? I think reviewers just need to be careful to check that all new numba functions have unit tests. |
Fixed in #964 |
Testing and getting coverage on jit-compiled functions presents a couple challenges. In https://github.com/pystatgen/sgkit/pull/76, I started by creating separate variables for jit-functions and testing them alongside the original function as part of the same test run. Two reasons for this are that:
One alternative to this would be to not have separate versions of each function and do this instead:
I think this alternative is better, but I'm not sure what a good way is to limit the scope of tests run with JIT on.
The text was updated successfully, but these errors were encountered: