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

improve read_with_dask docs, ignore OME metadata #98

Merged
merged 5 commits into from
Aug 15, 2024
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Aug 14, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

  • We currently read certain OME tiff files wrongly in read_with_dask, when the metadata for all tiffs is specified in a single tiff's metadata.
  • read_with_dask lack return value and parameters in docs
  • read_with_dask ignores .tiff files (only finds .tif files).

What does this PR do?

Ignores the OME metadata, so we can correctly read OME tiff files with dask. Also improvements to docs and ability to read .tiff files lazily, and better error handling.

References

Closes #79

How has this PR been tested?

Locally by @niksirbi and me

Is this a breaking change?

I don't think so.

Does this PR require an update to the documentation?

Docstrings updated.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)

we would need to make, or download, suitable data to test this on. I tried but only got so far, this will be addressed separately later (ignore-ome-test branch in #99 )- so we can use read_with_dask for more urgent work. I did add a negative test for a new error that is now being raised.

  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.73%. Comparing base (0d463f6) to head (f2a5f21).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #98   +/-   ##
=======================================
  Coverage   92.72%   92.73%           
=======================================
  Files          37       37           
  Lines        1855     1857    +2     
=======================================
+ Hits         1720     1722    +2     
  Misses        135      135           
Flag Coverage Δ
numba 92.67% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessandrofelder alessandrofelder requested a review from a team August 14, 2024 16:23
Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

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

Approving this without full test coverage, for the reasons you mentioned.

brainglobe_utils/IO/image/load.py Show resolved Hide resolved
Co-authored-by: Niko Sirmpilatze <niksirbi@users.noreply.github.com>
@alessandrofelder alessandrofelder merged commit ea37575 into main Aug 15, 2024
14 checks passed
@alessandrofelder alessandrofelder deleted the ignore-ome branch August 15, 2024 10:33
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.

[BUG] read_with_dask fails for folder containing .ome.tif files
2 participants