From e2a2d3a96291a034eec6a150caecfcd8920dd855 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 25 Jun 2026 13:21:57 -0400 Subject: [PATCH 1/2] QA: run_qa v1.6 form + ExplicitImports (root + sublibs) Convert the root and both lib/ sublibrary QA environments from the hand-rolled `@testset "Aqua" Aqua.test_all(Mod)` to the SciMLTesting v1.6 `run_qa(Mod; explicit_imports = true, ...)` dispatcher, enabling the six ExplicitImports checks alongside the unchanged Aqua run. Bump SciMLTesting compat to "1.6" per QA env; ExplicitImports is pulled transitively. The sublib [sources]/develop wiring is preserved exactly. Per-env ExplicitImports curation: - Corleone: no_implicit_imports broken (bare-`using` deps, tracked); ignore :ADTypes for via_owners and the deliberate Base/SciML internal names for qualified-accesses-are-public. - CorleoneOED: no_implicit_imports broken (tracked); ignore Base/SciML internals plus Corleone's own unexported helpers for qualified-accesses-are-public. - OptimalControlBenchmarks: allow_unanalyzable (dynamic include in problem_registry.jl) for the implicit/stale checks; ignore :inputs (MTK re-export) and :default_rng/:initialstates. All six EI checks pass. The CorleoneOED and OptimalControlBenchmarks QA lanes are already red on master from genuine pre-existing Aqua failures; this conversion runs the same Aqua.test_all with no new disables and does not mask them. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/CorleoneOED/test/qa/Project.toml | 2 ++ lib/CorleoneOED/test/qa/qa.jl | 32 +++++++++++++++---- .../test/qa/Project.toml | 2 ++ lib/OptimalControlBenchmarks/test/qa/qa.jl | 24 ++++++++++---- test/qa/Project.toml | 2 +- test/qa/qa.jl | 32 +++++++++++++++---- 6 files changed, 75 insertions(+), 19 deletions(-) diff --git a/lib/CorleoneOED/test/qa/Project.toml b/lib/CorleoneOED/test/qa/Project.toml index ba585c7..616805d 100644 --- a/lib/CorleoneOED/test/qa/Project.toml +++ b/lib/CorleoneOED/test/qa/Project.toml @@ -2,6 +2,7 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Corleone = "2751e0db-33e9-4374-b36d-b7219e1e6b40" CorleoneOED = "6590a4b1-d036-41fe-a5b4-03a980244101" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] @@ -12,5 +13,6 @@ CorleoneOED = {path = "../.."} Aqua = "0.8" Corleone = "0.0.5" CorleoneOED = "0.0.5" +SciMLTesting = "1.6" Test = "1" julia = "1.10" diff --git a/lib/CorleoneOED/test/qa/qa.jl b/lib/CorleoneOED/test/qa/qa.jl index c9f196f..d87e716 100644 --- a/lib/CorleoneOED/test/qa/qa.jl +++ b/lib/CorleoneOED/test/qa/qa.jl @@ -1,8 +1,28 @@ +using SciMLTesting using CorleoneOED -using Aqua +using Test -@testset "Aqua" begin - Aqua.test_all( - CorleoneOED - ) -end +run_qa( + CorleoneOED; + explicit_imports = true, + # CorleoneOED pulls Corleone and its other deps in with bare `using`, so it + # leans on a large set of implicit imports. Converting every one to an + # explicit import is a sizable refactor tracked in SciML/Corleone.jl#103. + ei_broken = (:no_implicit_imports,), + ei_kwargs = (; + # Deliberate uses of internal names that are not (yet) declared public in + # their owning modules: Base/stdlib internals, SciML internals, and + # Corleone's own as-yet-unexported helpers reached through `Corleone.*`. + all_qualified_accesses_are_public = (; + ignore = ( + :AbstractDEAlgorithm, :AbstractDEProblem, :Code, :Fix1, :Fix2, + :Tunable, :build_index_grid, :canonicalize, :front, + :get_block_structure, :get_bounds, :get_colorizers, + :get_number_of_shooting_constraints, :get_timegrid, :getdefaultval, + :initialparameters, :initialstates, :jacobian, + :retrieve_symbol_cache, :setdefaultval, :shooting_constraints, + :shooting_constraints!, :variable, :variables, + ), + ), + ), +) diff --git a/lib/OptimalControlBenchmarks/test/qa/Project.toml b/lib/OptimalControlBenchmarks/test/qa/Project.toml index 6efbae1..1f38b94 100644 --- a/lib/OptimalControlBenchmarks/test/qa/Project.toml +++ b/lib/OptimalControlBenchmarks/test/qa/Project.toml @@ -2,6 +2,7 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Corleone = "2751e0db-33e9-4374-b36d-b7219e1e6b40" OptimalControlBenchmarks = "d147904a-1eb9-11f1-01e7-bdf88e0f9445" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] @@ -12,5 +13,6 @@ OptimalControlBenchmarks = {path = "../.."} Aqua = "0.8" Corleone = "0.0.5" OptimalControlBenchmarks = "0.0.3" +SciMLTesting = "1.6" Test = "1" julia = "1.10" diff --git a/lib/OptimalControlBenchmarks/test/qa/qa.jl b/lib/OptimalControlBenchmarks/test/qa/qa.jl index d09e9db..c32da15 100644 --- a/lib/OptimalControlBenchmarks/test/qa/qa.jl +++ b/lib/OptimalControlBenchmarks/test/qa/qa.jl @@ -1,8 +1,20 @@ +using SciMLTesting using OptimalControlBenchmarks -using Aqua +using Test -@testset "Aqua" begin - Aqua.test_all( - OptimalControlBenchmarks - ) -end +run_qa( + OptimalControlBenchmarks; + explicit_imports = true, + ei_kwargs = (; + # `problem_registry.jl` registers problems through a dynamic `include`, + # which ExplicitImports cannot follow, so the module is unanalyzable for + # the implicit/stale checks. + no_implicit_imports = (; allow_unanalyzable = (OptimalControlBenchmarks,)), + no_stale_explicit_imports = (; allow_unanalyzable = (OptimalControlBenchmarks,)), + # `inputs` is re-exported by ModelingToolkit from ModelingToolkitBase. + all_explicit_imports_via_owners = (; ignore = (:inputs,)), + all_explicit_imports_are_public = (; ignore = (:inputs,)), + # Deliberate uses of internal names not (yet) declared public upstream. + all_qualified_accesses_are_public = (; ignore = (:default_rng, :initialstates)), + ), +) diff --git a/test/qa/Project.toml b/test/qa/Project.toml index a2f51f2..6a5a184 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -12,6 +12,6 @@ Corleone = {path = "../.."} Aqua = "0.8" Corleone = "0.0.5" SafeTestsets = "0.1, 1" -SciMLTesting = "1" +SciMLTesting = "1.6" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 5e14cab..25d60c6 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,8 +1,28 @@ +using SciMLTesting using Corleone -using Aqua +using Test -@testset "Aqua" begin - Aqua.test_all( - Corleone - ) -end +run_qa( + Corleone; + explicit_imports = true, + # Corleone pulls all of its deps in with bare `using`, so the package leans + # on a large set of implicit imports. Converting every one to an explicit + # import is a sizable refactor tracked in SciML/Corleone.jl#103. + ei_broken = (:no_implicit_imports,), + ei_kwargs = (; + # `ADTypes` is reached through `SciMLBase.ADTypes.AbstractADType`; ADTypes + # is not a direct Corleone dependency, so the access goes via SciMLBase. + all_qualified_accesses_via_owners = (; ignore = (:ADTypes,)), + # Deliberate uses of well-known Base/stdlib/SciML internal names that are + # not (yet) declared public in their owning modules. + all_qualified_accesses_are_public = (; + ignore = ( + :ADTypes, :AbstractDEAlgorithm, :AbstractDEProblem, + :AbstractVecOrTuple, :EnsembleAlgorithm, :Fix1, :Fix2, :OneTo, + :Splat, :Tunable, :canonicalize, :default_rng, :front, + :get_colorizers, :initialparameters, :initialstates, + :parameterlength, :setup, :tail, + ), + ), + ), +) From 8afb30126fe7f5c9e6c6e2fc2941e38fbc8ab56f Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 26 Jun 2026 16:00:11 -0400 Subject: [PATCH 2/2] QA: sweep redundant public-API EI ignores after SciMLTesting 1.7 SciMLTesting 1.7 runs the two public-API ExplicitImports checks (all_qualified_accesses_are_public / all_explicit_imports_are_public) only on Julia >= 1.11, and several base libs now declare more names public (SciMLBase 3.24, Symbolics 7.28+, SymbolicUtils 4.36, ModelingToolkit 11.29, ArrayInterface 7.26, CommonSolve 0.2.9). Many per-repo public-API ignore entries are now redundant. Emptied both public-API ignore-lists in all three qa.jl files and restored, verified on Julia 1.12 against the registered releases, only the names the public checks still flag as non-public: - root (Corleone): kept 9 (ADTypes/AbstractDEAlgorithm/AbstractDEProblem/ EnsembleAlgorithm/get_colorizers from SciMLBase, AbstractVecOrTuple/Splat from Base, Tunable/canonicalize from SciMLStructures); dropped 10. - lib/CorleoneOED: kept 18 (SciMLBase/SciMLStructures/SymbolicUtils/Symbolics/ ForwardDiff internals + Corleone's own unexported helpers); dropped 6. - lib/OptimalControlBenchmarks: dropped both ignores entirely (inputs, default_rng, initialstates are now all public); kept the via-owners ignore. Other ignores (no_implicit_imports broken-marker, *_via_owners, allow_unanalyzable) left untouched. Verified Julia 1.10 (public checks skipped) and 1.12 (public checks run): ExplicitImports group green-or-broken, 0 EI hard failures, on root + both sublibs. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/CorleoneOED/test/qa/qa.jl | 20 +++++++++++--------- lib/OptimalControlBenchmarks/test/qa/qa.jl | 3 --- test/qa/qa.jl | 13 +++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/CorleoneOED/test/qa/qa.jl b/lib/CorleoneOED/test/qa/qa.jl index d87e716..bc60355 100644 --- a/lib/CorleoneOED/test/qa/qa.jl +++ b/lib/CorleoneOED/test/qa/qa.jl @@ -10,18 +10,20 @@ run_qa( # explicit import is a sizable refactor tracked in SciML/Corleone.jl#103. ei_broken = (:no_implicit_imports,), ei_kwargs = (; - # Deliberate uses of internal names that are not (yet) declared public in - # their owning modules: Base/stdlib internals, SciML internals, and - # Corleone's own as-yet-unexported helpers reached through `Corleone.*`. + # Names still not declared public in their owning modules: SciMLBase + # internals (`AbstractDEAlgorithm`, `AbstractDEProblem`, `get_colorizers`), + # SciMLStructures internals (`Tunable`, `canonicalize`), SymbolicUtils + # internal (`Code`), Symbolics internals (`getdefaultval`, `setdefaultval`, + # `variables`), ForwardDiff internal (`jacobian`), and Corleone's own + # as-yet-unexported helpers reached through `Corleone.*`. all_qualified_accesses_are_public = (; ignore = ( - :AbstractDEAlgorithm, :AbstractDEProblem, :Code, :Fix1, :Fix2, - :Tunable, :build_index_grid, :canonicalize, :front, - :get_block_structure, :get_bounds, :get_colorizers, + :AbstractDEAlgorithm, :AbstractDEProblem, :Code, :Tunable, + :build_index_grid, :canonicalize, :get_block_structure, + :get_bounds, :get_colorizers, :get_number_of_shooting_constraints, :get_timegrid, :getdefaultval, - :initialparameters, :initialstates, :jacobian, - :retrieve_symbol_cache, :setdefaultval, :shooting_constraints, - :shooting_constraints!, :variable, :variables, + :jacobian, :retrieve_symbol_cache, :setdefaultval, + :shooting_constraints, :shooting_constraints!, :variables, ), ), ), diff --git a/lib/OptimalControlBenchmarks/test/qa/qa.jl b/lib/OptimalControlBenchmarks/test/qa/qa.jl index c32da15..b5de8aa 100644 --- a/lib/OptimalControlBenchmarks/test/qa/qa.jl +++ b/lib/OptimalControlBenchmarks/test/qa/qa.jl @@ -13,8 +13,5 @@ run_qa( no_stale_explicit_imports = (; allow_unanalyzable = (OptimalControlBenchmarks,)), # `inputs` is re-exported by ModelingToolkit from ModelingToolkitBase. all_explicit_imports_via_owners = (; ignore = (:inputs,)), - all_explicit_imports_are_public = (; ignore = (:inputs,)), - # Deliberate uses of internal names not (yet) declared public upstream. - all_qualified_accesses_are_public = (; ignore = (:default_rng, :initialstates)), ), ) diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 25d60c6..57ffabf 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -13,15 +13,16 @@ run_qa( # `ADTypes` is reached through `SciMLBase.ADTypes.AbstractADType`; ADTypes # is not a direct Corleone dependency, so the access goes via SciMLBase. all_qualified_accesses_via_owners = (; ignore = (:ADTypes,)), - # Deliberate uses of well-known Base/stdlib/SciML internal names that are - # not (yet) declared public in their owning modules. + # Names still not declared public in their owning modules: Base internals + # (`AbstractVecOrTuple`, `Splat`), SciMLBase internals (`ADTypes`, + # `AbstractDEAlgorithm`, `AbstractDEProblem`, `EnsembleAlgorithm`, + # `get_colorizers`), and SciMLStructures internals (`Tunable`, + # `canonicalize`). all_qualified_accesses_are_public = (; ignore = ( :ADTypes, :AbstractDEAlgorithm, :AbstractDEProblem, - :AbstractVecOrTuple, :EnsembleAlgorithm, :Fix1, :Fix2, :OneTo, - :Splat, :Tunable, :canonicalize, :default_rng, :front, - :get_colorizers, :initialparameters, :initialstates, - :parameterlength, :setup, :tail, + :AbstractVecOrTuple, :EnsembleAlgorithm, :Splat, :Tunable, + :canonicalize, :get_colorizers, ), ), ),