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

bugfix/supported_files #9

Merged
merged 2 commits into from
Jan 6, 2025
Merged

bugfix/supported_files #9

merged 2 commits into from
Jan 6, 2025

Conversation

BrianWhitneyAI
Copy link
Contributor

@BrianWhitneyAI BrianWhitneyAI commented Dec 12, 2024

Description

The purpose of this PR is to distinguish glob files from tiff files in _is_supported_image() by calling the init directly. This Pr also adds some error handling to the init so that if the file fails to initialize it will raise an UnsupportedFileFormatError. This PR is half of a response to #7.

How to Review

This PR looks larger than it is due to wrapping the init in try/except. Please look at the _is_supported_image() and the specific error handling for the init.

Copy link

@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.

I haven't looked at this reader in a long while but I think this all makes sense to me. The largest change here is the addition of the try + except correct?

@BrianWhitneyAI
Copy link
Contributor Author

I haven't looked at this reader in a long while but I think this all makes sense to me. The largest change here is the addition of the try + except correct?

I think the bigger thing is calling the init from the is_supported_reader(). We had some users that were getting false positives that was messing with their base tiff reader. This calls the Init in is_supported_reader() because the init is complex and we do not have a simple way to confirm that all the operations of our init are functional (thus supporting).

Copy link
Contributor

@SeanLeRoy SeanLeRoy left a comment

Choose a reason for hiding this comment

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

yay!

@BrianWhitneyAI BrianWhitneyAI merged commit 50f75c2 into main Jan 6, 2025
13 checks passed
@BrianWhitneyAI BrianWhitneyAI deleted the bugfix/supported_files branch January 6, 2025 23:10
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.

3 participants