Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
SBMLImporter = "210efffb-c3c8-456d-a807-6f55560b12fe"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
Expand Down Expand Up @@ -78,10 +79,10 @@ Aqua = "0.8"
ArrayInterface = "7.7"
Bijectors = "0.13, 0.15"
CSV = "0.10"
Catalyst = "16"
Catalyst = "16, 17"
ComponentArrays = "0.15"
DataFrames = "1"
DiffEqBase = "6.183.0"
DiffEqBase = "6.183.0, 7"
DiffEqCallbacks = "4"
Distributed = "1"
Distributions = "0.25"
Expand All @@ -104,10 +105,10 @@ Optim = "2"
Optimization = "5"
OptimizationLBFGSB = "1.4.0"
OptimizationOptimJL = "0.4"
OrdinaryDiffEqBDF = "1.0"
OrdinaryDiffEqRosenbrock = "1.0"
OrdinaryDiffEqSDIRK = "1.0"
OrdinaryDiffEqTsit5 = "1.9.0"
OrdinaryDiffEqBDF = "1.0, 2"
OrdinaryDiffEqRosenbrock = "1.0, 2"
OrdinaryDiffEqSDIRK = "1.0, 2"
OrdinaryDiffEqTsit5 = "1.9.0, 2"
PEtabSelect = "0.1"
Plots = "1"
PreallocationTools = "1"
Expand All @@ -119,7 +120,8 @@ ReverseDiff = "1"
RuntimeGeneratedFunctions = "0.5"
SBMLImporter = "4"
SafeTestsets = "0.1"
SciMLBase = "2"
SciMLBase = "2, 3"
SciMLLogging = "1"
SciMLSensitivity = "7.81"
Setfield = "1.1"
StableRNGs = "1.0.4"
Expand Down
17 changes: 17 additions & 0 deletions src/PEtab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,26 @@ import SciMLBase.remake
import StatsBase.describe
import DiffEqBase
import QuasiMonteCarlo: LatinHypercubeSample, SamplingAlgorithm
import SciMLLogging

RuntimeGeneratedFunctions.init(@__MODULE__)

# Compat: SciMLBase v3 renamed `SciMLAlgorithm` → `AbstractSciMLAlgorithm`.
@static if isdefined(SciMLBase, :SciMLAlgorithm)
using SciMLBase: SciMLAlgorithm
else
const SciMLAlgorithm = SciMLBase.AbstractSciMLAlgorithm
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exists on the pre-v3 too

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real thing here is to just always use SciMLBase.AbstractSciMLAlgorithm on both v2 and v3: SciMLAlgorithm was deprecated a long ways back.

end

# Compat helper: SciMLBase v3 / DiffEqBase v7 no longer accept `Bool` for the
# `verbose` kwarg of `solve`; they require a verbosity object from
# SciMLLogging. On older versions, `Bool` still works.
@static if isdefined(DiffEqBase, :DEVerbosity)
_verbose_kwarg(b::Bool) = b ? SciMLLogging.Standard() : SciMLLogging.None()
else
_verbose_kwarg(b::Bool) = b
end

const DistInput = Union{Real, Symbolics.Num}
const ModelSystem = Union{ODESystem, ReactionSystem, ODEProblem}
const NonlinearAlg = Union{Nothing, NonlinearSolve.AbstractNonlinearSolveAlgorithm}
Expand Down
3 changes: 2 additions & 1 deletion src/solve/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ function _solve(
cbs::SciMLBase.DECallback
)::ODESolution
return solve(
oprob, solver, abstol = abstol, reltol = reltol, verbose = verbose,
oprob, solver, abstol = abstol, reltol = reltol,
verbose = _verbose_kwarg(verbose),
force_dtmin = force_dtmin, maxiters = maxiters, saveat = tsave, dense = dense,
callback = cbs
)
Expand Down
3 changes: 2 additions & 1 deletion src/solve/steady_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ function _solve_ss(
)
return solve(
_oprob, solver, abstol = abstol, reltol = reltol, maxiters = maxiters,
saveat = tsave, dense = false, callback = _cbs, verbose = verbose
saveat = tsave, dense = false, callback = _cbs,
verbose = _verbose_kwarg(verbose)
)
end

Expand Down