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

fix stack keywords #470

Merged
merged 6 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix ncdatasets tests
  • Loading branch information
rafaqz committed Jul 29, 2023
commit 495653bf5804791110cca8ff94f8709336b3d9bd
3 changes: 1 addition & 2 deletions src/stack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ function RasterStack(
filenames::Union{AbstractArray{<:AbstractString},Tuple{<:AbstractString,Vararg}};
name=map(filekey, filenames), keys=name, kw...
)
_checkname(NTuple{<:Any,Symbol}, name)
RasterStack(NamedTuple{Tuple(keys)}(Tuple(filenames)); kw...)
RasterStack(NamedTuple{cleankeys(Tuple(keys))}(Tuple(filenames)); kw...)
end
function RasterStack(filenames::NamedTuple{K,<:Tuple{<:AbstractString,Vararg}};
crs=nothing, mappedcrs=nothing, source=nothing, lazy=false, dropband=true, kw...
Expand Down
2 changes: 1 addition & 1 deletion test/sources/ncdatasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ end
end
@testset "multi file with single name" begin
tempnc = tempname() * ".nc"
write(tempnc, rebuild(ncarray; name=:tos2))
write(tempnc, rebuild(Raster(ncsingle); name=:tos2))
@time small_stack = RasterStack((ncsingle, tempnc); name=(:tos, :tos2))
end
end
Expand Down
Loading