-
Notifications
You must be signed in to change notification settings - Fork 2
Rlg compatbump #55
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
Rlg compatbump #55
Conversation
In last example, needed to use PyramidScheme as PS
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
==========================================
- Coverage 66.28% 66.15% -0.13%
==========================================
Files 3 3
Lines 264 263 -1
==========================================
- Hits 175 174 -1
Misses 89 89 ☔ View full report in Codecov by Sentry. |
felixcremer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates.
I am not sure about the change to the loading. That seems to be unnecessarily convoluted.
| function Pyramid(path::AbstractString, backend) | ||
| #This should rather be solved via dispatch, but this is not working because of Requires in YAXArrayBase. | ||
| if backend isa YAB.ZarrDataset | ||
| if (findfirst(x->x==:zarr,[keys(YAB.backendlist)...])!=nothing) && (typeof(backend) == YAB.backendfrompath("test.zarr")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
Shouldn't the backendtype from "test.zarr" always be a ZarrDataset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it is not ideal - the comment (not from me!) already shows there's some complications from YAXArrayBase. I don't know YAZArrayBase well, but the backend type returned from the backendfrompath is not easy to work with, which is why I set it up to avoid hard coding a type. But this may be just the limits of my knowledge of how the relevant pkgs set up types (and how to access them)
For example:
julia> using Zarr, YAXArrayBase
julia> tmp = YAXArrayBase.backendfrompath("test.zarr")
ZarrExt.ZarrDataset
julia> tmp <: ZarrDataset
ERROR: UndefVarError: `ZarrDataset` not defined
Stacktrace:
[1] top-level scope
@ REPL[23]:1
julia> tmp <: ZarrExt.ZarrDataset
ERROR: UndefVarError: `ZarrExt` not defined
Stacktrace:
[1] top-level scope
@ REPL[24]:1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the problem is that the ZarrDataset type is defined in a package extension. I will have a look tomorrow how to improve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pkg extensions are cool - but here it makes it hard to test the types, which creates challenges - if an extension is not loaded the code will error since the running code will not know about the :zarr backend, for example. That's why I put the first half of the test logic in (if (findfirst(x->x==:zarr,[keys(YAB.backendlist)...])!=nothing)) to make sure the :zarr backend is active before testing for a zarr file.
I'd be happy to have a simpler way to deal with it though!
|
Thanks again for the PR. I incorporated the necessary changes into #56 and found a nicer way to deal with the YAXArrayBase.backendlist problem there. |
Running examples on the Pkg README using current versions of the pkgs that are included there causes failures when executing
using PyramidScheme. The error msgs show incompatibilities inRasterMakieExt(stack trace below). I bumped versions ofYAXArrays,YAXArrayBaseandDimensionalDatato current versions in the compat entries.This also required fixes to the function
Pyramid(path)to correctly call the appropriate Zarr or GDAL variants of the pyramid constructing functions. One set of tests inruntests.jlalso needed an additionalusing DimensionalDatato pass.After these changes, I can locally run all
CItests successfully and execute the examples in theREADMEwithout troubles.Stack trace showing error when trying use current versions of the 3 pkgs listed above: