From 1b6dab876c8c28119ec5f2475a4b6f84213a287c Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 24 Jun 2026 11:51:55 -0400 Subject: [PATCH 1/2] QA: add ExplicitImports.jl checks via SciMLTesting run_qa (v1.5 form) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire ExplicitImports.jl's six checks (no_implicit_imports, no_stale_explicit_imports, all_explicit_imports_via_owners, all_qualified_accesses_via_owners, all_qualified_accesses_are_public, all_explicit_imports_are_public) into the QA group through SciMLTesting.run_qa's `explicit_imports` option, and migrate qa.jl to the SciMLTesting 1.5 minimal form. SciMLTesting 1.5 makes Aqua and ExplicitImports its own direct deps and auto-detects JET via its weakdep extension on `using JET`, so qa.jl no longer threads those modules in: it `using`s only SciMLIterators, JET, SciMLTesting, Test, and run_qa collapses to `explicit_imports = true` plus the genuinely per-repo kwargs (`aqua_kwargs = (; piracies = false)` and the ExplicitImports per-check ignore-lists). The auto-detected boilerplate (`Aqua = Aqua`, `JET = JET`, `jet = true`, `ExplicitImports = ExplicitImports`) is dropped. ExplicitImports' two public-API checks are satisfied with a minimal, documented ignore-list of unavoidable non-public dependency names that have no public equivalent: * all_explicit_imports_are_public ignores SciMLBase's integrator/solution interface (AbstractTimeseriesSolution, DEIntegrator, done) — the entire surface this package iterates over, none of which SciMLBase exports or declares public. * all_qualified_accesses_are_public ignores Base.IteratorSize (the iterator trait this package overloads) and its documented return value Base.SizeUnknown — both non-public Base internals with no public spelling. The Aqua call moves to run_qa as well (full suite minus piracies); deps_compat now passes (the main Project.toml carries full [compat]), so its stale @test_broken is dropped and the check re-enabled. piracies remains disabled with a single @test_broken marker tracking issue #9. JET keeps running (canonical target_modules/typo via run_qa's default jet_kwargs). QA sub-environment: ExplicitImports is dropped from test/qa/Project.toml (now transitive via SciMLTesting). Aqua is kept as a direct dep because Aqua's ambiguity check spawns a clean subprocess that `using Aqua` from the active project's LOAD_PATH (Base.load_path_setup_code); a transitive-only Aqua is not loadable by name there, so dropping it breaks the Method-ambiguity check. JET stays (the QA group runs JET). SciMLTesting [compat] is bumped to 1.5 in both the root and QA Project.toml. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 2 +- test/qa/Project.toml | 2 +- test/qa/qa.jl | 38 +++++++++++++++++++++++++++----------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Project.toml b/Project.toml index 4ec399f..789ce57 100644 --- a/Project.toml +++ b/Project.toml @@ -12,7 +12,7 @@ OrdinaryDiffEq = "7" RecursiveArrayTools = "4" SafeTestsets = "0.0.1, 0.1" SciMLBase = "3" -SciMLTesting = "1" +SciMLTesting = "1.5" Test = "1" julia = "1.10" diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 6f273e2..fb119f3 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -13,6 +13,6 @@ SciMLIterators = {path = "../.."} Aqua = "0.8" JET = "0.9,0.10,0.11" SafeTestsets = "0.0.1, 0.1" -SciMLTesting = "1" +SciMLTesting = "1.5" Test = "1" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 006bc97..d803451 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,17 +1,33 @@ using SciMLIterators -using Aqua using JET +using SciMLTesting using Test -@testset "Aqua" begin - # piracies and deps_compat(extras) currently fail; run the rest and mark - # the two failing checks broken. Tracked in - # https://github.com/SciML/SciMLIterators.jl/issues/9 - Aqua.test_all(SciMLIterators; piracies = false, deps_compat = false) - @test_broken false # Aqua piracies: 2 `tuples` methods on SciMLBase types — tracked in https://github.com/SciML/SciMLIterators.jl/issues/9 - @test_broken false # Aqua deps_compat: no [compat] for Aqua/JET extras — tracked in https://github.com/SciML/SciMLIterators.jl/issues/9 -end +# Aqua: piracies currently fails (two `tuples` methods extend the +# RecursiveArrayTools function on SciMLBase-owned argument types). Tracked in +# https://github.com/SciML/SciMLIterators.jl/issues/9 +run_qa( + SciMLIterators; + aqua_kwargs = (; piracies = false), + explicit_imports = true, + # The remaining ExplicitImports violations are unavoidable non-public + # dependency names with no public equivalent: + # * SciMLBase's integrator/solution interface (`AbstractTimeseriesSolution`, + # `DEIntegrator`, `done`) is the entire surface this package iterates over, + # and none of those names are exported or declared public by SciMLBase. + # * `Base.IteratorSize` (the iterator trait this package overloads) and its + # documented return value `Base.SizeUnknown` are both non-public Base + # internals with no public spelling. + ei_kwargs = (; + all_explicit_imports_are_public = (; + ignore = (:AbstractTimeseriesSolution, :DEIntegrator, :done), + ), + all_qualified_accesses_are_public = (; + ignore = (:IteratorSize, :SizeUnknown), + ), + ), +) -@testset "JET" begin - JET.test_package(SciMLIterators; target_defined_modules = true) +@testset "Aqua piracies (known issue #9)" begin + @test_broken false # Aqua piracies: 2 `tuples` methods on SciMLBase types — tracked in https://github.com/SciML/SciMLIterators.jl/issues/9 end From 761d59858c7939238b7c4472ae38e9ab82833d9a Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 28 Jun 2026 06:07:58 -0400 Subject: [PATCH 2/2] QA: trim now-public ExplicitImports ignores Co-Authored-By: Chris Rackauckas --- test/qa/qa.jl | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/qa/qa.jl b/test/qa/qa.jl index d803451..fcde155 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -12,18 +12,17 @@ run_qa( explicit_imports = true, # The remaining ExplicitImports violations are unavoidable non-public # dependency names with no public equivalent: - # * SciMLBase's integrator/solution interface (`AbstractTimeseriesSolution`, - # `DEIntegrator`, `done`) is the entire surface this package iterates over, - # and none of those names are exported or declared public by SciMLBase. - # * `Base.IteratorSize` (the iterator trait this package overloads) and its - # documented return value `Base.SizeUnknown` are both non-public Base - # internals with no public spelling. + # * SciMLBase's solution/iteration interface (`AbstractTimeseriesSolution`, + # `done`) is part of the surface this package iterates over, and neither + # name is exported or declared public by SciMLBase. + # * `Base.SizeUnknown` is the documented return value of the iterator trait + # this package overloads, a non-public Base internal with no public spelling. ei_kwargs = (; all_explicit_imports_are_public = (; - ignore = (:AbstractTimeseriesSolution, :DEIntegrator, :done), + ignore = (:AbstractTimeseriesSolution, :done), ), all_qualified_accesses_are_public = (; - ignore = (:IteratorSize, :SizeUnknown), + ignore = (:SizeUnknown,), ), ), )