Skip to content

Support Catalyst v17 / SciMLBase v3 / OrdinaryDiffEq v7 ecosystem#383

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
sebapersson:mainfrom
ChrisRackauckas-Claude:widen-compat-catalyst17
Draft

Support Catalyst v17 / SciMLBase v3 / OrdinaryDiffEq v7 ecosystem#383
ChrisRackauckas-Claude wants to merge 1 commit into
sebapersson:mainfrom
ChrisRackauckas-Claude:widen-compat-catalyst17

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown

Summary

Allows PEtab to be used with the Catalyst v17 / SciMLBase v3 / OrdinaryDiffEq v7 ecosystem release that's currently rolling out across SciML.

Compat changes

Package Before After
Catalyst "16" "16, 17"
DiffEqBase "6.183.0" "6.183.0, 7"
OrdinaryDiffEqBDF "1.0" "1.0, 2"
OrdinaryDiffEqRosenbrock "1.0" "1.0, 2"
OrdinaryDiffEqSDIRK "1.0" "1.0, 2"
OrdinaryDiffEqTsit5 "1.9.0" "1.9.0, 2"
SciMLBase "2" "2, 3"
SciMLLogging (new) "1"

SciMLLogging is added as a regular (non-extension) dep because it's used in the verbose kwarg compat shim that needs to be defined at module load time on both v6 and v7 codepaths.

Source changes

Two SciMLBase v3 / OrdinaryDiffEq v7 breaking changes are exercised by PEtab's source. Both are gated with @static if so PEtab works on both v2 and v3.

1. SciMLAlgorithmAbstractSciMLAlgorithm (SciMLBase v3 rename, no deprecation shim)

Used as a type annotation in ODESolver's solver/solver_adj fields and in several method signatures (solve.jl, helper.jl, petab_odeproblem.jl). Aliased back to the old name at the top of PEtab.jl:

@static if isdefined(SciMLBase, :SciMLAlgorithm)
    using SciMLBase: SciMLAlgorithm
else
    const SciMLAlgorithm = SciMLBase.AbstractSciMLAlgorithm
end

2. verbose = false no longer accepted on solve (DiffEqBase v7)

DiffEqBase v7 requires a verbosity object from SciMLLogging (e.g. None(), Standard()) instead of Bool. PEtab's ODESolver.verbose::Bool is passed straight through to solve in solve/solve.jl and solve/steady_state.jl. Wrapped via _verbose_kwarg:

@static if isdefined(DiffEqBase, :DEVerbosity)
    _verbose_kwarg(b::Bool) = b ? SciMLLogging.Standard() : SciMLLogging.None()
else
    _verbose_kwarg(b::Bool) = b
end

PEtab's user-facing ODESolver(...; verbose = true|false) API is unchanged.

Other v3 breaking changes checked and not used

I went through OrdinaryDiffEq.jl's NEWS.md and grepped for each migration. None of these patterns are used in PEtab's source:

  • sol[i] linear indexing on ODESolution (RAT v4 makes it scalar)
  • length(sol) / eachindex(sol) / iterate(sol) / for u in sol on a SciML solution
  • EnsembleSolution iteration via for sol in es
  • prob_func(prob, i, repeat) ensemble signature (PEtab doesn't construct EnsembleProblems)
  • u_modified!derivative_discontinuity!
  • sol.destats / has_destats field/trait renames
  • DEAlgorithm / DEProblem / DESolution abstract type renames
  • sol.retcode == :Symbol Symbol-based retcode comparisons
  • concrete_solve / alias_u0 / alias_du0
  • Old controller kwargs (gamma, beta1, beta2, qmin, etc.)
  • chunk_size / standardtag / diff_type AD kwargs

Verified

julia> using Pkg; Pkg.activate(".");
       Pkg.develop(path="path/to/Catalyst.jl@v17");
       Pkg.develop(path="path/to/SBMLImporter#widen-compat-catalyst17");
       using PEtab
loaded OK
v"5.1.1"

Resolves with: Catalyst 17.0.0 / SciMLBase 3.9.1 / DiffEqBase 7.3.0 / OrdinaryDiffEq{BDF,Rosenbrock,SDIRK,Tsit5} v2.

Context

Unblocks SciML/Catalyst.jl#1466 (Catalyst v17 release), where PEtab is in docs/Project.toml and currently blocks the doc build.

Depends on: sebapersson/SBMLImporter.jl#155 (PEtab depends on SBMLImporter).

Please ignore until reviewed by @sebapersson.

🤖 Generated with Claude Code

Compat:
- Catalyst: "16" → "16, 17"
- DiffEqBase: "6.183.0" → "6.183.0, 7"
- OrdinaryDiffEqBDF: "1.0" → "1.0, 2"
- OrdinaryDiffEqRosenbrock: "1.0" → "1.0, 2"
- OrdinaryDiffEqSDIRK: "1.0" → "1.0, 2"
- OrdinaryDiffEqTsit5: "1.9.0" → "1.9.0, 2"
- SciMLBase: "2" → "2, 3"
- New dep: SciMLLogging "1" (used for verbose-kwarg compat shim)

Source:
- SciMLBase v3 renamed `SciMLAlgorithm` → `AbstractSciMLAlgorithm` with
  no deprecation. Add `@static` shim that aliases the new name back to
  `SciMLAlgorithm` so existing struct fields and method signatures
  keep working on both v2 and v3.
- DiffEqBase v7 no longer accepts `Bool` for the `verbose` kwarg of
  `solve`; require a verbosity object from SciMLLogging. Wrap the
  pass-through in `_verbose_kwarg(b::Bool)` which converts to
  `SciMLLogging.Standard()`/`None()` when `DiffEqBase.DEVerbosity` is
  defined (v7), or returns the bool unchanged on v6.

Verified locally: PEtab loads, precompiles, and resolves against
Catalyst 17.0.0 / SciMLBase 3.9.1 / DiffEqBase 7.3.0 /
OrdinaryDiffEqTsit5 v2 / OrdinaryDiffEqBDF v2 / OrdinaryDiffEqRosenbrock
v2 / OrdinaryDiffEqSDIRK v2.

Context: this unblocks SciML/Catalyst.jl#1466 (Catalyst v17 release)
since PEtab is in the docs/Project.toml.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/Catalyst.jl that referenced this pull request May 10, 2026
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>
Comment thread src/PEtab.jl
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants