brainglobe / brainglobe-utils

Shared general purpose tools for the BrainGlobe project
MIT License
11 stars 1 forks source link

Refactor ImageIOLoadException #59

Closed K-Meech closed 7 months ago

K-Meech commented 7 months ago

Description

What is this PR

Why is this PR needed?

brainreg currently has a LoadFileException class that should be refactored into brainglobe-utils, and merged with the existing ImageIOLoadException

What does this PR do?

This PR moves the functionality of LoadFileException into ImageIOLoadException, making sure the relevant load functions catch errors like: loading a single tiff from a directory, loading 2D tiffs etc.

References

For https://github.com/brainglobe/brainreg/issues/180 Corresponding PR on brainreg https://github.com/brainglobe/brainreg/pull/186

How has this PR been tested?

Tests were updated, and all pass locally.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 96.77419% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.35%. Comparing base (13d0444) to head (0e4e956). Report is 24 commits behind head on main.

Files Patch % Lines
brainglobe_utils/image_io/utils.py 92.30% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #59 +/- ## ========================================== + Coverage 74.55% 84.35% +9.79% ========================================== Files 25 35 +10 Lines 849 1355 +506 ========================================== + Hits 633 1143 +510 + Misses 216 212 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.