From 31b4ab5abcc44675ec3ea0c08625e041f55792e6 Mon Sep 17 00:00:00 2001 From: George Datseris Date: Wed, 9 Aug 2023 10:00:55 +0100 Subject: [PATCH] Update dependencies (#103) * bump deps * fix tests * test clarify --- Project.toml | 6 +++--- test/advanced_tests.jl | 8 ++------ test/io_tests.jl | 6 ++++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Project.toml b/Project.toml index 08a3948..6cbd779 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.16.3" +version = "0.16.4" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -15,8 +15,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [compat] -DimensionalData = "0.20.1, 0.21, 0.22, 0.23" -Interpolations = "0.13.2" +DimensionalData = "0.20.1, 0.21, 0.22, 0.23, 0.24" +Interpolations = "0.13.2, 0.14" NCDatasets = "0.11, 0.12" Requires = "1" SignalDecomposition = "1" diff --git a/test/advanced_tests.jl b/test/advanced_tests.jl index 2e3a53c..c892234 100644 --- a/test/advanced_tests.jl +++ b/test/advanced_tests.jl @@ -6,8 +6,8 @@ my_dim = Dim{:My_Dim} E = ClimArray([1.0:1.0:10.0 2.0:1.0:11.0 3.0:2.0:21.0], (my_dim(1:10), Ti(1:3))) pressure = ClimArray([1000.0:-100.0:100.0 1000.0:-100.0:100.0 1000.0:-100.0:100.0] *100.0, (my_dim(1:10), Ti(1:3))) - E_pre = interpolation2pressure(E, pressure, pressure_levels; vertical_coord=my_dim, extrapolation_bc=NaN ) - E_pre2 = interpolation2pressure(reverse(E,dims=my_dim), reverse(pressure,dims=my_dim), pressure_levels; vertical_coord=my_dim, extrapolation_bc=NaN, descending = false ) + E_pre = interpolation2pressure(E, pressure, pressure_levels; vertical_dim=my_dim, extrapolation_bc=NaN ) + E_pre2 = interpolation2pressure(reverse(E,dims=my_dim), reverse(pressure,dims=my_dim), pressure_levels; vertical_dim=my_dim, extrapolation_bc=NaN, descending = false ) @test hasdim(D_pre,Pre()) @test gnv(dims(D_back,Hei)) == gnv(dims(D,Hei)) && gnv(dims(D_back,Ti)) == gnv(dims(D,Ti)) @@ -18,10 +18,6 @@ @test D[Hei(1)] < D_pre[Pre(3)] < D[Hei(11)] end -@testset "quantile space" begin - -end - @testset "value space" begin t = 0:0.01:5π x = cos.(t) diff --git a/test/io_tests.jl b/test/io_tests.jl index b54965d..0c4bfd0 100644 --- a/test/io_tests.jl +++ b/test/io_tests.jl @@ -1,3 +1,5 @@ +using ClimateBase, Test + @testset "NetCDF IO" begin @testset "vector2range" begin @@ -57,7 +59,7 @@ end @test all(isequal(-99.9), B.data[midx]) mmean = mean(skipmissing(M2.data)) bmean = mean(B, StatsBase.weights(W)) - @test bmean == mmean + @test bmean ≈ mmean # for some reason here we lose accuracy: 0.4992455417474702 vs 0.49924554174747 # test `missing_weights` application to zonal mean C = B[3:end, :] z1 = zonalmean(C) @@ -67,7 +69,7 @@ end end @testset "CFTime dates" begin - using NCDatasets.CFTime: DateTime360Day + using ClimateBase.NCDatasets.CFTime: DateTime360Day cfdates = collect(DateTime360Day(1900,01,01):Day(1):DateTime360Day(1919,12,30)) x = float.(month.(cfdates)) X = ClimArray(x, (Tim(cfdates),); name = "x")