-
Notifications
You must be signed in to change notification settings - Fork 34
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
Write test for calling RasterSeries(x; duplicate_first=true) #474
Comments
We can also just generate the data in the tests. |
# create `N` random rasters with eltype `type` and x,y,band size `size`
function temporary_random_rasters(f, N, size, type=UInt8)
filenames = [tempname() * ".tif" for _ in 1:N]
try
for f in filenames
write(f, Raster(rand(type, size); dims=(X(1:size[1]), Y(1:size[2]), Band(1:size[3]))))
end
f(filenames)
finally
rm.(filenames; force=true)
end
end
temporary_random_rasters(3, (10,10,3), UInt8) do filenames
times = Ti(DateTime.(rand(UInt16, length(filenames))))
series = RasterSeries(filenames, times; duplicate_first=true)
...
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should write a test for calling
RasterSeries(x; duplicate_first=true)
and check that it a) works and b) correctly sets the properties, especially the filenames. I think this requires some usable sample data uploaded somewhere. I could provide the sample data if needed; where could it be uploaded?The text was updated successfully, but these errors were encountered: