Skip to content

Commit 038ea02

Browse files
QA: run_qa v1.6 form + ExplicitImports (root + sublibs)
Convert every QA environment (root test/QA and each lib/<Sub>/test/qa) to the SciMLTesting v1.6 `run_qa` form with ExplicitImports enabled. Per env: - root RecursiveArrayTools: aqua_broken=(:ambiguities,) (tracking #326); ei_broken=(:no_implicit_imports,) (tracking #619); EI public-access ignore-list for non-public upstream names. Pkg sentinel guard preserved. - RecursiveArrayToolsArrayPartitionAnyAll: piracies treat_as_own=[ArrayPartition]; JET target_defined_modules. EI clean. - RecursiveArrayToolsShorthandConstructors: piracies treat_as_own=[VA, AP]; JET target_defined_modules. EI clean. - RecursiveArrayToolsRaggedArrays: piracies treat_as_own on the RAT-owned AbstractRagged{VectorOfArray,DiffEqArray} abstract types (fixes the pre-existing Aqua piracy false-positive); ei_broken=(:no_implicit_imports,) (#619); EI ignore-lists for the RAT-owned ragged types and non-public upstream names. Removed the stale `AllObserved` explicit import (EI no_stale fix). The JET similar_type(::Any) report is a pre-existing master finding tracked in #620 and is left as a hard check (not silenced). Add SciMLTesting (compat "1.6") to each QA env; ExplicitImports comes in transitively. [sources]/develop wiring preserved exactly. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bf98ebd commit 038ea02

9 files changed

Lines changed: 99 additions & 44 deletions

File tree

lib/RecursiveArrayToolsArrayPartitionAnyAll/test/qa/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
44
RecursiveArrayToolsArrayPartitionAnyAll = "172d604e-c495-4f00-97bf-d70957099afa"
5+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67

78
[sources]
@@ -11,5 +12,6 @@ RecursiveArrayToolsArrayPartitionAnyAll = {path = "../.."}
1112
Aqua = "0.8"
1213
JET = "0.9, 0.10, 0.11"
1314
RecursiveArrayToolsArrayPartitionAnyAll = "1"
15+
SciMLTesting = "1.6"
1416
Test = "1"
1517
julia = "1.10"
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
using RecursiveArrayToolsArrayPartitionAnyAll, Aqua, JET, Test
1+
using SciMLTesting, RecursiveArrayToolsArrayPartitionAnyAll, JET, Test
22

33
const RATAPAA = RecursiveArrayToolsArrayPartitionAnyAll
44

5-
@testset "QA" begin
6-
@testset "Aqua" begin
7-
# `any`/`all` are extended on the RecursiveArrayTools-owned `ArrayPartition`
8-
# type, so they are intentional (owned) methods, not piracy.
9-
Aqua.test_all(RATAPAA; piracies = (; treat_as_own = [RATAPAA.ArrayPartition]))
10-
end
11-
@testset "JET" begin
12-
JET.test_package(RecursiveArrayToolsArrayPartitionAnyAll; target_defined_modules = true)
13-
end
14-
end
5+
run_qa(
6+
RATAPAA;
7+
explicit_imports = true,
8+
# `any`/`all` are extended on the RecursiveArrayTools-owned `ArrayPartition`
9+
# type, so they are intentional (owned) methods, not piracy.
10+
aqua_kwargs = (; piracies = (; treat_as_own = [RATAPAA.ArrayPartition])),
11+
jet_kwargs = (; target_defined_modules = true),
12+
)

lib/RecursiveArrayToolsRaggedArrays/src/RecursiveArrayToolsRaggedArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module RecursiveArrayToolsRaggedArrays
22

33
import RecursiveArrayTools: RecursiveArrayTools, AbstractRaggedVectorOfArray,
44
AbstractRaggedDiffEqArray, VectorOfArray, DiffEqArray,
5-
AbstractVectorOfArray, AbstractDiffEqArray, AllObserved,
5+
AbstractVectorOfArray, AbstractDiffEqArray,
66
recursivefill!, recursivecopy!
77
using SymbolicIndexingInterface
88
using SymbolicIndexingInterface: ParameterTimeseriesCollection, ParameterIndexingProxy,

lib/RecursiveArrayToolsRaggedArrays/test/qa/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
44
RecursiveArrayToolsRaggedArrays = "c384ba91-639a-44ca-823a-e1d3691ab84a"
5+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67

78
[sources]
@@ -11,5 +12,6 @@ RecursiveArrayToolsRaggedArrays = {path = "../.."}
1112
Aqua = "0.8"
1213
JET = "0.9, 0.10, 0.11"
1314
RecursiveArrayToolsRaggedArrays = "1"
15+
SciMLTesting = "1.6"
1416
Test = "1"
1517
julia = "1.10"
Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,44 @@
1-
using RecursiveArrayToolsRaggedArrays, Aqua, JET, Test
1+
using SciMLTesting, RecursiveArrayToolsRaggedArrays, JET, Test
22

3-
@testset "QA" begin
4-
@testset "Aqua" begin
5-
Aqua.test_all(RecursiveArrayToolsRaggedArrays)
6-
end
7-
@testset "JET" begin
8-
JET.test_package(RecursiveArrayToolsRaggedArrays; target_defined_modules = true)
9-
end
10-
end
3+
run_qa(
4+
RecursiveArrayToolsRaggedArrays;
5+
explicit_imports = true,
6+
# The arithmetic/array methods (`*`, `+`, `Array`, `copyto!`, ...) are defined on
7+
# the RecursiveArrayTools-owned `AbstractRaggedVectorOfArray` /
8+
# `AbstractRaggedDiffEqArray` abstract types, so they are intentional (owned)
9+
# methods, not piracy.
10+
aqua_kwargs = (;
11+
piracies = (;
12+
treat_as_own = [
13+
RecursiveArrayToolsRaggedArrays.AbstractRaggedVectorOfArray,
14+
RecursiveArrayToolsRaggedArrays.AbstractRaggedDiffEqArray,
15+
],
16+
),
17+
),
18+
jet_kwargs = (; target_defined_modules = true),
19+
ei_kwargs = (;
20+
# `AbstractRaggedVectorOfArray`/`AbstractRaggedDiffEqArray` are
21+
# RecursiveArrayTools-owned abstract types this subpackage subtypes; they are
22+
# not (yet) declared public in RecursiveArrayTools.
23+
all_explicit_imports_are_public = (;
24+
ignore = (:AbstractRaggedVectorOfArray, :AbstractRaggedDiffEqArray),
25+
),
26+
# Non-public names legitimately qualified/imported from upstream packages
27+
# (Base, Base.Broadcast, StaticArraysCore, ArrayInterface, Adapt,
28+
# SymbolicIndexingInterface). Not this subpackage's to make public.
29+
all_qualified_accesses_are_public = (;
30+
ignore = (
31+
Symbol("@propagate_inbounds"), :AbstractArrayStyle, :AllVariables,
32+
:Broadcasted, :DefaultArrayStyle, :HasLength, :IteratorSize, :OneTo,
33+
:Slice, :SolvedVariables, :StaticVecOrMat, :SymbolicTypeTrait,
34+
:adapt_structure, :add_sum, :broadcastable, :check_parent_index_match,
35+
:ensure_indexable, :flatten, :front, :index_dimsum, :ismutable,
36+
:issingular, :maybeview, :mul_prod, :similar_type, :tail, :typename,
37+
:unalias, :viewindexing,
38+
),
39+
),
40+
),
41+
# Whole-module `using` exposes many names implicitly; explicit-import refactor
42+
# tracked in https://github.com/SciML/RecursiveArrayTools.jl/issues/619
43+
ei_broken = (:no_implicit_imports,),
44+
)

lib/RecursiveArrayToolsShorthandConstructors/test/qa/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
44
RecursiveArrayToolsShorthandConstructors = "39fb7555-b4ad-4efd-8abe-30331df017d3"
5+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67

78
[sources]
@@ -11,5 +12,6 @@ RecursiveArrayToolsShorthandConstructors = {path = "../.."}
1112
Aqua = "0.8"
1213
JET = "0.9, 0.10, 0.11"
1314
RecursiveArrayToolsShorthandConstructors = "1"
15+
SciMLTesting = "1.6"
1416
Test = "1"
1517
julia = "1.10"
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
using RecursiveArrayToolsShorthandConstructors, Aqua, JET, Test
1+
using SciMLTesting, RecursiveArrayToolsShorthandConstructors, JET, Test
22

33
const RATSC = RecursiveArrayToolsShorthandConstructors
44

5-
@testset "QA" begin
6-
@testset "Aqua" begin
7-
# `getindex(::Type{VA}, ...)` / `getindex(::Type{AP}, ...)` extend Base on
8-
# RecursiveArrayTools-owned types, so they are intentional (owned) methods,
9-
# not piracy.
10-
Aqua.test_all(RATSC; piracies = (; treat_as_own = [RATSC.VA, RATSC.AP]))
11-
end
12-
@testset "JET" begin
13-
JET.test_package(RecursiveArrayToolsShorthandConstructors; target_defined_modules = true)
14-
end
15-
end
5+
run_qa(
6+
RATSC;
7+
explicit_imports = true,
8+
# `getindex(::Type{VA}, ...)` / `getindex(::Type{AP}, ...)` extend Base on
9+
# RecursiveArrayTools-owned types, so they are intentional (owned) methods,
10+
# not piracy.
11+
aqua_kwargs = (; piracies = (; treat_as_own = [RATSC.VA, RATSC.AP])),
12+
jet_kwargs = (; target_defined_modules = true),
13+
)

test/QA/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
44
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
5+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67

78
[sources]
@@ -11,5 +12,6 @@ RecursiveArrayTools = {path = "../.."}
1112
Aqua = "0.8"
1213
Pkg = "1"
1314
RecursiveArrayTools = "4"
15+
SciMLTesting = "1.6"
1416
Test = "1"
1517
julia = "1.10"

test/QA/qa.jl

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using RecursiveArrayTools, Aqua, Pkg
1+
using SciMLTesting, RecursiveArrayTools, Test, Pkg
22

33
# yes this is horrible, we'll fix it when Pkg or Base provides a decent API
44
manifest = Pkg.Types.EnvCache().manifest
@@ -7,13 +7,30 @@ if haskey(manifest.deps, "NonlinearSolveBase") || haskey(manifest.deps, "DiffEqB
77
error("Don't put Downstream Packages in non Downstream CI")
88
end
99

10-
@testset "Aqua" begin
11-
Aqua.find_persistent_tasks_deps(RecursiveArrayTools)
12-
Aqua.test_ambiguities(RecursiveArrayTools; recursive = false, broken = true)
13-
Aqua.test_deps_compat(RecursiveArrayTools)
14-
Aqua.test_piracies(RecursiveArrayTools)
15-
Aqua.test_project_extras(RecursiveArrayTools)
16-
Aqua.test_stale_deps(RecursiveArrayTools)
17-
Aqua.test_unbound_args(RecursiveArrayTools)
18-
Aqua.test_undefined_exports(RecursiveArrayTools)
19-
end
10+
run_qa(
11+
RecursiveArrayTools;
12+
explicit_imports = true,
13+
# Method-table ambiguities tracked in
14+
# https://github.com/SciML/RecursiveArrayTools.jl/issues/326
15+
aqua_broken = (:ambiguities,),
16+
ei_kwargs = (;
17+
# Non-public names legitimately qualified/imported from upstream packages
18+
# (Base, Base.Broadcast, LinearAlgebra, StaticArraysCore, ArrayInterface,
19+
# Adapt, SymbolicIndexingInterface). Not RecursiveArrayTools' to make public.
20+
all_qualified_accesses_are_public = (;
21+
ignore = (
22+
Symbol("@propagate_inbounds"), :AbstractArrayStyle, :AllVariables,
23+
:ArrayStyle, :BroadcastStyle, :Broadcasted, :DefaultArrayStyle, :OneTo,
24+
:QRCompactWY, :SolvedVariables, :StaticArray, :StaticVecOrMat,
25+
:SymbolicTypeTrait, :_InitialValue, :_ipiv_rows!, :_maybe_reshape,
26+
:_swap_rows!, :_unsafe_getindex, :_unsafe_getindex!, :adapt_structure,
27+
:add_sum, :flatten, :front, :index_shape, :ismutable, :issingular,
28+
:promote_op, :restructure, :result_style, :similar_type, :tail,
29+
:unalias, :zeromatrix,
30+
),
31+
),
32+
),
33+
# Whole-module `using` exposes many names implicitly; explicit-import refactor
34+
# tracked in https://github.com/SciML/RecursiveArrayTools.jl/issues/619
35+
ei_broken = (:no_implicit_imports,),
36+
)

0 commit comments

Comments
 (0)