Closed tomwhite closed 2 months ago
... the tests against scikit-allel are still failing. Maybe time to add the scikit-allel test data and drop the dependency?
Originally posted by @timothymillar in https://github.com/sgkit-dev/sgkit/issues/1228#issuecomment-2178140077
I didn't see this before, but I agree - it looks like scikit-allel won't work against NumPy 2 since its cython code is incompatible.
We only use it in the tests for comparing our methods implementations:
As @timothymillar said, we could export some test data from scikit-allel for the few remaining cases where we want to check the output of sgkit.
Another failing case I found was in the VCF writer code.
I think this was actually passing by accident before. NumPy will round towards the nearest even value, so in this case it would be 0.000, not 0.001. However, due to what I think were changes in NumPy around value-based promotion (https://numpy.org/neps/nep-0050-scalar-promotion.html) this test fails in NumPy 2, while it passed in NumPy 1. Also, in Numba it passes - when using NumPy 1 or 2, since Numba has not yet caught up on that aspect of NumPy 2 (i.e. it is still following NumPy 1 behaviour).
So I think it's best to drop the test for that case, since it is arguably incorrect anyway (0.0005 should round to 0).
I noticed that scikit-allel is now compatible with NumPy 2, which makes this a lot easier! (Thanks @alimanfoo for that!)
I have updated #1237.
Tim made some fixes in #1228, but there are still some more