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

scikit-image v0.19.3 #91

Closed regro-cf-autotick-bot closed 2 years ago

regro-cf-autotick-bot commented 2 years ago

It is very likely that the current package version for this feedstock is out of date.

Checklist before merging this PR:

Information about this PR:

  1. Feel free to push to the bot's branch to update this PR if needed.
  2. The bot will almost always only open one PR per version.
  3. The bot will stop issuing PRs if more than 3 version bump PRs generated by the bot are open. If you don't want to package a particular version please close the PR.
  4. If you want these PRs to be merged automatically, make an issue with code>@conda-forge-admin,</codeplease add bot automerge in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.
  5. If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

Dependency Analysis

Please note that this analysis is highly experimental. The aim here is to make maintenance easier by inspecting the package's dependencies. Importantly this analysis does not support optional dependencies, please double check those before making changes. If you do not want hinting of this kind ever please add bot: inspection: false to your conda-forge.yml. If you encounter issues with this feature please ping the bot team conda-forge/bot.

Analysis by source code inspection shows a discrepancy between it and the the package's stated requirements in the meta.yaml.

Packages found by source code inspection but not in the meta.yaml:

Packages found in the meta.yaml but not found by source code inspection:

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/2484627973, please use this URL for debugging.

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

Seeing Python 3.7 failures here with

           AttributeError: module 'scipy.sparse' has no attribute 'coo_array'

These seem to be a problem with incompatible versions of networkx and scipy being chosen and does not seem to be a problem with scikit-image itself. Specifically, the issue seems to be that the version of networkx that was chosen (2.7.1) requires scipy>=1.8.0 but SciPy 1.7.3 was installed in the failing case I looked at.

pinging @rossbar and @jarrodmillman for visibility. Seems like something that may require constraints to be added to the networkx package

rossbar commented 2 years ago

Specifically, the issue seems to be that the version of networkx that was chosen (2.7.1) requires scipy>=1.8.0 but SciPy 1.7.3 was installed in the failing case I looked at.

Yes, this is indeed the case. NetworkX has chosen to be an early adopter for the scipy.sparse array interface, thus the requirement of a relatively recent scipy version. Note however that scipy is a soft dependency for networkx, meaning that only a subset of functionality depends on scipy. So if scikit-image is using networkx functions that in turn depend on scipy, the dependency pinning will have to be done in scikit-image. The two options that come to mind are:

  1. Pin networkx<2.7 (2.7 is the version where the scipy.sparse array interface was adopted)
  2. Adopt the scipy pin defined in requirements/default.txt for the version of networkx you wish to support (e.g. 2.7, as shown).
grlee77 commented 2 years ago

I think another option is adding run_constrained with scipy >=1.8 to NetworkX, but could be mistaken.

@hmaarrfk : any opinion on what the best option here is?

hmaarrfk commented 2 years ago

Why isn't conda finding this relatively recent version of scopy?

hmaarrfk commented 2 years ago

if you are going to add a run consgraint on scipy you might as well bump the requirent outright.

you could specofy a minimum version of scipy during the testing phase.

grlee77 commented 2 years ago

Why isn't conda finding this relatively recent version of scopy?

It is except for the Python 3.7 cases. That is because SciPy 1.8 is built only for Python >= 3.8 (there is a skip here)

grlee77 commented 2 years ago

if you are going to add a run consgraint on scipy you might as well bump the requirent outright.

I meant whether it should be added to the networkx package which does not list SciPy at all currently since it is an optional dependency there. Likely we still need to apply some fix here in the meantime.

grlee77 commented 2 years ago

something like the following may work here in the meantime?

networkx >=2.2,<2.7   # [py<=37]
networkx >=2.2  # [py>37]
hmaarrfk commented 2 years ago

I think another option is adding run_constrained with scipy >=1.8 to NetworkX, but could be mistaken.

You should make that case on the networkx feedstock.we could release an other build of scikit image if that is accepted.

grlee77 commented 2 years ago

Okay, that pinning seems to have fixed the networkx-related errors. There is a single test failure with one of the x86 PyPy runs:

____________________________ test_wrap_around[3-0] _____________________________

ndim = 3, axis = 0

    @skipif(sys.version_info[:2] == (3, 4),
            reason="Doesn't work with python 3.4. See issue #3079")
    @testing.parametrize("ndim, axis", dim_axis)
    def test_wrap_around(ndim, axis):
>       check_wrap_around(ndim, axis)

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/site-packages/skimage/restoration/tests/test_unwrap.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ndim = 3, axis = 0

    def check_wrap_around(ndim, axis):
        # create a ramp, but with the last pixel along axis equalling the first
        elements = 100
        ramp = np.linspace(0, 12 * np.pi, elements)
        ramp[-1] = ramp[0]
        image = ramp.reshape(tuple([elements if n == axis else 1
                                    for n in range(ndim)]))
        image_wrapped = np.angle(np.exp(1j * image))

        index_first = tuple([0] * ndim)
        index_last = tuple([-1 if n == axis else 0 for n in range(ndim)])
        # unwrap the image without wrap around
        # We do not want warnings about length 1 dimensions
        with expected_warnings([r'Image has a length 1 dimension|\A\Z']):
            image_unwrap_no_wrap_around = unwrap_phase(image_wrapped, seed=0)
        print('endpoints without wrap_around:',
              image_unwrap_no_wrap_around[index_first],
              image_unwrap_no_wrap_around[index_last])
        # without wrap around, the endpoints of the image should differ
        assert_(abs(image_unwrap_no_wrap_around[index_first] -
                    image_unwrap_no_wrap_around[index_last]) > np.pi)
        # unwrap the image with wrap around
        wrap_around = [n == axis for n in range(ndim)]
        # We do not want warnings about length 1 dimensions
        with expected_warnings([r'Image has a length 1 dimension.|\A\Z']):
            image_unwrap_wrap_around = unwrap_phase(image_wrapped, wrap_around,
                                                    seed=0)
        print('endpoints with wrap_around:',
              image_unwrap_wrap_around[index_first],
              image_unwrap_wrap_around[index_last])
        # with wrap around, the endpoints of the image should be equal
        assert_almost_equal(image_unwrap_wrap_around[index_first],
>                           image_unwrap_wrap_around[index_last])
E       AssertionError: 
E       Arrays are not almost equal to 7 decimals
E        ACTUAL: -6.283185307179586
E        DESIRED: 31.41592653589793
grlee77 commented 2 years ago

Should we merge this as-is despite the PyPy-related test failure? (can open a separate issue related to that)

hmaarrfk commented 2 years ago

@conda-forge-admin please restart cis

hmaarrfk commented 2 years ago

i skipped the test, so hopefully things will pass. I don't think it is worth "not supporting pypy" for one feature.

grlee77 commented 2 years ago

i skipped the test, so hopefully things will pass. I don't think it is worth "not supporting pypy" for one feature.

Yeah, I agree this is better.

github-actions[bot] commented 2 years ago

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

Thus the PR was passing and merged! Have a great day!

github-actions[bot] commented 2 years ago

Hi! This is the friendly conda-forge automerge bot!

Commits were made to this PR after the automerge label was added. For security reasons, I have disabled automerge by removing the automerge label. Please add the automerge label again (or ask a maintainer to do so) if you'd like to enable automerge again!

hmaarrfk commented 2 years ago

@conda-forge-admin please rerender

hmaarrfk commented 2 years ago

woot woot!

grlee77 commented 2 years ago

Thanks @hmaarrfk !