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..bc60355 100644 --- a/lib/CorleoneOED/test/qa/qa.jl +++ b/lib/CorleoneOED/test/qa/qa.jl @@ -1,8 +1,30 @@ +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 = (; + # 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, :Tunable, + :build_index_grid, :canonicalize, :get_block_structure, + :get_bounds, :get_colorizers, + :get_number_of_shooting_constraints, :get_timegrid, :getdefaultval, + :jacobian, :retrieve_symbol_cache, :setdefaultval, + :shooting_constraints, :shooting_constraints!, :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..b5de8aa 100644 --- a/lib/OptimalControlBenchmarks/test/qa/qa.jl +++ b/lib/OptimalControlBenchmarks/test/qa/qa.jl @@ -1,8 +1,17 @@ +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,)), + ), +) 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..57ffabf 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,8 +1,29 @@ +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,)), + # 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, :Splat, :Tunable, + :canonicalize, :get_colorizers, + ), + ), + ), +)