Skip to content

Commit f3b56b5

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Add QA (Aqua/JET) groups to sublibraries (SciML/.github#77) (#614)
Adds a canonical QA test group to each sublibrary: RecursiveArrayToolsArrayPartitionAnyAll, RecursiveArrayToolsRaggedArrays, RecursiveArrayToolsShorthandConstructors. Each unit gets test/qa/{Project.toml,qa.jl} running Aqua.test_all + JET.test_package(target_defined_modules=true), a QA dispatch in test/runtests.jl gated on RECURSIVEARRAYTOOLS_TEST_GROUP == "QA" (with the Julia < 1.11 [sources] develop fallback mirroring the root QA env), Pkg wired into [extras]/[targets] with compat so Aqua deps_compat stays green, and a [QA] entry (versions = ["lts", "1"]) in test_groups.toml. Co-authored-by: Chris Rackauckas (Claude) <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bbb80ad commit f3b56b5

15 files changed

Lines changed: 160 additions & 3 deletions

File tree

lib/RecursiveArrayToolsArrayPartitionAnyAll/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
99
RecursiveArrayTools = {path = "../.."}
1010

1111
[compat]
12+
Pkg = "1"
1213
RecursiveArrayTools = "4"
14+
Test = "1"
1315
julia = "1.10"
1416

1517
[extras]
18+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1619
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1720

1821
[targets]
19-
test = ["Test"]
22+
test = ["Pkg", "Test"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
4+
RecursiveArrayToolsArrayPartitionAnyAll = "172d604e-c495-4f00-97bf-d70957099afa"
5+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[sources]
8+
RecursiveArrayToolsArrayPartitionAnyAll = {path = "../.."}
9+
10+
[compat]
11+
Aqua = "0.8"
12+
JET = "0.9, 0.10, 0.11"
13+
RecursiveArrayToolsArrayPartitionAnyAll = "1"
14+
Test = "1"
15+
julia = "1.10"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using RecursiveArrayToolsArrayPartitionAnyAll, Aqua, JET, Test
2+
3+
@testset "QA" begin
4+
@testset "Aqua" begin
5+
Aqua.test_all(RecursiveArrayToolsArrayPartitionAnyAll)
6+
end
7+
@testset "JET" begin
8+
JET.test_package(RecursiveArrayToolsArrayPartitionAnyAll; target_defined_modules = true)
9+
end
10+
end

lib/RecursiveArrayToolsArrayPartitionAnyAll/test/runtests.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
using RecursiveArrayTools, RecursiveArrayToolsArrayPartitionAnyAll, Test
2+
using Pkg
23

34
const TEST_GROUP = get(ENV, "RECURSIVEARRAYTOOLS_TEST_GROUP", "Core")
45

6+
function activate_qa_env()
7+
Pkg.activate(joinpath(@__DIR__, "qa"))
8+
# On Julia < 1.11, the [sources] section in the qa Project.toml is not
9+
# honored, so Pkg.develop the local paths explicitly.
10+
if VERSION < v"1.11.0-DEV.0"
11+
Pkg.develop(
12+
[
13+
PackageSpec(path = dirname(@__DIR__)),
14+
PackageSpec(path = normpath(joinpath(dirname(@__DIR__), "..", ".."))),
15+
]
16+
)
17+
end
18+
return Pkg.instantiate()
19+
end
20+
21+
if TEST_GROUP == "QA"
22+
activate_qa_env()
23+
include("qa/qa.jl")
24+
end
25+
526
if TEST_GROUP == "Core" || TEST_GROUP == "All"
627
@testset "Optimized any" begin
728
ap = ArrayPartition(collect(1:5), collect(6:10), collect(11:15))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[Core]
22
versions = ["lts", "1", "pre"]
3+
4+
[QA]
5+
versions = ["lts", "1"]

lib/RecursiveArrayToolsRaggedArrays/Project.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ RecursiveArrayTools = {path = "../.."}
1717
Adapt = "4"
1818
ArrayInterface = "7.17.0"
1919
LinearAlgebra = "1.10"
20+
Pkg = "1"
2021
RecursiveArrayTools = "4"
22+
SparseArrays = "1.10"
2123
StaticArraysCore = "1.4.2"
2224
SymbolicIndexingInterface = "0.3.42"
25+
Test = "1"
2326
julia = "1.10"
2427

2528
[extras]
29+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2630
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2731
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
2832
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2933

3034
[targets]
31-
test = ["SparseArrays", "SymbolicIndexingInterface", "Test"]
35+
test = ["Pkg", "SparseArrays", "SymbolicIndexingInterface", "Test"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
4+
RecursiveArrayToolsRaggedArrays = "c384ba91-639a-44ca-823a-e1d3691ab84a"
5+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[sources]
8+
RecursiveArrayToolsRaggedArrays = {path = "../.."}
9+
10+
[compat]
11+
Aqua = "0.8"
12+
JET = "0.9, 0.10, 0.11"
13+
RecursiveArrayToolsRaggedArrays = "1"
14+
Test = "1"
15+
julia = "1.10"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using RecursiveArrayToolsRaggedArrays, Aqua, JET, Test
2+
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

lib/RecursiveArrayToolsRaggedArrays/test/runtests.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,30 @@ using RecursiveArrayToolsRaggedArrays: RaggedEnd, RaggedRange
33
using SymbolicIndexingInterface
44
using SymbolicIndexingInterface: SymbolCache
55
using Test
6+
using Pkg
67

78
const TEST_GROUP = get(ENV, "RECURSIVEARRAYTOOLS_TEST_GROUP", "Core")
89

10+
function activate_qa_env()
11+
Pkg.activate(joinpath(@__DIR__, "qa"))
12+
# On Julia < 1.11, the [sources] section in the qa Project.toml is not
13+
# honored, so Pkg.develop the local paths explicitly.
14+
if VERSION < v"1.11.0-DEV.0"
15+
Pkg.develop(
16+
[
17+
PackageSpec(path = dirname(@__DIR__)),
18+
PackageSpec(path = normpath(joinpath(dirname(@__DIR__), "..", ".."))),
19+
]
20+
)
21+
end
22+
return Pkg.instantiate()
23+
end
24+
25+
if TEST_GROUP == "QA"
26+
activate_qa_env()
27+
include("qa/qa.jl")
28+
end
29+
930
if TEST_GROUP == "Core" || TEST_GROUP == "All"
1031
@testset "RecursiveArrayToolsRaggedArrays" begin
1132
# ===================================================================
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[Core]
22
versions = ["lts", "1", "pre"]
3+
4+
[QA]
5+
versions = ["lts", "1"]

0 commit comments

Comments
 (0)