diff --git a/Project.toml b/Project.toml index 205b9a7..92d6497 100644 --- a/Project.toml +++ b/Project.toml @@ -21,9 +21,7 @@ PreallocationToolsSparseConnectivityTracerExt = "SparseConnectivityTracer" [compat] ADTypes = "1.16" Adapt = "4.3.0" -Aqua = "0.8.11" ArrayInterface = "7.19.0" -ExplicitImports = "1.14.0" ForwardDiff = "0.10.38, 1.0.1" LabelledArrays = "1.16.0" LinearAlgebra = "1.10" @@ -46,8 +44,6 @@ julia = "1.10" [extras] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -67,4 +63,4 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "ADTypes", "ExplicitImports", "ForwardDiff", "Random", "LabelledArrays", "LinearAlgebra", "OrdinaryDiffEq", "OrdinaryDiffEqSDIRK", "SciMLBase", "SciMLTesting", "Test", "RecursiveArrayTools", "SafeTestsets", "Optimization", "OptimizationOptimJL", "SparseArrays", "Symbolics", "SparseConnectivityTracer"] +test = ["ADTypes", "ForwardDiff", "Random", "LabelledArrays", "LinearAlgebra", "OrdinaryDiffEq", "OrdinaryDiffEqSDIRK", "SciMLBase", "SciMLTesting", "Test", "RecursiveArrayTools", "SafeTestsets", "Optimization", "OptimizationOptimJL", "SparseArrays", "Symbolics", "SparseConnectivityTracer"] diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl deleted file mode 100644 index 74b6e04..0000000 --- a/test/explicit_imports.jl +++ /dev/null @@ -1,8 +0,0 @@ -using ExplicitImports -using PreallocationTools -using Test - -@testset "Explicit Imports" begin - @test check_no_implicit_imports(PreallocationTools) === nothing - @test check_no_stale_explicit_imports(PreallocationTools) === nothing -end diff --git a/test/qa.jl b/test/qa.jl deleted file mode 100644 index 1988fbf..0000000 --- a/test/qa.jl +++ /dev/null @@ -1,11 +0,0 @@ -using PreallocationTools, Aqua -@testset "Aqua" begin - Aqua.find_persistent_tasks_deps(PreallocationTools) - Aqua.test_ambiguities(PreallocationTools, recursive = false) - Aqua.test_deps_compat(PreallocationTools) - Aqua.test_piracies(PreallocationTools) - Aqua.test_project_extras(PreallocationTools) - Aqua.test_stale_deps(PreallocationTools) - Aqua.test_unbound_args(PreallocationTools) - Aqua.test_undefined_exports(PreallocationTools) -end diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..1dcbb93 --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,16 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +PreallocationTools = {path = "../.."} + +[compat] +Aqua = "0.8.11" +SafeTestsets = "0.1, 1" +SciMLTesting = "1.6" +Test = "1.10" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..60ec209 --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,47 @@ +using SciMLTesting, PreallocationTools, Test + +run_qa( + PreallocationTools; + explicit_imports = true, + aqua_kwargs = (; ambiguities = (; recursive = false)), + ei_kwargs = (; + # The package extensions load (and are analyzed by ExplicitImports) whenever + # their weakdeps are present in the session, e.g. on the OS lanes where QA runs + # alongside Core. The entries below cover the extension modules' legitimate uses. + no_implicit_imports = (; + ignore = ( + :PreallocationTools, # extension parent package (used qualified) + :ForwardDiff, # weakdep ForwardDiff (used qualified) + :Adapt, # Adapt (extension dependency) + :ArrayInterface, # ArrayInterface (extension dependency) + :PrecompileTools, # PrecompileTools (extension dependency) + Symbol("@compile_workload"), # PrecompileTools macro + Symbol("@setup_workload"), # PrecompileTools macro + ), + ), + # Qualified accesses to non-public names. The package's own internals are + # extended across the package/extension boundary, and the base libraries' + # names are de-facto stable; ignore until they are declared public. + all_qualified_accesses_are_public = (; + ignore = ( + :depwarn, # Base.depwarn + :parameterless_type, # ArrayInterface.parameterless_type + :restructure, # ArrayInterface.restructure + :_restructure, # PreallocationTools internal (extended in ext) + :chunksize, # PreallocationTools internal (extended in ext) + :dualarraycreator, # PreallocationTools internal (extended in ext) + :enlargediffcache!, # PreallocationTools internal (extended in ext) + :forwarddiff_compat_chunk_size, # PreallocationTools internal (extended in ext) + :Dual, # ForwardDiff.Dual (non-public, stable) + :pickchunksize, # ForwardDiff.pickchunksize (non-public, stable) + ), + ), + # Explicit imports of non-public names from SparseConnectivityTracer. + all_explicit_imports_are_public = (; + ignore = ( + :AbstractTracer, # SparseConnectivityTracer.AbstractTracer (non-public) + :Dual, # SparseConnectivityTracer.Dual (non-public) + ), + ), + ), +) diff --git a/test/runtests.jl b/test/runtests.jl index 783c149..a2dffd2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,8 +3,6 @@ using SciMLTesting run_tests(; core = () -> begin - @safetestset "Quality Assurance" include("qa.jl") - @safetestset "Explicit Imports" include("explicit_imports.jl") @safetestset "DiffCache Dispatch" include("core_dispatch.jl") @safetestset "DiffCache ODE tests" include("core_odes.jl") @safetestset "DiffCache Resizing" include("core_resizing.jl") @@ -16,6 +14,10 @@ run_tests(; @safetestset "Zero, Copy, and Fill Dispatches" include("test_zero_copy.jl") @safetestset "Allocation Regression Tests" include("alloc_tests.jl") end, + qa = (; + env = joinpath(@__DIR__, "qa"), + body = joinpath(@__DIR__, "qa", "qa.jl") + ), groups = Dict( # GPU declares its own sub-env, so it runs ONLY for GROUP="GPU" and is # excluded from "All" (matches the original `if GROUP == "GPU"` dispatch). diff --git a/test/test_groups.toml b/test/test_groups.toml index 79352ec..c7ec044 100644 --- a/test/test_groups.toml +++ b/test/test_groups.toml @@ -1,3 +1,6 @@ [Core] versions = ["lts", "1", "pre"] os = ["ubuntu-latest", "macos-latest", "windows-latest"] + +[QA] +versions = ["lts", "1"]