From d14283c089a6d2d8bd98beb0e311de92c60966d7 Mon Sep 17 00:00:00 2001 From: George Datseris Date: Fri, 14 Jan 2022 15:35:26 +0100 Subject: [PATCH] Allow Corrd[Lat[...]] index (#86) --- Project.toml | 4 ++-- test/space_coord_tests.jl | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Project.toml b/Project.toml index b9a7bb33..62ca2136 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimateBase" uuid = "35604d93-0fb8-4872-9436-495b01d137e2" authors = ["Datseris ", "Philippe Roy "] -version = "0.14.1" +version = "0.14.2" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [compat] -DimensionalData = "0.20" +DimensionalData = "0.20.1" Interpolations = "0.13.2" NCDatasets = "0.10, 0.11" Requires = "1" diff --git a/test/space_coord_tests.jl b/test/space_coord_tests.jl index 4abf61d6..af85e5bb 100644 --- a/test/space_coord_tests.jl +++ b/test/space_coord_tests.jl @@ -1,17 +1,15 @@ @testset "Spatial Coordinates Tests" begin @testset "Indexing and Basics" begin - # Needs https://github.com/rafaqz/DimensionalData.jl/issues/357 - # subsel = C[Lat(0..8)] - # @test hasdim(subsel, Coord) - # @test size(subsel, Coord) < size(C, Coord) - # @test all(0 ≤ c[2] ≤ 8 for c in gnv(dims(subsel, Coord))) + subsel = C[Coord(Lat(0..8))] + @test hasdim(subsel, Coord) + @test size(subsel, Coord) < size(C, Coord) + @test all(0 ≤ c[2] ≤ 8 for c in gnv(dims(subsel, Coord))) @test length(collect(spatialidxs(C))) == size(C, Coord) Atran = transform_to_coord(A) @test hasdim(Atran, Coord) @test lons == sort!(unique!([c[1] for c in gnv(dims(Atran, Coord))])) - end @testset "Zonal mean" begin @@ -45,5 +43,4 @@ # TODO: test actual numeric values end - end \ No newline at end of file