-
Notifications
You must be signed in to change notification settings - Fork 41
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
Disable numba
during CI tests to get adequate coverage stats
#358
base: main
Are you sure you want to change the base?
Conversation
Will this make the tests run much slower? On a related note, I'll soon add an issue on geoutils/xdem that we should prefer synthetic tests instead of the Longyearbyen examples for many tests. The real-world tests absolutely have value, but much of the functionality could easily be tested with a small made up numpy array pair that would speed up testing by a lot. Again, I'll add issues when I'm able to spend time on implementing it! |
I also see in the tests that numba complains about this. We could make a custom jit decorator that can take a local or global def jit(func: Callable[Any, Any], disable: bool = DISABLE_NUMBA, numba_kwargs: dict[str, Any] = None):
if disable:
return func
numba_kwargs = numba_kwargs if numba_kwargs is not None else {}
return numba.njit(func, **numba_kwargs) (I haven't tested this code yet) I think it's functools that helps with documentation and type inheritance of decorators, but this might already be fixed by the fact that we rarely (or at all?) use JITed functions directly in userspace (it's wrapped by a 100% python function). |
Yes it would, we do need to make test data smaller!
Fully agree, this is a great idea. But I think it should be done consistently everywhere (outside of a test class, and fed to every single test like the examples are)! |
Ongoing