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

relax the enforce_exists check because it will be done later #42

Merged
merged 7 commits into from
Apr 30, 2024

Conversation

toloudis
Copy link
Contributor

@toloudis toloudis commented Apr 29, 2024

Link to Relevant Issue

This pull request resolves #41

Description of Changes

Related to #40 .
companion PR to bioio-ome-zarr: bioio-devs/bioio-ome-zarr#20
Don't enforce_exists until specific Readers are trying to check for file support.

A side effect of this is that some bad file paths will raise a different kind of exception. (see modified unit test)

BONUS FIX: macos-latest CI build was failing due to M1 support for imageio-ffmpeg.

Copy link
Contributor

@evamaxfield evamaxfield left a comment

Choose a reason for hiding this comment

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

In general I approve. Still wish we could give back a specific "this file wasn't found" vs "this file isn't supported" error but I understand

@toloudis
Copy link
Contributor Author

In general I approve. Still wish we could give back a specific "this file wasn't found" vs "this file isn't supported" error but I understand

There is a way to do this - it's possible for the ReaderClass.is_supported_image to raise it now, so I added a couple lines to catch and rethrow it.
No unit test gets this because there are no plugin readers installed when we run the unit tests.
But I verified by adding a tiff plugin and sending a fake .tiff file path and it did raise FileNotFound

@toloudis toloudis merged commit 709fb55 into main Apr 30, 2024
13 checks passed
@toloudis toloudis deleted the fix/http-directory-as-path branch April 30, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP URL for ZARR fails to be validated by determine_plugin for bioio-ome-zarr
4 participants