-
Notifications
You must be signed in to change notification settings - Fork 25
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
Coverage at 51% #69
Comments
But all notebooks (all TTim models) call both the besselnumba and invlapnumba routines. |
If these contain numba functions it could be that coverage is not recognizing them because they are compiled outside of python scope. I think a possible solution would be to use add the |
Indeed. For a variety of packages I test twice, once for coverage with E.g. this project is 90% numba: https://github.com/Deltares/numba_celltree/blob/6092c456587c8f4ade1d3b19e87bc7278b3d379d/pyproject.toml#L85 Presumably the test cases are not too large, such that the slowdown from dynamic Python isn't too bad. And otherwise, it could be worthwhile to split into (small) unit tests for coverage and bigger slow integration tests without coverage. |
Hi, I have just modified the development branch with
How do you assess that @dbrakenhoff ? |
That seems more reasonable in terms of coverage percentage, and not too bad in terms of total run time. I think in the end I'll opt to adapt my fortran vs numba test code that I used to check the numba implementation, and then turn off numba jit for those tests specifically, but until then this seems like a good solution. Thanks for trying it out and reporting the results! |
Fixed in #77. |
besselnumba.py
andinvlapnumba.py
seem to be the cause of the low coverage at the moment:There is a test_bessel.py file in ttim/src/ but it compares fortran compiled bessel functions to their numba counterparts. Adapting this file to test the numba funcs against stored results would probably significantly improve coverage, and actually test the besselnumba code.
The text was updated successfully, but these errors were encountered: