diff --git a/test/Project.toml b/test/Project.toml index 1880de7..89351a1 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -32,5 +32,5 @@ FiniteDifferences = "0.12.34" ForwardDiff = "1.4.0" Plots = "1.41.6" SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "1" -StaticArrays = "1.9.18" +SciMLTesting = "1.1" +StaticArrays = "1.9.8" diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 390c352..84e1333 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,11 +1,8 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" DifferenceEquations = "e0ca9c66-1f9e-11ec-127a-1304ce62169c" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -14,10 +11,7 @@ DifferenceEquations = {path = "../.."} [compat] Aqua = "0.8" -Distributions = "0.25.126" -ExplicitImports = "1" JET = "0.9, 0.10, 0.11" -SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "1" +SciMLTesting = "1.6" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index ebad1f5..a99e1b9 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,27 +1,72 @@ -using DifferenceEquations -using Aqua -using ExplicitImports +using SciMLTesting, DifferenceEquations, Test using JET using LinearAlgebra -using Distributions -using Test -@testset "Aqua" begin - Aqua.find_persistent_tasks_deps(DifferenceEquations) - Aqua.test_ambiguities(DifferenceEquations, recursive = false) - Aqua.test_deps_compat(DifferenceEquations) - Aqua.test_piracies(DifferenceEquations) - Aqua.test_project_extras(DifferenceEquations) - Aqua.test_stale_deps(DifferenceEquations) - Aqua.test_unbound_args(DifferenceEquations) - Aqua.test_undefined_exports(DifferenceEquations) -end - -@testset "ExplicitImports" begin - @test check_no_implicit_imports(DifferenceEquations) === nothing - @test check_no_stale_explicit_imports(DifferenceEquations) === nothing -end +run_qa( + DifferenceEquations; + JET = nothing, # JET is run below as bespoke report_call cases (issue #187), not package-wide + explicit_imports = true, + ei_kwargs = (; + # Names re-exported by a dependency rather than imported from their owner. + all_explicit_imports_via_owners = (; + ignore = ( + :KeywordArgSilent, # SciMLBase (imported from DiffEqBase) + :get_concrete_p, # SciMLBase (imported from DiffEqBase) + :get_concrete_u0, # SciMLBase (imported from DiffEqBase) + :isconcreteu0, # SciMLBase (imported from DiffEqBase) + :promote_u0, # SciMLBase (imported from DiffEqBase) + :ismutable, # Base (imported from StaticArrays) + ), + ), + all_qualified_accesses_via_owners = (; + ignore = ( + :__solve, # SciMLBase (accessed via DiffEqBase) + ), + ), + # Non-public names of dependency packages (go public as those base libs release). + all_qualified_accesses_are_public = (; + ignore = ( + :var"@propagate_inbounds", # Base + :Default, # SciMLBase.ReturnCode + :Success, # SciMLBase.ReturnCode + :T, # SciMLBase.ReturnCode + :__solve, # DiffEqBase + :build_solution, # SciMLBase + :check_prob_alg_pairing, # DiffEqBase + :get_concrete_problem, # DiffEqBase + :getindepsym, # SciMLBase + :getindepsym_defaultt, # SciMLBase + :init, # CommonSolve + :solve, # CommonSolve + :solve!, # CommonSolve + ), + ), + all_explicit_imports_are_public = (; + ignore = ( + :var"@add_kwonly", # SciMLBase + :AbstractDEAlgorithm, # SciMLBase + :AbstractDEProblem, # SciMLBase + :AbstractRODESolution, # SciMLBase + :ConstantInterpolation, # SciMLBase + :KeywordArgSilent, # DiffEqBase + :NullParameters, # SciMLBase + :build_solution, # SciMLBase + :get_concrete_p, # DiffEqBase + :get_concrete_u0, # DiffEqBase + :init, # CommonSolve + :isconcreteu0, # DiffEqBase + :ismutable, # StaticArrays + :promote_tspan, # SciMLBase + :promote_u0, # DiffEqBase + :solve, # CommonSolve + :solve!, # CommonSolve + ), + ), + ), +) +# JET cases tied to issue #187 are bespoke `report_call`s on specific solve paths: +# `report_package` (the run_qa JET path) does not surface them, so they stay here. @testset "JET static analysis" begin @testset "LinearStateSpaceProblem DirectIteration" begin A = [0.9 0.1; 0.0 0.95]