From 28f346a90bf7868ccf2261ef8b5ae1d8be64b79c Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 25 Jun 2026 07:51:01 -0400 Subject: [PATCH] QA: run_qa v1.6 form + ExplicitImports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert test/qa/qa.jl from the hand-rolled Aqua.test_all + JET.test_package body to the SciMLTesting 1.6 `run_qa` form with ExplicitImports enabled. - qa.jl now calls `run_qa(FEniCS; explicit_imports = true, ei_kwargs = ...)`. Aqua and ExplicitImports come from SciMLTesting's own deps; `using JET` triggers the JET weakdep extension so the JET check still runs (clean, 0 reports under run_qa's default target_modules=(FEniCS,) config — and also under the old target_defined_modules=true config). - Fold the six ExplicitImports checks into the QA group. The standalone test/explicit_imports.jl (run in Core via core.jl) only ran two of them (no_implicit_imports, no_stale_explicit_imports); run_qa runs all six, so the Core-group include and the file are removed and ExplicitImports drops from the root [extras]/[targets].test (now supplied transitively in the QA env via SciMLTesting). - Only ExplicitImports finding: `all_qualified_accesses_are_public` flags `getdoc`, which is not public in `Base.Docs`. FEniCS extends `Base.Docs.getdoc(::fenicsobject)` (src/FEniCS.jl) to surface a wrapped PyObject's docstring; extending a Base-internal method requires naming it and there is nothing to make public, so it is ignored via ei_kwargs = (; all_qualified_accesses_are_public = (; ignore = (:getdoc,))). All other five EI checks, Aqua (test_all, 11/11) and JET pass with no kwargs. - test/qa/Project.toml: bump SciMLTesting compat to "1.6"; drop ExplicitImports (transitive via SciMLTesting); keep Aqua (test_all's ambiguities sub-check), JET, SafeTestsets (run_tests wraps each group body in @safetestset). Verified locally against released SciMLTesting 1.6.0 (resolved from the registry, no dev-from-branch) inside the CI fenics container: QA group 18/18 Pass, 0 Fail, 0 Error, 0 Broken (11 Aqua + 1 JET + 6 ExplicitImports). Control run without the getdoc ignore errors on exactly getdoc, confirming the ignore is load-bearing and the check genuinely runs. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 4 +--- test/core.jl | 4 ---- test/explicit_imports.jl | 8 -------- test/qa/Project.toml | 2 +- test/qa/qa.jl | 21 +++++++++++++-------- 5 files changed, 15 insertions(+), 24 deletions(-) delete mode 100644 test/explicit_imports.jl diff --git a/Project.toml b/Project.toml index 020f25c..f1ce318 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,6 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] ADTypes = "1" -ExplicitImports = "1" LinearAlgebra = "1" OrdinaryDiffEq = "6, 7" OrdinaryDiffEqSDIRK = "1, 2" @@ -24,7 +23,6 @@ julia = "1.10" [extras] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" @@ -32,4 +30,4 @@ SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ADTypes", "ExplicitImports", "Test", "OrdinaryDiffEq", "OrdinaryDiffEqSDIRK", "SafeTestsets", "SciMLTesting"] +test = ["ADTypes", "Test", "OrdinaryDiffEq", "OrdinaryDiffEqSDIRK", "SafeTestsets", "SciMLTesting"] diff --git a/test/core.jl b/test/core.jl index a77d777..ded2af7 100644 --- a/test/core.jl +++ b/test/core.jl @@ -3,10 +3,6 @@ using Test FEniCS.set_log_level(FEniCS.WARNING) -@testset "Explicit Imports" begin - include("explicit_imports.jl") -end - examples_dir = joinpath(@__DIR__, "..", "examples") @assert ispath(examples_dir) example_filenames = readdir(examples_dir) diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl deleted file mode 100644 index 92bcde5..0000000 --- a/test/explicit_imports.jl +++ /dev/null @@ -1,8 +0,0 @@ -using ExplicitImports -using FEniCS -using Test - -@testset "ExplicitImports" begin - @test check_no_implicit_imports(FEniCS) === nothing - @test check_no_stale_explicit_imports(FEniCS) === nothing -end diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 55d7844..f8c6d5f 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -13,6 +13,6 @@ FEniCS = {path = "../.."} Aqua = "0.8" JET = "0.9,0.10,0.11" 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 3cd50d1..12778c6 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,9 +1,14 @@ -using FEniCS, Aqua, JET, Test +using SciMLTesting, FEniCS, Test +using JET -@testset "Aqua" begin - Aqua.test_all(FEniCS) -end - -@testset "JET" begin - JET.test_package(FEniCS; target_defined_modules = true) -end +run_qa( + FEniCS; + explicit_imports = true, + ei_kwargs = (; + # `getdoc` is not public in `Base.Docs`, but FEniCS extends + # `Base.Docs.getdoc(::fenicsobject)` (src/FEniCS.jl) to surface the wrapped + # PyObject's docstring. Extending a Base-internal method legitimately + # requires naming it; nothing to make public here. + all_qualified_accesses_are_public = (; ignore = (:getdoc,)), + ), +)