Skip to content

Require documented ODEInterface wrapper API - #116

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:codex/odeinterface-owner-public-api
Aug 5, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:codex/odeinterface-owner-public-api

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Requires ODEInterface v0.5.2, whose owner PR makes the solver-wrapper and callback-protocol API public, documented, and rendered.
  • Removes the blanket DiffEqBase reexport and replaces private/reexported accesses with their documented owning APIs.
  • Uses strict SciMLTesting 2.4 defaults with no ignores, reexport exceptions, or docs/test suppression.

Validation

  • Pkg.test() against the registered ODEInterface v0.5.2
  • standard run_qa(ODEInterfaceDiffEq)
  • Documenter build with doctests
  • Runic and git diff --check

Depends on luchr/ODEInterface.jl#41, merged and registered as v0.5.2.

Ignore until reviewed by @ChrisRackauckas.

ChrisRackauckas and others added 2 commits July 30, 2026 00:40
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
The owner PR shipped the public wrapper API as a non-breaking 0.5.2
release rather than 0.6.0, so the compat entry follows it.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PwQXJfsgRjUXdYXZrw3LT
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Owner PR merged and registered, so the compat entry now points at the real release: ODEInterface = "0.6" → "0.5.2" (cbea479).

The owner PR shipped as a non-breaking 0.5.2 rather than 0.6.0 — the Base.dump method and WrappedODEException <: Base.WrappedException were kept and allow-listed in QA instead of removed, leaving that branch purely additive. General has ODEInterface 0.5.2 with git-tree-sha1 = 4d8949ee9ef34bc2445f89e7064b19a54a6ab962, which matches the tree of merge commit luchr/ODEInterface.jl@f2f2523 exactly.

Verified locally against the registered release (Pkg.status reports [54ca160b] ODEInterface v0.5.2, built from scratchspace 4d8949ee…):

Test Summary:           | Total   Time
Core/algorithm_tests.jl |     0  52.4s
Test Summary:     | Pass  Total  Time
Core/callbacks.jl |    3      3  4.2s
Test Summary:                | Pass  Total  Time
Core/initialization_tests.jl |   13     13  8.8s
Test Summary:     | Pass  Total  Time
Core/jac_tests.jl |    1      1  1.5s
Test Summary:             | Pass  Total   Time
Core/mass_matrix_tests.jl |    4      4  17.9s
Test Summary:                    | Pass  Total     Time
Core/mtk_initialization_tests.jl |   55     55  1m17.3s
Test Summary:        | Pass  Total  Time
Core/saving_tests.jl |    3      3  2.0s
     Testing ODEInterfaceDiffEq tests passed
Test Summary:     | Pass  Total   Time
Quality Assurance |   20     20  34.2s

Unresolved: this PR is versioned as a patch but is breaking

5.2.2 → 5.2.3, but the PR drops @reexport using DiffEqBase and the export OverrideInit, NoInit, CheckInit, DefaultInit line. Comparing the loaded module on both branches:

name master this branch
solve, ODEProblem, ReturnCode exported not exported
DefaultInit, NoInit, CheckInit, OverrideInit exported not exported

This repo's own README example (README.md lines 33–44), run verbatim on this branch:

ERROR: LoadError: UndefVarError: `ODEProblem` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name also exists in SciMLBase.
    - Also exported by DiffEqBase (loaded but not imported in Main).

ODEInterfaceDiffEq is post-1.0, so this needs 6.0.0, not 5.2.3. Note the test suite does not catch it: test/algorithm_tests.jl does using ODEInterfaceDiffEq, DiffEqBase, Test, so it imports DiffEqBase explicitly and never exercises the reexport (it also contains zero @test calls — pre-existing on master, worth a separate issue).

Two ways out, not applied here pending a decision:

  1. Keep the reexport removal, version this 6.0.0, and update the README.
  2. Keep the reexport, allow-list it in QA the way the owner PR did, stay at 5.2.3.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 5, 2026 03:24
@ChrisRackauckas
ChrisRackauckas merged commit d732fae into SciML:master Aug 5, 2026
9 checks passed
ChrisRackauckas added a commit that referenced this pull request Aug 23, 2026
* Restore the documented SciML common interface as explicit exports

`d732fae` ("Require documented ODEInterface wrapper API", #116) dropped
`@reexport using DiffEqBase` from `src/ODEInterfaceDiffEq.jl`. That reexport was
this package's entire common-interface surface: with it gone, `using
ODEInterfaceDiffEq` no longer brings `ODEProblem`, `solve`, `ReturnCode` or the
callbacks into scope, so the README's own Lorenz example -- `using ODEInterface,
ODEInterfaceDiffEq; prob = ODEProblem(lorenz, u0, tspan); solve(prob, dopri5())`
-- fails with `UndefVarError`. The package's tests never noticed because the same
commit added `using DiffEqBase` to `test/callbacks.jl`.

Rather than restore the blanket reexport (which put all 196 DiffEqBase names,
including problem types for equation classes ODEInterface cannot touch, into
every user's namespace), export exactly the names normal documented use needs:

  * the problem, function and solution types these solvers accept -- `ODEProblem`,
    `ODEFunction`, `ODESolution`, `NullParameters`;
  * `solve`/`init`/`solve!`/`step!`/`remake`;
  * the ensemble interface, which works through the generic `solve` path;
  * the callbacks, which this package implements (`src/integrator_utils.jl`):
    `CallbackSet`, `ContinuousCallback`, `DiscreteCallback`,
    `VectorContinuousCallback`, `DECallback`, `DEIntegrator`, `DEStats`;
  * the integrator functions this package actually defines methods for --
    `savevalues!`, `change_t_via_interpolation!`, `get_tmp_cache`, `u_modified!`,
    `set_proposed_dt!`, plus `terminate!`, which callbacks call;
  * `ReturnCode` and `successful_retcode`, used throughout the tests; and
  * the DAE initialization algorithms `src/initialize.jl` implements
    `initialize_dae!` for: `DefaultInit`, `NoInit`, `CheckInit`, `OverrideInit`.

Deliberately left out: `BrownFullBasicInit`/`ShampineCollocationInit` (no
`initialize_dae!` method here), the integrator hooks with no method for
`ODEInterfaceIntegrator` (`add_tstop!`, `reinit!`, `get_du`, `check_error`, ...),
and every SDE/DDE/BVP/optimization type DiffEqBase carried along.

Each name is imported from the module that owns it -- SciMLBase for all but
`DefaultInit`, which DiffEqBase owns -- so nothing changes about who documents
them. This only adds names back that `using ODEInterfaceDiffEq` used to provide,
so it is a minor bump, not a break.

`test/qa/qa.jl` declares the same list through `reexports_allow`, and a new
testset asserts every approved name is both in `names(ODEInterfaceDiffEq)` and in
scope from `using ODEInterfaceDiffEq`, so the allow-list cannot drift from the
exports.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

* Document the reexported SciML common interface

A restored export that is not documented is only half the fix: a reader cannot
see what `using ODEInterfaceDiffEq` gives them or which package actually owns
each name, and the next QA sweep has no way to tell the reexport was deliberate.

Add a "Reexported SciML common interface" section to the rendered docs page,
grouped by role (problems, functions, solutions, ensembles, solving, integrator
interface, return status, callbacks, initialization algorithms), naming and
linking SciMLBase and DiffEqBase as the owners, and stating the boundary: the
integrator functions listed are exactly the ones this package implements methods
for, `BrownFullBasicInit`/`ShampineCollocationInit` are deliberately excluded,
and anything else must be imported from SciMLBase or DiffEqBase directly.

The docs list, the `export` block in src/ODEInterfaceDiffEq.jl and the
`REEXPORTS` tuple in test/qa/qa.jl are the same list in three places.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

---------

Co-authored-by: Claude <noreply@anthropic.com>
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