diff --git a/Project.toml b/Project.toml index 2689a8214..a2ff93e38 100644 --- a/Project.toml +++ b/Project.toml @@ -32,13 +32,11 @@ JumpProcessesOrdinaryDiffEqCoreExt = "OrdinaryDiffEqCore" [compat] ADTypes = "1.22.0" Adapt = "4.6.0" -Aqua = "0.8.16" ArrayInterface = "7.25.0" DataStructures = "0.19.5, 0.19" DiffEqBase = "7.5.5, 7" DiffEqCallbacks = "4.17.0" DocStringExtensions = "0.9.5" -ExplicitImports = "1" FastBroadcast = "1.3.2, 1" FunctionWrappers = "1.1.3" Graphs = "1.14.0" @@ -55,6 +53,7 @@ RecursiveArrayTools = "4.3.0, 4" Reexport = "1.2.2" SafeTestsets = "0.1" SciMLBase = "3.18.0, 3.1" +SciMLTesting = "1.6" StableRNGs = "1" StaticArrays = "1.9.18" Statistics = "1" @@ -65,8 +64,6 @@ julia = "1.10" [extras] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" @@ -74,10 +71,11 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ADTypes", "Aqua", "ExplicitImports", "FastBroadcast", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqFunctionMap", "Pkg", "SafeTestsets", "StableRNGs", "Statistics", "StochasticDiffEq", "Test"] +test = ["ADTypes", "FastBroadcast", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqFunctionMap", "Pkg", "SafeTestsets", "SciMLTesting", "StableRNGs", "Statistics", "StochasticDiffEq", "Test"] diff --git a/ext/JumpProcessesOrdinaryDiffEqCoreExt.jl b/ext/JumpProcessesOrdinaryDiffEqCoreExt.jl index 28d769a21..144af27d7 100644 --- a/ext/JumpProcessesOrdinaryDiffEqCoreExt.jl +++ b/ext/JumpProcessesOrdinaryDiffEqCoreExt.jl @@ -2,6 +2,7 @@ module JumpProcessesOrdinaryDiffEqCoreExt using JumpProcesses import DiffEqBase +import SciMLBase import OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, DAEAlgorithm, StochasticDiffEqAlgorithm, StochasticDiffEqRODEAlgorithm @@ -14,8 +15,8 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, DAEAlgorithm, # This method resolves the ambiguity by being more specific in the problem type # (AbstractJumpProblem vs Union{..., AbstractJumpProblem, ...}) while matching # the exact algorithm union from OrdinaryDiffEqCore. -function DiffEqBase.__init( - _jump_prob::DiffEqBase.AbstractJumpProblem{P}, +function SciMLBase.__init( + _jump_prob::SciMLBase.AbstractJumpProblem{P}, alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm, StochasticDiffEqAlgorithm, StochasticDiffEqRODEAlgorithm}; merge_callbacks = true, kwargs...) where {P} diff --git a/src/SSA_stepper.jl b/src/SSA_stepper.jl index d7b6c4aef..1a63fe5dd 100644 --- a/src/SSA_stepper.jl +++ b/src/SSA_stepper.jl @@ -56,7 +56,7 @@ see the [tutorial](https://docs.sciml.ai/JumpProcesses/stable/tutorials/discrete_stochastic_example/) for details. """ -struct SSAStepper <: DiffEqBase.AbstractDEAlgorithm end +struct SSAStepper <: SciMLBase.AbstractDEAlgorithm end SciMLBase.allows_late_binding_tstops(::SSAStepper) = true """ @@ -149,7 +149,7 @@ end end end -function DiffEqBase.__solve(jump_prob::JumpProblem, alg::SSAStepper; kwargs...) +function SciMLBase.__solve(jump_prob::JumpProblem, alg::SSAStepper; kwargs...) # init will handle kwargs merging via init_call integrator = init(jump_prob, alg; kwargs...) solve!(integrator) @@ -194,7 +194,7 @@ function DiffEqBase.solve!(integrator::SSAIntegrator) end if integrator.sol.retcode === ReturnCode.Default - integrator.sol = DiffEqBase.solution_new_retcode(integrator.sol, ReturnCode.Success) + integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.Success) end end @@ -225,7 +225,7 @@ function check_continuous_callback_error(callback) return nothing end -function DiffEqBase.__init(jump_prob::JumpProblem, +function SciMLBase.__init(jump_prob::JumpProblem, alg::SSAStepper; save_start = true, save_end = true, @@ -276,10 +276,10 @@ function DiffEqBase.__init(jump_prob::JumpProblem, end save_everystep = any(cb.save_positions) - sol = DiffEqBase.build_solution(prob, alg, t, u, dense = save_everystep, + sol = SciMLBase.build_solution(prob, alg, t, u, dense = save_everystep, calculate_error = false, stats = DiffEqBase.Stats(0), - interp = DiffEqBase.ConstantInterpolation(t, u)) + interp = SciMLBase.ConstantInterpolation(t, u)) _saveat = (saveat isa Number) ? (prob.tspan[1]:saveat:prob.tspan[2]) : saveat if _saveat !== nothing && !isempty(_saveat) && _saveat[1] == prob.tspan[1] @@ -465,7 +465,7 @@ end function DiffEqBase.terminate!(integrator::SSAIntegrator, retcode = ReturnCode.Terminated) integrator.keep_stepping = false - integrator.sol = DiffEqBase.solution_new_retcode(integrator.sol, retcode) + integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, retcode) nothing end diff --git a/src/coupling.jl b/src/coupling.jl index bce40869b..b91fc3465 100644 --- a/src/coupling.jl +++ b/src/coupling.jl @@ -3,8 +3,8 @@ David F. Anderson, Masanori Koyama; An asymptotic relationship between coupling methods for stochastically modeled population processes. IMA J Numer Anal 2015; 35 (4): 1757-1778. doi: 10.1093/imanum/dru044 """ -function SplitCoupledJumpProblem(prob::DiffEqBase.AbstractJumpProblem, - prob_control::DiffEqBase.AbstractJumpProblem, +function SplitCoupledJumpProblem(prob::SciMLBase.AbstractJumpProblem, + prob_control::SciMLBase.AbstractJumpProblem, aggregator::AbstractAggregatorAlgorithm, coupling_map::Vector{Tuple{Int, Int}}; kwargs...) JumpProblem(cat_problems(prob.prob, prob_control.prob), aggregator, @@ -17,8 +17,8 @@ function cat_problems(prob::DiscreteProblem, prob_control::DiscreteProblem) DiscreteProblem(u0_coupled, prob.tspan, prob.p) end -function cat_problems(prob::DiffEqBase.AbstractODEProblem, - prob_control::DiffEqBase.AbstractODEProblem) +function cat_problems(prob::SciMLBase.AbstractODEProblem, + prob_control::SciMLBase.AbstractODEProblem) l = length(prob.u0) # add l_c = length(prob_control.u0) _f = SciMLBase.unwrapped_f(prob.f) @@ -32,9 +32,9 @@ function cat_problems(prob::DiffEqBase.AbstractODEProblem, ODEProblem(new_f, u0_coupled, prob.tspan, prob.p) end -function cat_problems(prob::DiscreteProblem, prob_control::DiffEqBase.AbstractODEProblem) +function cat_problems(prob::DiscreteProblem, prob_control::SciMLBase.AbstractODEProblem) l = length(prob.u0) # add l_c = length(prob_control.u0) - if !(prob.f isa typeof(DiffEqBase.DISCRETE_INPLACE_DEFAULT)) + if !(prob.f isa typeof(SciMLBase.DISCRETE_INPLACE_DEFAULT)) @warn("Coupling to DiscreteProblem with nontrivial f. Note that, unless scale_by_time=true, the meaning of f will change when using an ODE/SDE/DDE/DAE solver.") end @@ -49,8 +49,8 @@ function cat_problems(prob::DiscreteProblem, prob_control::DiffEqBase.AbstractOD ODEProblem(new_f, u0_coupled, prob.tspan, prob.p) end -function cat_problems(prob::DiffEqBase.AbstractSDEProblem, - prob_control::DiffEqBase.AbstractSDEProblem) +function cat_problems(prob::SciMLBase.AbstractSDEProblem, + prob_control::SciMLBase.AbstractSDEProblem) l = length(prob.u0) new_f = function (du, u, p, t) prob.f(@view(du[1:l]), u.u, p, t) @@ -64,8 +64,8 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem, SDEProblem(new_f, new_g, u0_coupled, prob.tspan, prob.p) end -function cat_problems(prob::DiffEqBase.AbstractSDEProblem, - prob_control::DiffEqBase.AbstractODEProblem) +function cat_problems(prob::SciMLBase.AbstractSDEProblem, + prob_control::SciMLBase.AbstractODEProblem) l = length(prob.u0) _f = SciMLBase.unwrapped_f(prob.f) @@ -85,9 +85,9 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem, SDEProblem(new_f, new_g, u0_coupled, prob.tspan, prob.p) end -function cat_problems(prob::DiffEqBase.AbstractSDEProblem, prob_control::DiscreteProblem) +function cat_problems(prob::SciMLBase.AbstractSDEProblem, prob_control::DiscreteProblem) l = length(prob.u0) - if !(prob_control.f isa typeof(DiffEqBase.DISCRETE_INPLACE_DEFAULT)) + if !(prob_control.f isa typeof(SciMLBase.DISCRETE_INPLACE_DEFAULT)) @warn("Coupling to DiscreteProblem with nontrivial f. Note that, unless scale_by_time=true, the meaning of f will change when using an ODE/SDE/DDE/DAE solver.") end new_f = function (du, u, p, t) @@ -104,20 +104,20 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem, prob_control::Discret SDEProblem(new_f, new_g, u0_coupled, prob.tspan) end -function cat_problems(prob_control::DiffEqBase.AbstractODEProblem, prob::DiscreteProblem) +function cat_problems(prob_control::SciMLBase.AbstractODEProblem, prob::DiscreteProblem) cat_problems(prob, prob_control) end -function cat_problems(prob_control::DiscreteProblem, prob::DiffEqBase.AbstractSDEProblem) +function cat_problems(prob_control::DiscreteProblem, prob::SciMLBase.AbstractSDEProblem) cat_problems(prob, prob_control) end -function cat_problems(prob_control::DiffEqBase.AbstractODEProblem, - prob::DiffEqBase.AbstractSDEProblem) +function cat_problems(prob_control::SciMLBase.AbstractODEProblem, + prob::SciMLBase.AbstractSDEProblem) cat_problems(prob, prob_control) end # this only depends on the jumps in prob, not prob.prob -function build_split_jumps(prob::DiffEqBase.AbstractJumpProblem, - prob_control::DiffEqBase.AbstractJumpProblem, +function build_split_jumps(prob::SciMLBase.AbstractJumpProblem, + prob_control::SciMLBase.AbstractJumpProblem, coupling_map::Vector{Tuple{Int, Int}}) num_jumps = length(prob.discrete_jump_aggregation.rates) num_jumps_control = length(prob_control.discrete_jump_aggregation.rates) diff --git a/src/problem.jl b/src/problem.jl index 56c34919f..008dab179 100644 --- a/src/problem.jl +++ b/src/problem.jl @@ -1,5 +1,5 @@ function isinplace_jump(p, rj) - if p isa DiscreteProblem && p.f === DiffEqBase.DISCRETE_INPLACE_DEFAULT && + if p isa DiscreteProblem && p.f === SciMLBase.DISCRETE_INPLACE_DEFAULT && rj !== nothing # Just a default discrete problem f, so don't use it for iip DiffEqBase.isinplace(rj) @@ -71,7 +71,7 @@ the DifferentialEquations.jl [docs](https://docs.sciml.ai/JumpProcesses/stable/) examples and commonly asked questions. """ mutable struct JumpProblem{iip, P, A, C, J <: Union{Nothing, AbstractJumpAggregator}, J1, - J2, J3, J4, R, K} <: DiffEqBase.AbstractJumpProblem{P, J} + J2, J3, J4, R, K} <: SciMLBase.AbstractJumpProblem{P, J} """The type of problem to couple the jumps to. For a pure jump process use `DiscreteProblem`, to couple to ODEs, `ODEProblem`, etc.""" prob::P """The aggregator algorithm that determines the next jump times and types for `ConstantRateJump`s and `MassActionJump`s. Examples include `Direct`.""" @@ -111,7 +111,7 @@ function remake_extended_u0(prob, newu0, rng) ExtendedJumpArray(newu0, jump_u) end -Base.@pure remaker_of(prob::T) where {T <: JumpProblem} = DiffEqBase.parameterless_type(T) +Base.@pure remaker_of(prob::T) where {T <: JumpProblem} = SciMLBase.parameterless_type(T) function DiffEqBase.remake(jprob::JumpProblem; u0 = missing, p = missing, interpret_symbolicmap = true, use_defaults = false, kwargs...) T = remaker_of(jprob) @@ -240,7 +240,7 @@ make_kwarg(; kwargs...) = kwargs function JumpProblem(prob, aggregator::AbstractAggregatorAlgorithm, jumps::JumpSet; vr_aggregator::VariableRateAggregator = VR_FRM(), - save_positions = prob isa DiffEqBase.AbstractDiscreteProblem ? + save_positions = prob isa SciMLBase.AbstractDiscreteProblem ? (false, true) : (true, true), rng = DEFAULT_RNG, scale_rates = true, useiszero = true, spatial_system = nothing, hopping_constants = nothing, @@ -319,7 +319,7 @@ end # Special dispatch for PureLeaping aggregator - bypasses all aggregation function JumpProblem(prob, aggregator::PureLeaping, jumps::JumpSet; - save_positions = prob isa DiffEqBase.AbstractDiscreteProblem ? + save_positions = prob isa SciMLBase.AbstractDiscreteProblem ? (false, true) : (true, true), rng = DEFAULT_RNG, scale_rates = true, useiszero = true, spatial_system = nothing, hopping_constants = nothing, diff --git a/src/simple_regular_solve.jl b/src/simple_regular_solve.jl index 3675ddad1..2445237b7 100644 --- a/src/simple_regular_solve.jl +++ b/src/simple_regular_solve.jl @@ -1,6 +1,6 @@ -struct SimpleTauLeaping <: DiffEqBase.AbstractDEAlgorithm end +struct SimpleTauLeaping <: SciMLBase.AbstractDEAlgorithm end -struct SimpleExplicitTauLeaping{T <: AbstractFloat} <: DiffEqBase.AbstractDEAlgorithm +struct SimpleExplicitTauLeaping{T <: AbstractFloat} <: SciMLBase.AbstractDEAlgorithm epsilon::T # Error control parameter end @@ -142,9 +142,9 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleTauLeaping; push!(tsave, tspan[2]) end - sol = DiffEqBase.build_solution(prob, alg, tsave, usave, + sol = SciMLBase.build_solution(prob, alg, tsave, usave, calculate_error = false, - interp = DiffEqBase.ConstantInterpolation(tsave, usave)) + interp = SciMLBase.ConstantInterpolation(tsave, usave)) end # Compute the highest order of reaction (HOR) for each reaction j, as per Cao et al. (2006), Section IV. @@ -399,9 +399,9 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleExplicitTauLeaping; dtmin, saveat_times, usave, tsave, du, counts, rate_cache, rate_effective, maj, save_end) - sol = DiffEqBase.build_solution(prob, alg, tsave, usave, + sol = SciMLBase.build_solution(prob, alg, tsave, usave, calculate_error = false, - interp = DiffEqBase.ConstantInterpolation(tsave, usave)) + interp = SciMLBase.ConstantInterpolation(tsave, usave)) return sol end diff --git a/src/solve.jl b/src/solve.jl index 854cf8da1..5df5dbeb9 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -1,5 +1,5 @@ -function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P}, - alg::DiffEqBase.AbstractDEAlgorithm; +function SciMLBase.__solve(jump_prob::SciMLBase.AbstractJumpProblem{P}, + alg::SciMLBase.AbstractDEAlgorithm; merge_callbacks = true, kwargs...) where {P} # Merge jump_prob.kwargs with passed kwargs kwargs = DiffEqBase.merge_problem_kwargs(jump_prob; merge_callbacks, kwargs...) @@ -10,7 +10,7 @@ function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P}, end #Ambiguity Fix -function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P}, +function SciMLBase.__solve(jump_prob::SciMLBase.AbstractJumpProblem{P}, alg::Union{SciMLBase.AbstractRODEAlgorithm, SciMLBase.AbstractSDEAlgorithm}; merge_callbacks = true, kwargs...) where {P} # Merge jump_prob.kwargs with passed kwargs @@ -23,24 +23,24 @@ end # if passed a JumpProblem over a DiscreteProblem, and no aggregator is selected use # SSAStepper -function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P}; +function SciMLBase.__solve(jump_prob::SciMLBase.AbstractJumpProblem{P}; kwargs...) where {P <: DiscreteProblem} - DiffEqBase.__solve(jump_prob, SSAStepper(); kwargs...) + SciMLBase.__solve(jump_prob, SSAStepper(); kwargs...) end -function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem; kwargs...) +function SciMLBase.__solve(jump_prob::SciMLBase.AbstractJumpProblem; kwargs...) error("Auto-solver selection is currently only implemented for JumpProblems defined over DiscreteProblems. Please explicitly specify a solver algorithm in calling solve.") end -function DiffEqBase.__init(_jump_prob::DiffEqBase.AbstractJumpProblem{P}, - alg::DiffEqBase.AbstractDEAlgorithm; merge_callbacks = true, kwargs...) where {P} +function SciMLBase.__init(_jump_prob::SciMLBase.AbstractJumpProblem{P}, + alg::SciMLBase.AbstractDEAlgorithm; merge_callbacks = true, kwargs...) where {P} # Merge jump_prob.kwargs with passed kwargs kwargs = DiffEqBase.merge_problem_kwargs(_jump_prob; merge_callbacks, kwargs...) __jump_init(_jump_prob, alg; kwargs...) end -function __jump_init(_jump_prob::DiffEqBase.AbstractJumpProblem{P}, alg; +function __jump_init(_jump_prob::SciMLBase.AbstractJumpProblem{P}, alg; callback = nothing, seed = nothing, alias_jump = Threads.threadid() == 1, kwargs...) where {P} @@ -52,7 +52,7 @@ function __jump_init(_jump_prob::DiffEqBase.AbstractJumpProblem{P}, alg; end # DDEProblems do not have a recompile_flag argument - if jump_prob.prob isa DiffEqBase.AbstractDDEProblem + if jump_prob.prob isa SciMLBase.AbstractDDEProblem # callback comes after jump consistent with SSAStepper integrator = init(jump_prob.prob, alg; callback = CallbackSet(jump_prob.jump_callback, callback), diff --git a/src/variable_rate.jl b/src/variable_rate.jl index e78684fb6..3859e5da7 100644 --- a/src/variable_rate.jl +++ b/src/variable_rate.jl @@ -73,11 +73,11 @@ function extend_u0(prob, Njumps, rng) return u0 end -function extend_problem(prob::DiffEqBase.AbstractDiscreteProblem, jumps; rng = DEFAULT_RNG) +function extend_problem(prob::SciMLBase.AbstractDiscreteProblem, jumps; rng = DEFAULT_RNG) error("General `VariableRateJump`s require a continuous problem, like an ODE/SDE/DDE/DAE problem. To use a `DiscreteProblem` bounded `VariableRateJump`s must be used. See the JumpProcesses docs.") end -function extend_problem(prob::DiffEqBase.AbstractODEProblem, jumps; rng = DEFAULT_RNG) +function extend_problem(prob::SciMLBase.AbstractODEProblem, jumps; rng = DEFAULT_RNG) _f = SciMLBase.unwrapped_f(prob.f) if isinplace(prob) @@ -103,7 +103,7 @@ function extend_problem(prob::DiffEqBase.AbstractODEProblem, jumps; rng = DEFAUL remake(prob; f, u0) end -function extend_problem(prob::DiffEqBase.AbstractSDEProblem, jumps; rng = DEFAULT_RNG) +function extend_problem(prob::SciMLBase.AbstractSDEProblem, jumps; rng = DEFAULT_RNG) _f = SciMLBase.unwrapped_f(prob.f) if isinplace(prob) @@ -139,7 +139,7 @@ function extend_problem(prob::DiffEqBase.AbstractSDEProblem, jumps; rng = DEFAUL remake(prob; f, g = jump_g, u0) end -function extend_problem(prob::DiffEqBase.AbstractDDEProblem, jumps; rng = DEFAULT_RNG) +function extend_problem(prob::SciMLBase.AbstractDDEProblem, jumps; rng = DEFAULT_RNG) _f = SciMLBase.unwrapped_f(prob.f) if isinplace(prob) @@ -166,7 +166,7 @@ function extend_problem(prob::DiffEqBase.AbstractDDEProblem, jumps; rng = DEFAUL end # Not sure if the DAE one is correct: Should be a residual of sorts -function extend_problem(prob::DiffEqBase.AbstractDAEProblem, jumps; rng = DEFAULT_RNG) +function extend_problem(prob::SciMLBase.AbstractDAEProblem, jumps; rng = DEFAULT_RNG) _f = SciMLBase.unwrapped_f(prob.f) if isinplace(prob) diff --git a/test/qa.jl b/test/qa.jl index 29a637087..685ea29df 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -1,30 +1,44 @@ -using JumpProcesses -using ExplicitImports -using Aqua -using Test +using SciMLTesting, JumpProcesses, Test -@testset "QA Tests" begin - @testset "Aqua tests" begin - Aqua.test_all(JumpProcesses; - ambiguities = false, # TODO: fix ambiguities and enable - deps_compat = true, - piracies = false, # We define default solvers for AbstractJumpProblem - unbound_args = true, - undefined_exports = true, - project_extras = true, - stale_deps = true, - persistent_tasks = false) # disabled due to false positives - end - - @testset "ExplicitImports tests" begin - # Check that we're using explicit imports - @test check_no_implicit_imports(JumpProcesses) === nothing - - # Check for stale explicit imports (imports that are not used) - @test check_no_stale_explicit_imports(JumpProcesses) === nothing - - # Allow some flexibility for non-public imports during transition - # This can be made stricter once all non-public API usage is resolved - @test_nowarn check_all_explicit_imports_via_owners(JumpProcesses) - end -end \ No newline at end of file +# The ExplicitImports ignore-lists below are names owned by other packages whose +# released public API does not (yet) include them; each group is annotated with its +# source package. The two public-API checks run only on Julia >= 1.11 (SciMLTesting +# skips them on the LTS), so these lists are irrelevant there. +run_qa( + JumpProcesses; + explicit_imports = true, + aqua_kwargs = (; + ambiguities = false, # TODO: fix ambiguities and enable + piracies = false, # default solvers defined for AbstractJumpProblem + persistent_tasks = false, # disabled due to false positives + ), + ei_kwargs = (; + # Names not (yet) declared public in their owner package's released API. + all_qualified_accesses_are_public = (; + ignore = ( + # Base / Base.Broadcast / Base.FastMath internals + Symbol("@pure"), :BroadcastStyle, :Broadcasted, :Cartesian, + :DefaultArrayStyle, :FastMath, :Unknown, :result_style, :sqrt_fast, + # SciMLBase non-public + :ConstantInterpolation, :DISCRETE_INPLACE_DEFAULT, + :__init, :__solve, :get_colorizers, :isdenseplot, + :parameterless_type, :plottable_indices, :save_discretes_if_enabled!, + :save_final_discretes!, :solution_new_retcode, :unwrapped_f, + :updated_u0_p, + # DiffEqBase non-public + :Stats, + # LinearAlgebra non-public + :AbstractQ, + # FunctionWrappers non-public + :FunctionWrapper, + ), + ), + all_explicit_imports_are_public = (; + ignore = ( + :add_fast, # Base.FastMath non-public + :gauss_points, :gauss_weights, # DiffEqCallbacks non-public + :plot_indices, # SciMLBase non-public + ), + ), + ) +)