conda-forge / scikit-image-feedstock

A conda-smithy repository for scikit-image.
BSD 3-Clause "New" or "Revised" License
4 stars 25 forks source link

Update to 0.19.0 and sanitize cythonized files. #86

Closed erykoff closed 2 years ago

erykoff commented 2 years ago

Checklist

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

grlee77 commented 2 years ago

Thanks for working on this @erykoff!

erykoff commented 2 years ago

Well, it looks like the cleaning the cython files (or rather make clean) is good practice, and might fix some things, but does not fix the underlying problem.

On this PR I've added a proposed patch to the test_rank.py code to explicitly apply a modulo before type casting which avoids the undefined conversion errors. See e.g. https://frama-c.com/2013/10/09/Overflow-float-integer.html

When a finite value of real floating type is converted to an integer type other than _Bool the fractional part is discarded (i.e. the value is truncated toward zero). If the value of the integral part cannot be represented by the integer type the behavior is undefined.

erykoff commented 2 years ago

Argh, there are more places where these tests are failing. I'll patch them up in the same way and add make as a dependency.

grlee77 commented 2 years ago

On this PR I've added a proposed patch to the test_rank.py code to explicitly apply a modulo before type casting which avoids the undefined conversion errors. See e.g. https://frama-c.com/2013/10/09/Overflow-float-integer.html

I was just doing the same thing! it is currently running in #87

hmaarrfk commented 2 years ago

Hey all, I really won't mind if you squash all my contributions into yours. I don't really care for conda-forge "credit" in the PRs and I think a clean PR is better than a messy one for some conda-forge things.

erykoff commented 2 years ago

Closed in favor of #87