Skip to content

Commit dc25f1a

Browse files
committed
add deprecation warnings
1 parent 1a5f21d commit dc25f1a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/reactionsystem_conversions.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,22 +979,30 @@ function Base.show(io::IO, mime::MIME"text/plain", jinputs::JumpInputs)
979979
summary(io, jinputs)
980980
end
981981

982+
# DROP IN CATALYST 16
982983
# DiscreteProblem from AbstractReactionNetwork
983984
function DiffEqBase.DiscreteProblem(rs::ReactionSystem, u0, tspan::Tuple,
984985
p = DiffEqBase.NullParameters(), args...; name = nameof(rs),
985986
combinatoric_ratelaws = get_combinatoric_ratelaws(rs), checks = false,
986987
expand_catalyst_funs = true, kwargs...)
988+
Base.depwarn("DiscreteProblem(rn::ReactionSystem, ...) is deprecated and will be \
989+
removed in Catalyst 16. Use JumpInputs(rn, ...) instead.",
990+
:DiscreteProblem)
987991
jsys = convert(JumpSystem, rs; name, combinatoric_ratelaws, checks,
988992
expand_catalyst_funs)
989993
jsys = complete(jsys)
990994
return DiscreteProblem(jsys, u0, tspan, p, args...; kwargs...)
991995
end
992996

997+
# DROP IN CATALYST 16
993998
# JumpProblem from AbstractReactionNetwork
994-
function JumpProcesses.JumpProblem(rs::ReactionSystem, prob,
999+
function JumpProcesses.JumpProblem(rs::ReactionSystem, prob::AbstractDEProblem,
9951000
aggregator = JumpProcesses.NullAggregator(); name = nameof(rs),
9961001
combinatoric_ratelaws = get_combinatoric_ratelaws(rs),
9971002
expand_catalyst_funs = true, checks = false, kwargs...)
1003+
Base.depwarn("JumpProblem(rn::ReactionSystem, prob, ...) is \
1004+
deprecated and will be removed in Catalyst 16. Use \
1005+
JumpProblem(JumpInputs(rn, ...), ...) insead.", :JumpProblem)
9981006
jsys = convert(JumpSystem, rs; name, combinatoric_ratelaws,
9991007
expand_catalyst_funs, checks)
10001008
jsys = complete(jsys)

0 commit comments

Comments
 (0)