From b23890b5eb56d683f9f66946b8daeaa44c77e67e Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 2 Dec 2024 09:01:55 +0100 Subject: [PATCH 1/4] Fix test problems --- test/interpolation_tests.jl | 4 ++-- test/runtests.jl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/interpolation_tests.jl b/test/interpolation_tests.jl index 45c9ecc2..e4a4f959 100644 --- a/test/interpolation_tests.jl +++ b/test/interpolation_tests.jl @@ -108,7 +108,7 @@ end @test isnan(A(4.0)) u = [0.0, 1.0, 2.0, NaN] - A = LinearInterpolation(u, t; extrapolate = true) + A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension) @test A(1.0) == 0.0 @test A(2.0) == 1.0 @test A(3.0) == 2.0 @@ -147,7 +147,7 @@ end # NaN time value for Unitful arrays: issue #365 t = (0:3)u"s" # Unitful quantities u = [0, -2, -1, -2]u"m" - A = LinearInterpolation(u, t; extrapolate = true) + A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension) @test isnan(A(NaN*u"s")) # Nan time value: diff --git a/test/runtests.jl b/test/runtests.jl index 774ad497..33b9ab1c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,8 +7,8 @@ using SafeTestsets @safetestset "Derivative Tests" include("derivative_tests.jl") @safetestset "Integral Tests" include("integral_tests.jl") @safetestset "Integral Inverse Tests" include("integral_inverse_tests.jl") -@safetestset "Extrapolation" include("extrapolation_tests.jl") +@safetestset "Extrapolation Tests" include("extrapolation_tests.jl") @safetestset "Online Tests" include("online_tests.jl") -@safetestset "Regularization Smoothing" include("regularization.jl") -@safetestset "Show methods" include("show.jl") -@safetestset "Zygote support" include("zygote_tests.jl") +@safetestset "Regularization Smoothing Tests" include("regularization.jl") +@safetestset "Show methods Tests" include("show.jl") +@safetestset "Zygote support Tests" include("zygote_tests.jl") From 92b942fe414343d60ae6f2658f2379065ce2aa0c Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 2 Dec 2024 09:04:32 +0100 Subject: [PATCH 2/4] Formatting --- src/interpolation_methods.jl | 2 +- test/interpolation_tests.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpolation_methods.jl b/src/interpolation_methods.jl index 282a2527..14467311 100644 --- a/src/interpolation_methods.jl +++ b/src/interpolation_methods.jl @@ -59,7 +59,7 @@ function _interpolate(A::LinearInterpolation{<:AbstractVector}, t::Number, igues idx = firstindex(A.u) t1 = t2 = oneunit(eltype(A.t)) u1 = u2 = oneunit(eltype(A.u)) - slope = t/t * get_parameters(A, idx) + slope = t / t * get_parameters(A, idx) else idx = get_idx(A, t, iguess) t1, t2 = A.t[idx], A.t[idx + 1] diff --git a/test/interpolation_tests.jl b/test/interpolation_tests.jl index e4a4f959..ab0819d5 100644 --- a/test/interpolation_tests.jl +++ b/test/interpolation_tests.jl @@ -146,9 +146,9 @@ end # NaN time value for Unitful arrays: issue #365 t = (0:3)u"s" # Unitful quantities - u = [0, -2, -1, -2]u"m" + u = [0, -2, -1, -2]u"m" A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension) - @test isnan(A(NaN*u"s")) + @test isnan(A(NaN * u"s")) # Nan time value: t = 0.0:3 # Floats From 5624fb298a561781f2d0e40c9691d5ea09b46d4e Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 2 Dec 2024 09:24:10 +0100 Subject: [PATCH 3/4] Update Test compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9cf73f6d..f31faf48 100644 --- a/Project.toml +++ b/Project.toml @@ -42,7 +42,7 @@ RegularizationTools = "0.6" SafeTestsets = "0.1" StableRNGs = "1" Symbolics = "5.29, 6" -Test = "1" +Test = "1.10" Unitful = "1" Zygote = "0.6.70" julia = "1.10" From a33326e514403a00c762d0cc29a380a4b114ea62 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 2 Dec 2024 09:44:24 +0100 Subject: [PATCH 4/4] Update Unitful compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index f31faf48..91ae9fed 100644 --- a/Project.toml +++ b/Project.toml @@ -43,7 +43,7 @@ SafeTestsets = "0.1" StableRNGs = "1" Symbolics = "5.29, 6" Test = "1.10" -Unitful = "1" +Unitful = "1.21.1" Zygote = "0.6.70" julia = "1.10"