Skip to content

Commit

Permalink
Remove support for Julia <1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Sep 2, 2024
1 parent 894da06 commit 99ac119
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"

[extensions]
SparseConnectivityTracerDataInterpolationsExt = "DataInterpolations"
SparseConnectivityTracerNNlibExt = "NNlib"
SparseConnectivityTracerSpecialFunctionsExt = "SpecialFunctions"
SparseConnectivityTracerDataInterpolationsExt = "DataInterpolations"

[extras]
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
Expand All @@ -29,7 +29,7 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

[compat]
ADTypes = "1"
DataInterpolations = "6"
DataInterpolations = "6.2"
DocStringExtensions = "0.9"
FillArrays = "1"
LinearAlgebra = "<0.0.1, 1"
Expand Down
28 changes: 12 additions & 16 deletions ext/SparseConnectivityTracerDataInterpolationsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ if isdefined(Base, :get_extension)
QuadraticSpline,
CubicSpline,
BSplineInterpolation,
BSplineApprox
# TODO: support when Julia 1.6 is dropped
# CubicHermiteSpline,
# PCHIPInterpolation,
# QuinticHermiteSpline
BSplineApprox,
CubicHermiteSpline,
PCHIPInterpolation,
QuinticHermiteSpline
else
using ..SparseConnectivityTracer: AbstractTracer, Dual, primal, tracer
using ..SparseConnectivityTracer: GradientTracer, gradient_tracer_1_to_1
Expand All @@ -37,11 +36,10 @@ else
QuadraticSpline,
CubicSpline,
BSplineInterpolation,
BSplineApprox
# TODO: support when Julia 1.6 is dropped
# CubicHermiteSpline,
# PCHIPInterpolation,
# QuinticHermiteSpline
BSplineApprox,
CubicHermiteSpline,
PCHIPInterpolation,
QuinticHermiteSpline
end

#========================#
Expand All @@ -59,9 +57,8 @@ for I in (
:CubicSpline,
:BSplineInterpolation,
:BSplineApprox,
# TODO: support when Julia 1.6 is dropped
# :CubicHermiteSpline,
# :QuinticHermiteSpline,
:CubicHermiteSpline,
:QuinticHermiteSpline,
)
# 1D Interpolations (uType<:AbstractVector)
@eval function (interp::$(I){uType})(t::GradientTracer) where {uType<:AbstractVector}
Expand Down Expand Up @@ -89,9 +86,8 @@ for I in (
:LagrangeInterpolation,
:BSplineInterpolation,
:BSplineApprox,
# TODO: support when Julia 1.6 is dropped
# :CubicHermiteSpline,
# :QuinticHermiteSpline,
:CubicHermiteSpline,
:QuinticHermiteSpline,
)
@eval function (interp::$(I){uType})(d::Dual) where {uType<:AbstractVector}
p = interp(primal(d))
Expand Down
4 changes: 1 addition & 3 deletions src/SparseConnectivityTracer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ function __init__()
@require NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" include(
"../ext/SparseConnectivityTracerNNlibExt.jl"
)
@require DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" include(
"../ext/SparseConnectivityTracerDataInterpolationsExt.jl"
)
# NOTE: SparseConnectivityTracerDataInterpolationsExt is not loaded on Julia <1.10
end
end

Expand Down
11 changes: 10 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,21 @@ GROUP = get(ENV, "JULIA_SCT_TEST_GROUP", "Core")
if GROUP in ("Core", "All")
@info "Testing package extensions..."
@testset verbose = true "Package extensions" begin
for ext in (:NNlib, :SpecialFunctions, :DataInterpolations)
for ext in (:NNlib, :SpecialFunctions)
@testset "$ext" begin
@info "...$ext"
include("ext/test_$ext.jl")
end
end
# Some extensions are only loaded in newer Julia releases
if VERSION >= v"1.10"
for ext in (:DataInterpolations,)
@testset "$ext" begin
@info "...$ext"
include("ext/test_$ext.jl")
end
end
end
end
end

Expand Down

0 comments on commit 99ac119

Please sign in to comment.