Skip to content

OptimizationNLopt: make imports explicit - #1398

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:qa/optimizationnlopt-explicit-imports
Oct 4, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:qa/optimizationnlopt-explicit-imports

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

OptimizationNLopt now imports the NLopt, OptimizationBase, and SciMLBase module bindings and the individual names its implementation uses. The QA suite no longer marks no_implicit_imports as broken, and the NLopt module, Algorithm, Opt, OptimizationCache, and ReturnCode bindings remain available.

Verification

The QA and Core commands below ran from lib/OptimizationNLopt, with the Julia depot and temporary directory isolated under this job directory.

  • Baseline QA, before changes:
    export TMPDIR=/home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/tmp
    export JULIA_DEPOT_PATH=/home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/scratch/julia-depot
    ulimit -n 65536
    OPTIMIZATION_TEST_GROUP=QA julia --project -e 'using Pkg; Pkg.test()'
    Output tail: Quality Assurance | 26 1 27 1m35.1s; Testing OptimizationNLopt tests passed.
  • QA after change: same commands — output tail: Quality Assurance | 27 27 1m33.5s; Testing OptimizationNLopt tests passed.
  • Core:
    export TMPDIR=/home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/tmp
    export JULIA_DEPOT_PATH=/home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/scratch/julia-depot
    ulimit -n 65536
    OPTIMIZATION_TEST_GROUP=Core julia --project -e 'using Pkg; Pkg.test()'
    Output tail: Core | 42 42 1m36.0s; Testing OptimizationNLopt tests passed.
  • From the repository root, julia --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace lib/OptimizationNLopt/src/OptimizationNLopt.jl lib/OptimizationNLopt/test/qa/qa.jl — exit 0.
  • From the repository root, typos lib/OptimizationNLopt/src/OptimizationNLopt.jl lib/OptimizationNLopt/test/qa/qa.jl — exit 0.
  • Scanned lib/, test/, and docs/ for qualified OptimizationNLopt.x references. The only code use is OptimizationNLopt.Opt in lib/OptimizationMultistartOptimization/test/core_tests.jl; Opt remains explicitly imported. The QA reexport check passes.

Not verified: CI, the full Optimization.jl monorepo suite, and downstream packages.

Please ignore this draft until reviewed by @ChrisRackauckas.

Risk assessment

  • Risk: low
  • Blast radius: imports and QA status for OptimizationNLopt. Exports and docstrings are unchanged, and the repository's one qualified use, OptimizationNLopt.Opt, still resolves to NLopt.Opt. Names that were only incidentally reachable as OptimizationNLopt.x through the old blanket using (e.g. OptimizationNLopt.solve, OptimizationNLopt.AutoForwardDiff) no longer are; nothing in lib/, test/ or docs/ uses them, but downstream code spelling them that way would break.
  • Evidence: QA changed from 26 pass / 1 broken to 27 pass; Core passes 42/42; Runic and typos exit 0.
  • Independent review: Codex gpt-6-astra rated it low risk, high confidence, verdict MERGE, after rerunning QA on base and head (26+1 broken → 27/27), Core (42/42) and a base/head binding comparison. It is the same harness as the author. Cross-harness: Claude Code (claude-opus-5-5[1m]) read the full diff and rated it low risk, high confidence, verdict MERGE.
  • Merge: auto-merge candidate once CI is green.

🤖 Generated with Codex CLI 0.160.0 (model: gpt-6-luna); transcript: /home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/log.txt

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.160.0
Agent-Model: gpt-6-luna
Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/qa-hygiene/jobs/nlopt-imports/log.txt on amdci2
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 4, 2026 14:21
@ChrisRackauckas
ChrisRackauckas merged commit 5e55bd2 into SciML:master Oct 4, 2026
53 of 56 checks passed
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