Skip to content

Conversation

normanrz
Copy link
Member

@normanrz normanrz commented Oct 7, 2025

Description:

  • Fixes for upath 0.3.x. With this new release, UPath is no longer a subclass of Path. This PR removes Path almost entirely in favor of UPath inside our codebase. Users can still pass in Paths and the examples also still have paths.

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog
  • Added / Updated Tests

@normanrz normanrz added this to the 3.x milestone Oct 8, 2025
@normanrz normanrz self-assigned this Oct 8, 2025
@normanrz normanrz requested a review from fm3 October 8, 2025 16:26
@normanrz
Copy link
Member Author

normanrz commented Oct 8, 2025

Still working on the coverage reports, Windows tests and Changelog, but the rest is already reviewable.

Copy link

github-actions bot commented Oct 8, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10162 8372 82% 80% 🟢

New Files

File Coverage Status
webknossos/webknossos/dataset/properties.py 0% 🟢
TOTAL 0% 🟢

Modified Files

File Coverage Status
webknossos/webknossos/annotation/annotation.py 79% 🟢
webknossos/webknossos/annotation/volume_layer.py 98% 🟢
webknossos/webknossos/cli/convert_knossos.py 37% 🟢
webknossos/webknossos/cli/convert_raw.py 66% 🟢
webknossos/webknossos/cli/convert_zarr.py 35% 🟢
webknossos/webknossos/cli/export_as_tiff.py 54% 🟢
webknossos/webknossos/client/_download_dataset.py 95% 🟢
webknossos/webknossos/client/_resumable/chunk.py 74% 🟢
webknossos/webknossos/client/_resumable/core.py 84% 🟢
webknossos/webknossos/client/_resumable/file.py 96% 🟢
webknossos/webknossos/client/_resumable/util.py 100% 🟢
webknossos/webknossos/client/_upload_dataset.py 86% 🟢
webknossos/webknossos/dataset/_utils/pims_czi_reader.py 66% 🟢
webknossos/webknossos/dataset/_utils/pims_dm_readers.py 83% 🟢
webknossos/webknossos/dataset/_utils/pims_images.py 87% 🟢
webknossos/webknossos/dataset/_utils/pims_tiff_reader.py 95% 🟢
webknossos/webknossos/dataset/_utils/segmentation_recognition.py 91% 🟢
webknossos/webknossos/dataset/dataset.py 75% 🟢
webknossos/webknossos/dataset/layer/layer.py 86% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/attachments/attachments.py 86% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/remote_segmentation_layer.py 47% 🟢
webknossos/webknossos/dataset/layer/view/_array.py 87% 🟢
webknossos/webknossos/dataset/layer/view/mag_view.py 90% 🟢
webknossos/webknossos/dataset/remote_dataset.py 84% 🟢
webknossos/webknossos/skeleton/skeleton.py 92% 🟢
webknossos/webknossos/utils.py 77% 🟢
TOTAL 79% 🟢

updated for commit: afdd964 by action🐍

@normanrz normanrz changed the title fixes issue with UPath on Windows fixes issue with UPath 0.3.x Oct 8, 2025
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Cool stuff, thanks for pushing this through!

I added a couple of comments, mostly concerning consistency in the type hints. Not all of those things were introduced in this PR, but I noticed them now while reading the respective code.

One thing I encountered a couple of times: I assumed that functions should either support taking UPath only or str | PathLike | UPath. However, I also found other combinations, like PathLike | UPath but not string, and I also found other orderings like PathLike | UPath | str. Maybe this could be unified. Of course, if there is a specific reason for the differences, feel free to explain it.

Also, I’m not sure about the changes in ci.yml. Were they necessary because you updated other dependencies? Could you explain the changes?

@normanrz normanrz merged commit a07d4e8 into master Oct 10, 2025
29 checks passed
@normanrz normanrz deleted the upath-0.3-windows branch October 10, 2025 12:02
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.

2 participants