Skip to content

Document public developer APIs#3832

Draft
ChrisRackauckas-Claude wants to merge 8 commits into
SciML:masterfrom
ChrisRackauckas-Claude:docs/public-api-coverage
Draft

Document public developer APIs#3832
ChrisRackauckas-Claude wants to merge 8 commits into
SciML:masterfrom
ChrisRackauckas-Claude:docs/public-api-coverage

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Ignore this PR until reviewed by @ChrisRackauckas.

Summary

  • Add a public developer API reference page for public monorepo/lib APIs.
  • Add concise source docstrings for public developer API names rendered on the page.
  • Run Runic formatting for the repo before committing.

Verification

  • Targeted lib public-name scanner reported public name count: 298, gap count: 0.
  • timeout 3600 /home/crackauc/.juliaup/bin/julia +release --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")' exited 0 after final formatting.\n- rg 'no docs found for' ordinary_docs_precommit.log returned no matches before the generated log was removed.\n- timeout 3600 /home/crackauc/.juliaup/bin/julia +release --project=/home/crackauc/sandbox/tmp_20260708_051717_3275/.runic_env -m Runic --check . exited 0.\n- git diff --check exited 0.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Update after source-site docstring pass.

Changes pushed:

  • Rebased on current origin/master (b797bac).
  • Moved the public API docstrings out of the temporary public_api_docstrings.jl files and onto the source/original definitions.
  • Deleted the centralized public_api_docstrings.jl files.
  • Added fuller SciMLStyle-style docs/examples for the more user-facing APIs touched here, including nonlinear solver wrappers and AMF construction.

Current branch tip: 3a0d70c

Verification run locally:

  • git diff --check origin/master...HEAD: passed.
  • timeout 3600 /home/crackauc/.juliaup/bin/julia +release --project=/home/crackauc/sandbox/tmp_20260708_051717_3275/.runic_env -m Runic --check .: passed.
  • timeout 3600 /home/crackauc/.juliaup/bin/julia +release --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")': exited 0 after rebase. Existing unrelated docs warnings remain.\n- Parsed docs log for missing docs/src/devtools/internals/public_api.md entries: 0.\n- timeout 3600 /home/crackauc/.juliaup/bin/julia +release --project=. -e 'using Pkg; Pkg.test()': timed out at 1 hour, no assertion failure observed before timeout.\n- Retried with timeout 7200 /home/crackauc/.juliaup/bin/julia +release --project=. -e 'using Pkg; Pkg.test()': timed out after 2 hours in test/Integrators_II/resize_tests.jl:231. Many groups passed before timeout, including Export tests, Alg Events Tests, Reverse Directioned Event Tests, Step Limiter Tests, and others. This is a timeout, not a test assertion failure.\n\nIgnore until reviewed by @ChrisRackauckas.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Follow-up on current CI failures:

The downgrade-sublibraries workflow is currently reporting failures for lib/OrdinaryDiffEqAMF and lib/OrdinaryDiffEqCore, but GitHub is not exposing job logs yet because the workflow is still in progress. I ran the corresponding normal sublibrary Core test groups locally on the rebased branch with Julia 1.11:

  • ODEDIFFEQ_TEST_GROUP=Core timeout 3600 /home/crackauc/.juliaup/bin/julia +1.11 --project=lib/OrdinaryDiffEqCore -e 'using Pkg; Pkg.test()': passed. Groups observed: Sparse isdiag Performance 10/10, Algebraic Vars Detection 15/15, Discontinuity Detection 30/30.\n- ODEDIFFEQ_TEST_GROUP=Core timeout 3600 /home/crackauc/.juliaup/bin/julia +1.11 --project=lib/OrdinaryDiffEqAMF -e 'using Pkg; Pkg.test()': passed. OrdinaryDiffEqAMF 24/24.\n\nSo the current CI failures appear specific to the downgrade workflow setup rather than the normal sublibrary tests. I will need the failed job logs after the workflow completes to diagnose the downgrade-specific failure precisely.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Update pushed: 0b8852b49 (Split user and developer API docs).

What changed in this update:

  • Split user-facing API docs into docs/src/api/diffeqbase.md and docs/src/api/ordinarydiffeqcore.md.
  • Retitled the old mixed page as Developer Extension API with an explicit warning that it is not application/user API.
  • Removed OrdinaryDiffEq cache supertypes/concrete caches from public declarations/rendered docs; they remain internal implementation details.
  • Removed handle_callback_modifiers! from public/rendered docs.
  • Narrowed OrdinaryDiffEqNonlinearSolve public API to NLFunctional, NLAnderson, and NLNewton; removed internal nonlinear-solver helpers from public/docs.
  • Removed OrdinaryDiffEqDifferentiation public API declarations/docs.
  • Converted a large set of new simple @doc "..." name attachments in Core/DiffEqBase slices back to definition-site docstrings.

Local verification:

  • git diff --check: passed.
  • timeout 3600 julia +release --project=/home/crackauc/sandbox/tmp_20260708_051717_3275/.runic_env -m Runic --check .: passed.
  • timeout 3600 julia +release --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")': exited 0. The edited public API pages no longer report missing-doc warnings. Remaining warnings are pre-existing docs warnings in tableaus/TaylorSeries/misc, HTML size warnings, and private/internal docstrings not included in the manual.
  • Targeted Julia public/private classification check: passed. Confirmed cache supertypes, @cache, handle_callback_modifiers!, nonlinear solve internals, differentiation internals, and SDIRK caches are not public; NLFunctional, NLAnderson, NLNewton, and ImplicitEulerESDIRKIMEXTableau are public.

Known local test failure:

  • timeout 3600 julia +release --project=lib/OrdinaryDiffEqCore -e 'using Pkg; Pkg.test()' fails in QA all_explicit_imports_are_public because AbstractSciMLOperator is imported from SciMLOperators but is not public there:
    AbstractSciMLOperator is not public in SciMLOperators but it was imported from SciMLOperators at lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl:40:24.
  • AllocCheck and JET sections passed before that QA failure (Core Infrastructure AllocCheck Tests: 1 pass; JET Tests: 30 pass, 1 broken).
  • I started a separate investigation agent to reproduce this on the unmodified base branch and identify/report the underlying commit, per repo instructions.

Ignore until reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Rebased on current origin/master after #3833 and force-pushed with lease. New tip: 924b9238d. Re-ran git diff --check and the targeted public/private classification check after rebase; both passed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Pushed follow-up commits through 6a19c6f57.

What changed since the earlier split:

  • Restored abstract cache supertypes as developer extension API while keeping concrete cache structs private/internal.
  • Made OrdinaryDiffEqCore.@cache, perform_step!, _resolved_QT, and PredictiveControllerCache developer-public and documented them on the developer API page.
  • Kept postamble! non-public in OrdinaryDiffEqCore; it is owned by SciMLBase and is not a Core-owned developer API.
  • Restored lower-level OrdinaryDiffEqNonlinearSolve hooks used by SDIRK as developer-public (build_nlsolver, nlsolve!, nlsolvefail, markfirststage!, du_alias_or_new, initial_η, compute_step!, anderson, anderson!) and documented them separately from the user-facing NL* algorithms.
  • Restored shared OrdinaryDiffEqDifferentiation Jacobian/linear-solve utilities as developer-public (build_J_W, build_jac_config, calc_J, calc_J!, dolinsolve, islinearfunction) and documented them on the developer page.
  • Added missing API coverage for DiffEqBase.DEVerbosity, DiffEqBase.initialize!, DiffEqBase.finalize!, OrdinaryDiffEqCore.Predictor, and ssp_coefficient.
  • Removed duplicate rendered docs entries for CompositeAlgorithm and DEVerbosity.

Local verification run:

  • git diff --check: passed
  • Runic: passed
  • targeted Base.ispublic classification check: passed (@cache, perform_step!, nonlinear-solve hooks, and differentiation shared hooks public; concrete caches, handle_callback_modifiers!, postamble!, jacobian!, update_W!, ESDIRKIMEXCache private)
  • docs build: passed; filtered check found no duplicate/no-docs warnings from the edited API pages after the final cleanup
  • Pkg.test() for OrdinaryDiffEqFunctionMap: passed
  • Pkg.test() for OrdinaryDiffEqLinear: passed

Known non-branch failures/limitations:

  • OrdinaryDiffEqCore QA still fails on clean base with registered SciMLOperators v1.23.0 because AbstractSciMLOperator is not public there. A subagent reproduced that on clean origin/master and verified it passes when SciMLOperators is developed to current master, where the public declaration already exists. This needs a SciMLOperators release/tag, not an OrdinaryDiffEq PR change.
  • OrdinaryDiffEqSDIRK local Pkg.test() did not reach QA assertions; it errored during QA environment instantiate with a Pkg manifest assertion (entry.tree_hash !== nothing && entry.path !== nothing). I cleaned up the Pkg-generated test environment mutations afterward.

Ignore this PR until reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Pushed another controller-interface slice in a079f94de.

What changed:

  • Expanded OrdinaryDiffEqCore controller interface docstrings into SciMLStyle-style sections: Arguments, Keywords, Returns, Fields, Interface, and Interface Rules where applicable.
  • Removed the copied @doc (@doc ...) pattern from the controller knob accessors and gave each accessor its own docstring.
  • Added a rendered controller interface contract to docs/src/api/controllers.md describing descriptor/cache separation, resolved CommonControllerOptions, divisor semantics, accept/reject/reinit rules, and cache non-user-API status.
  • Added a generic custom-controller conformance test in test/InterfaceI/controllers.jl that solves with a third-party AbstractController, exercises setup_controller_cache, stepsize_controller!, step_accept_controller!, step_reject_controller!, get_EEst/set_EEst!, knob accessors, and reinit_controller! through the public hooks.
  • Declared the controller defaults and documented selectable algorithm-integrated controllers public where the docs already render them: qmax_first_step_default, failfactor_default, BDFController, JVODEController, ExtrapolationController, and KantorovichTypeController.

Local verification run:

  • git diff --check passed.
  • Runic check on touched Julia files passed.
  • Focused controller test passed in a temp local env with repo/Core/LowStorage developed: qmax_first_step 21/21 and generic controller interface 13/13.
  • Public declaration smoke test passed with Base.ispublic for the six newly aligned symbols.
  • docs/make.jl completed successfully after qualifying new controller-page refs. It still emits existing unrelated warnings from tableau/Taylor/misc docs and the existing not-in-manual list, but no controller-page cross-reference errors remain.

Still not claiming the whole repo-wide objective is done. Parallel audits found remaining gaps in Core algorithm/cache/nonlinear/dense/integrator hook docstrings and exported solver algorithm docstrings; those need follow-up slices.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Pushed another focused interface-doc slice in 0d324c436.

What changed:

  • Expanded OrdinaryDiffEqCore algorithm hierarchy docstrings into sectioned developer-interface docs for ODE, adaptive, composite, stochastic/RODE, implicit/Newton/Rosenbrock, exponential, Adams variable-order, DAE, partitioned, and second-order families.
  • Expanded OrdinaryDiffEqCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, get_fsalfirstlast, and alg_cache docs with explicit interface rules about cache construction, perform_step!, FSAL storage, SciMLBase cache participation, and concrete cache non-user-API status.
  • Expanded the StochasticDiffEq cache supertypes in the same shared Core file with the same developer-public cache rules.
  • Extended test/InterfaceI/public_api_package_split.jl to exercise split-package algorithms through public integrator hooks only: init, set_proposed_dt!, step!, interpolation call syntax, get_du!, solve!, successful_retcode, and final solution accuracy, without importing or inspecting concrete cache types.

Local verification:

  • git diff --check passed.
  • Runic check passed on touched files.
  • test/InterfaceI/public_api_package_split.jl passed in a temp local env with repo/split packages developed: 59/59.
  • docs/make.jl completed successfully. It still emits the same unrelated tableau/Taylor/misc warnings and size warnings seen before, but no new Core interface doc errors.

Still not claiming the full repo-wide objective is complete; remaining audit targets include nonlinear-solver hooks, dense interpolation hooks, many algorithm trait hooks, and exported solver algorithm docstrings.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Pushed d9cd84a5d to document the nonlinear solver developer interface and replace cache-field assertions in linear_nonlinear_tests.jl with public behavior checks.

Changes in this slice:

  • Expanded the Core nonlinear solver developer API docstrings at the definition points for AbstractNLSolverCache, AbstractNLSolverAlgorithm, AbstractNLSolver, W/J freshness hooks, and resize hooks.
  • Replaced direct integ.cache.nlsolver.cache.weight assertions with checks through public solver behavior: solve, init, step!, solve!, successful_retcode, sol.stats.nw, and accuracy against the matrix exponential.

Local checks run:

  • Runic.main --check lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl lib/OrdinaryDiffEqNonlinearSolve/test/linear_nonlinear_tests.jl passed.
  • Targeted include of lib/OrdinaryDiffEqNonlinearSolve/test/linear_nonlinear_tests.jl in a temp env with local OrdinaryDiffEqNonlinearSolve, OrdinaryDiffEqSDIRK, OrdinaryDiffEqBDF, and OrdinaryDiffEqRosenbrock passed on Julia 1.10.
  • Docs build with julia +release --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")' completed successfully, with existing unrelated Documenter warnings.\n\nPackage-level note:\n- Pkg.test() for lib/OrdinaryDiffEqNonlinearSolve fails before this PR-specific test logic under the package env due to dependency/precompile errors. I reproduced a base-branch failure on origin/master at 342617a63: find_algebraic_vars_eqs undefined while precompiling OrdinaryDiffEqNonlinearSolve, cascading into OrdinaryDiffEqSDIRK, OrdinaryDiffEqBDF, and OrdinaryDiffEqFIRK. I will route that as a separate base-branch investigation as soon as an agent slot frees.

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