Repository navigation
Make the v7 verbose migration path reachable from using OrdinaryDiffEq - #4189
Conversation
…ffEq` `_process_verbose_param(::Bool)` told users to call `DEVerbosity()`, which was not reachable from a plain `using OrdinaryDiffEq`. Export `DEVerbosity` from the umbrella package (importing it from DiffEqBase, which owns and exports it) and replace the message with a copy-pasteable one. Also qualify the OrdinaryDiffEqCore threading options in the docstrings/docs that presented them as bare names. Closes SciML#4163 Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
c2866a7 to
30fdfe4
Compare
|
Rebased onto |
|
CI status so far — One red check, pre-existing and allowed-to-fail: The same job fails on the current master tip ( The remaining ~260 checks are still queued; I will not have read them all before handing this over. |
|
Second red check, also pre-existing:
Both red checks on this PR are therefore pre-existing master failures; a separate investigation is open for the QA one. |
CI triageAll red checks so far are pre-existing on master. Evidence for each:
Green and relevant: Not verified: the remaining queued checks, and the GPU lane. |
|
Final CI read on the jobs that actually cover this change — all green:
The two remaining reds touching packages in this diff are both pre-existing and unrelated to the change:
|
|
Ran (Local is 15/2/2 vs CI's 16/1/2 — a Julia-version difference in one subtest; the failing assertions themselves are identical and none of the named symbols appear in this diff.) That covers both packages this PR modifies beyond the umbrella: |
Closes #4163
Please ignore until reviewed by @ChrisRackauckas.
What changed and why
_process_verbose_param(::Bool)threw anArgumentErrorinstructing users to callDEVerbosity(), butDEVerbositywas not reachable from a plainusing OrdinaryDiffEq— it lives in DiffEqBase and the umbrella package neither imported nor exported it. The instruction could not be followed without first discovering two extra packages.OrdinaryDiffEqnow importsDEVerbosityfrom DiffEqBase (its owner, which exports it) and re-exports it, matching the existingAutoDePSpecializepattern insrc/OrdinaryDiffEq.jl.SciMLLoggingwas already exported, soverbose = DEVerbosity(SciMLLogging.None())now works from a bareusing OrdinaryDiffEq.solve(...)line for both thefalseandtruecases, and states where the names come from. The same text is applied to the two other copies of it (DelayDiffEq,StochasticDiffEqCore) so the three do not diverge.docs/src/verbosity.mdgains a "Migrating fromverbose::Bool" section;NEWS.mdrecords whereDEVerbosityis reachable from.This adds public API, so
OrdinaryDiffEqgets a minor bump (7.3.1 → 7.4.0), not a patch.DiffEqBase,DelayDiffEqandStochasticDiffEqCoreget patch bumps for the message text.DEVerbosityvsODEVerbosity(issue part 1, second half)Already resolved on master — no code change needed.
ODEVerbosityhas never existed in any shipped source.NEWS.mdsaidODEVerbosityand was corrected toDEVerbosityin #3761 (commit0bda3109a1b9581450776b0e5f9607c2dd5e5281, "Change typo in NEWS"). The issue was filed against the released v7.3.0, which predates that fix.git log -S"ODEVerbosity" -- NEWS.mdshows no later reintroduction. The new test asserts the error message never namesODEVerbosity.PolyesterThreads(issue part 2)Not exported, and that looks deliberate rather than accidental:
Sequential,BaseThreads,PolyesterThreads,AbstractThreadingOptionandisthreadedare all in OrdinaryDiffEqCore'spublicdeclaration (lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl:427-447).OrdinaryDiffEqCore.Xon a page whose first line reads "This page lists user-facing OrdinaryDiffEqCore API" (docs/src/api/ordinarydiffeqcore.md).@reexportin favour of a curated export list.So the intent is public-but-qualified, and exporting it would work against that design. The gap is that the docs presenting the option still used the bare v6 spelling. Fixed on the documentation side only: the
KuttaPRK2p5andQPRK98docstrings and the docs page now writeOrdinaryDiffEqCore.PolyesterThreads()and say the type is public but not exported, andNEWS.mdrecords that bare v6 usage now raisesUndefVarError. No source behavior change.lib/OrdinaryDiffEqExtrapolation/src/algorithms.jlwas deliberately left untouched (#4154 is in flight there).If the preference is instead to export the threading options from the solver sublibraries that take a
threading/threadkeyword, say so and I will do that in a follow-up — it is a judgment call about export surface, not something I wanted to force into this PR.Verification
Base commit:
9d23061ef8a2b155ca2b6ff78670f6e320967940.New test:
test/InterfaceI/verbose_migration_tests.jl, registered in theInterfaceIgroup. It imports nothing butOrdinaryDiffEqandTest, so it fails if the escape hatch is not reachable from a bareusing OrdinaryDiffEq. Its last assertion extracts thesolve(...)lines out of the thrown message andevals them verbatim, so the message itself is what is under test, not a paraphrase of it.Failing before the fix
git stash push -- src/OrdinaryDiffEq.jl lib/DiffEqBase/src/verbosity.jl, then run the new test file:Passing after the fix
git stash pop, same command:The message itself
Before, on master, from
solve(prob, Tsit5(), verbose = false):After:
Reachability check in the same session:
Test groups
GROUP=QAfails on this branch — but it fails identically on unmodified master, so it is not introduced here. Both runs are87 passed, 1 failedwith the same assertion:DEVerbosityis not in the undocumented list, and every QA subtest this PR touches passes on the branch:That pre-existing master failure is being investigated separately; it is unrelated to this change.
Docs build
Exit code 0. No new warnings for
docs/src/verbosity.mdordocs/src/api/ordinarydiffeqcore.md; the remaining warnings are the pre-existingtableaus.md/misc.mdones.Formatting / spelling
--checkclean on every changed.jlfile.typosclean over the changed files.What I did NOT verify
QAandInterfaceIgroups were run. The other ODE groups, and theDelayDiffEq/StochasticDiffEqCoresuites, were not — those two packages received only a string-literal change and a patch version bump.julia pre, and ODEInterfaceRegression jobs were not run locally.SciMLLoggingis reachable was exercised for OrdinaryDiffEq only. StochasticDiffEq reachesDEVerbositythrough its@reexport using DiffEqBase, which I did not run.Things to push back on
DiffEqBasetoOrdinaryDiffEq's[deps](it was already a transitive dep via OrdinaryDiffEqCore, and was previously in[extras]). The alternative was to re-export it through OrdinaryDiffEqCore, which would mean depending on a non-public re-export rather than on the owning package.test/qa/qa_tests.jlnow addspublic_api_names(DiffEqBase)toORDINARYDIFFEQ_REEXPORTS, widening the reexport allow-list by all of DiffEqBase's public API rather than justDEVerbosity. That matches how the other packages are listed there, but it is wider than strictly needed.🤖 Generated with Claude Code
https://claude.ai/code/session_01F75XsVeZ94QH3PmCuq6QUF