Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates SpatialData’s Zarr attribute handling to support Zarr v3 layout differences (notably multiscales under ome), and reorganizes the test suite to cover both v2/v3 fixtures.
Changes:
- Added a version-aware
multiscales()accessor and updated coordinate-transform utilities to use it. - Updated image channel extraction and SpatialData reading logic for v3-compatible metadata/layout.
- Reorganized and expanded unit tests (new CT utils/graph tests, new read tests, reduced zattrs tests).
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-zattrs.R | Reworked zattrs tests to run against both v1 and v3 fixtures; added multiscales/channels checks |
| tests/testthat/test-read.R | Added tests for read*() element readers and readSpatialData() layer selection behavior |
| tests/testthat/test-PointFrame.R | Adjusted filter error test |
| tests/testthat/test-ctutils.R | Moved/added coordinate-transformation utility tests |
| tests/testthat/test-ctgraph.R | Added tests for CT graph/path/plot helpers |
| R/Zattrs.R | Added internal version-aware multiscales method (list-backed) |
| R/validity.R | Tweaked validity checks; removed label .zattrs validation from SpatialData validity |
| R/utils.R | Adjusted centroids(LabelArray) coordinate handling |
| R/read.R | Changed element discovery from list.files() to list.dirs() |
| R/ImageArray.R | Made channels(Zattrs) version-aware; refactored multiscales dataset path checks |
| R/CTutils.R | Updated axes/CT helpers to use multiscales() accessor; docs rename |
| R/AllGenerics.R | Added multiscales generic; reordered some generics |
| NAMESPACE | Added imports for SpatialExperiment/anndataR |
| man/CTutils.Rd | Updated generated Rd to match CTutils rename |
| inst/NEWS | Added 0.99.29 release notes mentioning v3 work and new fixture |
| DESCRIPTION | Bumped version to 0.99.29 |
| .gitignore | Added ignore rule for R/_* |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 41 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
R/CTutils.R:148
rmvCT()is now used alongside version-awareCTlist()/axes()(viamultiscales()), but this method still mutatesx$multiscales/ top-levelx$coordinateTransformations. For Zarr v3, coordinate transformations live underx$ome$multiscales[[1]]$coordinateTransformations, sormvCT()won’t actually affect whatCTlist()returns. Update the mutation path to follow the version-specific layout.
R/CTutils.R:201- Same issue as
rmvCT():addCT()currently writes tox$multiscales[[1]]$coordinateTransformations(or top-level) but Zarr v3 stores this underx$ome$multiscales[[1]]$coordinateTransformations. As a result, adding a CT on v3 metadata won’t be reflected inCTlist()/CTname(). Make the write-back logic version-aware (e.g., branch onspatialdata_attrs$version).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.