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

🐛 correct check on layer inner type #146

Merged
merged 4 commits into from
Feb 17, 2023
Merged

🐛 correct check on layer inner type #146

merged 4 commits into from
Feb 17, 2023

Conversation

tpoisot
Copy link
Member

@tpoisot tpoisot commented Feb 16, 2023

Closes #145

@github-actions
Copy link
Contributor

@tpoisot tpoisot mentioned this pull request Feb 16, 2023
@tpoisot
Copy link
Member Author

tpoisot commented Feb 16, 2023

@gottacatchenall use this branch to test and report back? I'll write an additional test to download/save/read a worldclim layer, or something like this

@gottacatchenall
Copy link
Member

gottacatchenall commented Feb 16, 2023

@gottacatchenall use this branch to test and report back? I'll write an additional test to download/save/read a worldclim layer, or something like this

Currently throwing this
ERROR: MethodError: Cannot `convert` an object of type Float32 to an object of type RasterCell{Float64, Float32}

This is the line that fails

array = convert(Matrix{eltype(layer)}, array)

as its trying to convert Matrix{RasterCell{Float32, Float32}} to Matrix{Float32}

@codecov-commenter
Copy link

Codecov Report

Base: 41.01% // Head: 48.81% // Increases project coverage by +7.80% 🎉

Coverage data is based on head (0f2030f) compared to base (572e0d5).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
+ Coverage   41.01%   48.81%   +7.80%     
==========================================
  Files          35       46      +11     
  Lines        1141     1438     +297     
==========================================
+ Hits          468      702     +234     
- Misses        673      736      +63     
Flag Coverage Δ
unittests 48.81% <0.00%> (+7.80%) ⬆️

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

Impacted Files Coverage Δ
src/io/geotiff.jl 0.00% <0.00%> (ø)
SimpleSDMDatasets/src/interface.jl 63.33% <0.00%> (ø)
...impleSDMDatasets/src/providers/CHELSA/chelsa_v1.jl 96.55% <0.00%> (ø)
...impleSDMDatasets/src/providers/CHELSA/chelsa_v2.jl 90.90% <0.00%> (ø)
SimpleSDMDatasets/src/keychecker.jl 74.13% <0.00%> (ø)
...MDatasets/src/providers/CHELSA/chelsa_future_v1.jl 100.00% <0.00%> (ø)
...ets/src/providers/WorldClim/worldclim_future_v2.jl 0.00% <0.00%> (ø)
...MDatasets/src/providers/CHELSA/chelsa_future_v2.jl 100.00% <0.00%> (ø)
SimpleSDMDatasets/src/downloader.jl 76.66% <0.00%> (ø)
...DMDatasets/src/providers/WorldClim/worldclim_v2.jl 92.10% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tpoisot
Copy link
Member Author

tpoisot commented Feb 16, 2023

Got it. I'll write the test this evening, it shouldn't be a hard fix.

@tpoisot
Copy link
Member Author

tpoisot commented Feb 17, 2023

This should do the trick, as soon as it passes I'll tag a new patch release and you'll be good to go, @gottacatchenall

@gottacatchenall
Copy link
Member

This should do the trick, as soon as it passes I'll tag a new patch release and you'll be good to go, @gottacatchenall

can confirm this fixes the error here

@tpoisot tpoisot merged commit e0049b5 into main Feb 17, 2023
@tpoisot tpoisot deleted the tpoisot/issue145 branch February 17, 2023 02:17
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.

IO not exported?
3 participants