Skip to content

docs: narrow public reexports and QA - #123

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/audit-public-docs
Aug 17, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/audit-public-docs

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

What changed

ParallelParticleSwarms previously reexported the entire SciMLBase surface inherited from its historical @reexport using SciMLBase. The documented package-facing workflow uses only OptimizationProblem and solve, so this PR removes the blanket reexports and keeps those two explicit, documented generic entry points.

The QA allowlist now covers only those two reexports. The interface test exercises OptimizationProblem and solve through using ParallelParticleSwarms without importing SciMLBase. The docs add a package-facing SciML interface section and link the owner documentation for the problem contract.

Please ignore this draft until reviewed by @ChrisRackauckas.

Verification

  • PPS_TEST_GROUP=QA julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'
    • QA | 26 | 26 | 1m57.1s
  • julia --startup-file=no --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); include("docs/make.jl")' initially exposed the invalid clone remote; after configuring the local origin, the exact docs build command julia --startup-file=no --project=docs docs/make.jl completed with exit code 0.
  • julia --startup-file=no -m Runic --check src/ParallelParticleSwarms.jl test/interface.jl test/qa/qa.jl docs/make.jl: exit 0
  • typos --force-exclude docs/src/index.md docs/make.jl src/ParallelParticleSwarms.jl test/interface.jl test/qa/qa.jl: exit 0
  • git diff --check: exit 0
  • Direct package load and reexport assertion: passed; exported generic reexports are exactly [:OptimizationProblem, :solve].

No hosted CI was used as verification.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 17, 2026 07:34
@ChrisRackauckas
ChrisRackauckas merged commit b27522a into SciML:main Aug 17, 2026
10 checks passed
ChrisRackauckas added a commit that referenced this pull request Aug 23, 2026
…arms` (#127)

`66e277f` (#116) dropped `@reexport using SciMLBase` and then restored the whole
185-name surface as explicit exports; `b27522a` (#123) narrowed that to three
names -- `OptimizationProblem`, `solve` and `SimpleLBFGS`. Dropping the bulk of
SciMLBase was right, but the narrowing went one step too far: it also removed the
rest of the interface a ParallelParticleSwarms user actually calls.

`init`, `solve!` and `reinit!` are implemented by this package
(`SciMLBase.init`/`solve!`/`reinit!` methods in src/init.jl, src/solve.jl and
src/hybrid.jl) and are the documented way to reuse a swarm across runs, yet none
of them were reachable from `using ParallelParticleSwarms`. Neither was
`OptimizationFunction`, which is required to build a problem from an immutable
`SVector` objective (`OptimizationFunction{false}`) -- the form every example in
this repo uses. The package's own tests hide this by adding `using SciMLBase`.

Restore the optimization interface as an explicit list, in the shape of
SciML/Sundials.jl#553:

  - problems and functions: `OptimizationProblem`, `OptimizationFunction`,
    `NullParameters`
  - solutions: `OptimizationSolution`, `OptimizationStats`
  - solving: `solve`, `init`, `solve!`, `reinit!`, `remake`
  - return status: `ReturnCode`, `successful_retcode`

The ODE/SDE/DAE/nonlinear problem classes, the integrator interface and the
SciMLOperators surface stay out: this package does not solve those problems.

The reexported surface is now documented in docs/src/index.md, naming SciMLBase
as the owner of each name and stating the boundary explicitly, and the
`REEXPORTS` tuple in test/qa/qa.jl is kept in sync with the `export` block.

Restoring previously exported names is additive, so this is not breaking.



Claude-Session: https://claude.ai/code/session_01Rmh6B9eoW3N8oCbuuVPVxJ

Co-authored-by: Claude <[email protected]>
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