Skip to content

🐛 Fix WSI Reading#1076

Open
shaneahmed wants to merge 7 commits into
developfrom
fix-wsireader
Open

🐛 Fix WSI Reading#1076
shaneahmed wants to merge 7 commits into
developfrom
fix-wsireader

Conversation

@shaneahmed
Copy link
Copy Markdown
Member

  • On Windows urlparse would converts the input to str causing WSI reading to fail
  • s3 links to test cloud ngff read is also fixed.

- On Windows urlparse would convert the input to str causing WSI reading to fail
- s3 links to test cloud ngff read is also fixed.
@shaneahmed shaneahmed added this to the Release 2.1.1 milestone Jun 8, 2026
@shaneahmed shaneahmed self-assigned this Jun 8, 2026
@shaneahmed shaneahmed added the bug Something isn't working label Jun 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses failures when opening NGFF/Zarr WSIs from URL-like paths on Windows by improving URL/path handling and ensuring Zarr open calls receive needed storage options (notably for S3-backed reads).

Changes:

  • Switches WSIReader path normalization to UPath to avoid Windows pathlib mangling of s3://... paths.
  • Updates NGFF detection to forward reader kwargs into zarr.open(...) (to support storage_options for cloud stores).
  • Updates the S3 NGFF test endpoint URL and adds an s3fs runtime dependency.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
tiatoolbox/wsicore/wsireader.py Adds UPath normalization, introduces is_url, and forwards kwargs into NGFF/Zarr open paths.
tests/test_wsireader.py Updates the S3 test endpoint URL for NGFF read validation.
requirements/requirements.txt Adds s3fs dependency for S3 filesystem support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tiatoolbox/wsicore/wsireader.py Outdated
Comment thread tiatoolbox/wsicore/wsireader.py Outdated
Comment thread tiatoolbox/wsicore/wsireader.py
Comment thread tiatoolbox/wsicore/wsireader.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.87%. Comparing base (a1e2512) to head (fc288d3).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1076      +/-   ##
===========================================
- Coverage    99.88%   99.87%   -0.02%     
===========================================
  Files           85       85              
  Lines        11626    11631       +5     
  Branches      1524     1524              
===========================================
+ Hits         11613    11616       +3     
- Misses           7        9       +2     
  Partials         6        6              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread tiatoolbox/wsicore/wsireader.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants