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

Add support for floating point TIFF files in verification of image-based tool outputs #17797

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

kostrykin
Copy link
Contributor

In #17556 and #17581, we added methods for verification of image-based tool outputs. These were backed by Pillow for reading the image data.

However, it turns out, that Pillow is not capable of reading floating point TIFF files. A corresponding test case is added in 4fffff6 and it fails with the previous implementation.

I think that we cannot add we should not add support for any possible niche file format, but floating point TIFF files are widely used in many fields, and thus there is a strong demand to support such files. This PR adds that support by giving precedence to the tifffile library for loading TIFF images.

Notably, the tifffile library is already being used in Galaxy, and only needs to be added to extended-assertions in packages/tool_util/setup.cfg. The test case added in 4fffff6 then passes with the changes from the rest of this PR.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Copy link
Member

@jdavcs jdavcs left a comment

Choose a reason for hiding this comment

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

Everything looks good, thank you!

@mvdbeek mvdbeek merged commit 429c63e into galaxyproject:dev Mar 20, 2024
52 of 53 checks passed
kostrykin pushed a commit to kostrykin/galaxy that referenced this pull request Mar 20, 2024
Add support for floating point TIFF files in verification of image-based tool outputs
kostrykin pushed a commit to kostrykin/galaxy that referenced this pull request Mar 22, 2024
Add support for floating point TIFF files in verification of image-based tool outputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants