Support SciMLBase v3 / OrdinaryDiffEq v7 ecosystem#307
Conversation
Per the original PR intent, this commit drops the legacy major ranges that were temporarily restored, so installing Catalyst now forces the new ecosystem majors: - DiffEqBase v7 (was 6.165.0, 7) - OrdinaryDiffEqBDF v2 (was 1, 2) - OrdinaryDiffEqCore v4 (was 3.22, 4) - OrdinaryDiffEqDefault v2 (was 1, 2) - OrdinaryDiffEqRosenbrock v2 (was 1, 2) - OrdinaryDiffEqSDIRK v2 (docs only; was 1, 2) - OrdinaryDiffEqTsit5 v2 (was 1, 2) - OrdinaryDiffEqVerner v2 (was 1, 2) - SciMLBase v3 (was 2.84, 3) - StochasticDiffEq v7 (was 6.101, 7) Same tightening in docs/Project.toml and test/extensions/Project.toml. Bump Catalyst to v17.0.0 (breaking). Documentation and Extensions Tests are expected to stay red on this branch until the corresponding downstream bumps land in the registry: - sebapersson/SBMLImporter.jl#155 (Catalyst v17 / SciMLBase v3) - bifurcationkit/BifurcationKit.jl#307 (SciMLBase v3 + ensemble prob_func signature fix) - sebapersson/PEtab.jl#383 (Catalyst v17 / SciMLBase v3 + SciMLAlgorithm rename + verbose-Bool fix) Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Thank you Chris for your work (and your co-worker ;) ) I will try to review this PR as fast as I can |
|
Hi, I am done with a major overhaul of BK. |
The new ecosystem release changed the ensemble `prob_func` signature from `(prob, i, repeat)` to `(prob, ctx::EnsembleContext)` (no deprecation shim). Update FlowDE.jl's three `_prob_func` definitions to accept either signature: detect whether the second arg is an Integer (v1/v2) or an EnsembleContext (v3) and extract the trajectory index accordingly. `output_func` was already using a 2-arg signature `(sol, i)` whose unused `i` is benignly replaced by the context object on v3, so no change there beyond renaming the throwaway parameter. Compat: - SciMLBase: "^1, ^2" → "^1, ^2, 3" Verified locally: BifurcationKit precompiles and loads against SciMLBase v3.9.1, RecursiveArrayTools v4.x, DiffEqBase v7.x. Context: this unblocks Catalyst v17's Extensions tests (SciML/Catalyst.jl#1466) and any other downstream user that wants BifurcationKit alongside the v7 ecosystem. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-authored-by: Christopher Rackauckas <accounts@chrisrackauckas.com>
…p fixups
After running the full suite against SciMLBase 3.13 / OrdinaryDiffEq 7.0
on master (rebased branch), three remaining v3/v7 break points surfaced:
1. VectorContinuousCallback in SciMLBase v3 dropped the affect_neg!
keyword. The single affect! is now invoked with
affect!(integrator, simultaneous_events::Vector{Int8}) where each
entry is +1 for an upcrossing, -1 for a downcrossing, 0 for none.
PoincareShooting wants upcrossings only, so its callback now calls
terminate! whenever any(==(Int8(1)), events).
2. OrdinaryDiffEq v7 no longer reexports the full solver catalog from
the umbrella package -- Rodas5, Rodas4, Rodas4P live in
OrdinaryDiffEqRosenbrock, KenCarp4 in OrdinaryDiffEqSDIRK. Tests now
pull them directly from the subpackages, which are added to
[extras]/[targets]. Test compat for OrdinaryDiffEq widened to
"^6.33, 7".
3. terminate! and EnsembleProblem are likewise no longer reexported by
OrdinaryDiffEq; the two tests that referenced ODE.terminate! /
ODE.EnsembleProblem now `using SciMLBase: terminate!,
EnsembleProblem`.
Full test suite: 15247/15247 passing locally (Julia 1.10, SciMLBase
3.13.0, OrdinaryDiffEq 7.0.0, DiffEqBase 7.5.0).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
c219c21 to
047be02
Compare
|
@rveltz Sorry, the diff was stale — your 0.6.0/0.7.0 refactor introduced several more v3/v7 break points that hadn't surfaced when I opened this. Rebased on current
The CI failure you saw was the resolver giving up: with Verified locally on Julia 1.10 with SciMLBase 3.13.0 / OrdinaryDiffEq 7.0.0 / DiffEqBase 7.5.0 / RecursiveArrayTools 4.3.0: CI should be green this time — please re-run when you have a moment. Ignore until reviewed by @ChrisRackauckas as usual. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #307 +/- ##
=======================================
Coverage 91.59% 91.59%
=======================================
Files 69 69
Lines 10315 10321 +6
=======================================
+ Hits 9448 9454 +6
Misses 867 867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Allows BifurcationKit to be used alongside the SciMLBase v3 / OrdinaryDiffEq v7 / RecursiveArrayTools v4 ecosystem release that's currently rolling out across SciML.
Compat change
"^1, ^2""^1, ^2, 3"Source change
The new ensemble API changed the
prob_funcsignature from(prob, i, repeat)to(prob, ctx::EnsembleContext)with no deprecation shim. Updated the three_prob_funcdefinitions insrc/periodicorbit/FlowDE.jlto accept either signature — detect whether the second arg is anInteger(v1/v2) or anEnsembleContext(v3) and extract the trajectory index accordingly:output_funcalready had a 2-arg signature(sol, i)whose unusediis benignly replaced by the context object on v3, so no functional change there beyond renaming the throwaway parameter to make the intent obvious.Other v3 breaking changes checked and not used by BifurcationKit
I went through OrdinaryDiffEq.jl's NEWS.md and grepped the codebase for each migration. None of these patterns are used in BifurcationKit's source:
sol[i]linear indexing onODESolution(RAT v4 makes it scalar) — usessol.u[i]consistentlylength(sol)/eachindex(sol)/for u in solon a SciML solution — not usedEnsembleSolutioniteration viafor sol in es— usessol.uconsistentlyu_modified!→derivative_discontinuity!— not usedsol.destats/has_destats— not usedDEAlgorithm/DEProblem/DESolutionabstract type renames — not used (uses concreteODEProblem,EnsembleProblem,SciMLBase.AbstractODEIntegrator)sol.retcode == :Symbol— no equality comparisons against Symbol retcodesverbose = falseonsolve— BifurcationKit's ownverbosekwargs aren't passed to underlyingsolveconcrete_solve— only mentioned in a commentalias_u0/alias_du0— not usedgamma/beta1/beta2/qmin/qmax/etc. controller kwargs — not usedchunk_size/standardtag/diff_type— not usedVerified
Resolves with: SciMLBase 3.9.1 / RecursiveArrayTools 4.3.0 / DiffEqBase 7.3.0.
Context
Unblocks
Catalyst.jlv17 release (SciML/Catalyst.jl#1466) and any other downstream user that wants BifurcationKit alongside the v7 ecosystem.Please ignore until reviewed by @ChrisRackauckas / the BifurcationKit maintainers.
🤖 Generated with Claude Code