Skip to content
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

Handle pending changes to tifffile defaults and avoid test warnings #6460

Merged
merged 8 commits into from Oct 19, 2022

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Aug 7, 2022

Description

closes #5337
closes #6558
closes #6572

I see no warnings from the IO module on my system, but it is possible some other versions of dependencies may still warn. Let's see how the tests here go.

We need to decide if we should be adding these kwargs in the plugins for backwards compatibility or if our policy is just to dispatch to whatever the tifffile defaults are when writing unless the user supplies kwargs. In this PR, I chose to automatically set the needed kwargs internally to the plugin for backwards compatiiblity and for consistent behavior across current and future tifffile versions.

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • There is a bot to help automate backporting a PR to an older branch. For
    example, to backport to v0.19.x after merging, add the following in a PR
    comment: @meeseeksdev backport to v0.19.x
  • To run benchmarks on a PR, add the run-benchmark label. To rerun, the label
    can be removed and then added again. The benchmark output can be checked in
    the "Actions" tab.

@grlee77 grlee77 added the 🔧 type: Maintenance Refactoring and maintenance of internals label Aug 7, 2022
Copy link
Member

@mkcor mkcor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this! 🙏
I do see the warnings from the IO module on my system:

Python 3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:33) 
scikit-image.git@29770dbc9fd34131d69b6f9c2fbb1ead835562cd#egg=scikit_image
tifffile==2022.5.4

skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/tests/test_pil.py Outdated Show resolved Hide resolved
skimage/io/tests/test_pil.py Outdated Show resolved Hide resolved
grlee77 and others added 3 commits October 17, 2022 09:49
Co-authored-by: Marianne Corvellec <marianne.corvellec@ens-lyon.org>
Co-authored-by: Marianne Corvellec <marianne.corvellec@ens-lyon.org>
Copy link
Member

@stefanv stefanv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me; just the one typo in the docstring, all the other suggestions are stylistic.

skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Outdated Show resolved Hide resolved
skimage/io/_plugins/tifffile_plugin.py Show resolved Hide resolved
Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
@mkcor mkcor merged commit e65d4c5 into scikit-image:main Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
3 participants