Skip to content

Commit cc031bb

Browse files
Uniformize monorepo structure to OrdinaryDiffEq canonical style
Align RecursiveArrayTools.jl with the OrdinaryDiffEq.jl canonical monorepo layout: - Add [sources] to each sublibrary pointing at the umbrella root via ../.. (true leaf->root dependency direction; the 3 sublibs depend on the registered root today). No cyclic root->leaf [sources] are added because the root does not depend on its sublibs. - Remove the redundant double-dispatch of the sublibraries: the root Tests.yml no longer GROUP-dispatches RaggedArrays/ArrayPartitionAnyAll/ ShorthandConstructors, and the root test/runtests.jl no longer activates and Pkg.tests them. Sublibraries are now covered exclusively by SublibraryCI's per-project model. - Rewrite root test/runtests.jl as a _detect_sublibrary_group dispatcher mirroring OrdinaryDiffEq: a GROUP naming lib/<X> activates that sublib, develops its [sources] path deps on Julia < 1.11, sets the sub group env, and Pkg.tests it; otherwise the root runs its own @safetestset groups. - SublibraryCI.yml: thread group-env-name RECURSIVEARRAYTOOLS_TEST_GROUP and check-bounds auto. - DowngradeSublibraries.yml: add group-env-name/group-env-value Core, expand the skip list to the siblings (root + 3 sublibs) plus stdlibs; auto-discovers lib/* (sublibrary-downgrade.yml@v1 has no allow-reresolve input). - Each sublibrary test/runtests.jl now reads get(ENV, "RECURSIVEARRAYTOOLS_TEST_GROUP", "Core") and gates its tests on the Core group. - Add test/test_groups.toml to each sublibrary declaring only [Core] on [lts, 1.11, 1, pre], since none of them have QA-group tests (the default expansion would otherwise emit an unsupported QA group on [1]). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e7349a5 commit cc031bb

13 files changed

Lines changed: 1090 additions & 1024 deletions

File tree

.github/workflows/DowngradeSublibraries.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ jobs:
1919
secrets: "inherit"
2020
with:
2121
julia-version: "lts"
22-
skip: "RecursiveArrayTools, Pkg, TOML, Statistics, LinearAlgebra, SparseArrays, InteractiveUtils, Random, Test"
22+
skip: "RecursiveArrayTools,RecursiveArrayToolsArrayPartitionAnyAll,RecursiveArrayToolsRaggedArrays,RecursiveArrayToolsShorthandConstructors,Pkg,TOML,Statistics,LinearAlgebra,SparseArrays,InteractiveUtils,Random,Test"
23+
group-env-name: "RECURSIVEARRAYTOOLS_TEST_GROUP"
24+
group-env-value: "Core"
25+
# Every lib/* sublibrary is downgrade-tested (projects auto-discovered, no exclusions).

.github/workflows/SublibraryCI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ concurrency:
1919
jobs:
2020
sublibraries:
2121
uses: "SciML/.github/.github/workflows/sublibrary-project-tests.yml@v1"
22+
with:
23+
group-env-name: RECURSIVEARRAYTOOLS_TEST_GROUP
24+
check-bounds: auto
2225
secrets: "inherit"

.github/workflows/Tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828
- "pre"
2929
group:
3030
- "Core"
31-
- "RaggedArrays"
32-
- "ArrayPartitionAnyAll"
33-
- "ShorthandConstructors"
3431
- "Downstream"
3532
- "nopre"
3633
exclude:

lib/RecursiveArrayToolsArrayPartitionAnyAll/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ version = "1.0.0"
55
[deps]
66
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
77

8+
[sources]
9+
RecursiveArrayTools = {path = "../.."}
10+
811
[compat]
912
RecursiveArrayTools = "4"
1013
julia = "1.10"
Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
using RecursiveArrayTools, RecursiveArrayToolsArrayPartitionAnyAll, Test
22

3-
@testset "Optimized any" begin
4-
ap = ArrayPartition(collect(1:5), collect(6:10), collect(11:15))
5-
@test any(x -> x == 4, ap)
6-
@test any(x -> x == 15, ap)
7-
@test !any(x -> x == 17, ap)
8-
@test any(ap .> 10)
9-
@test !any(ap .> 20)
10-
end
3+
const TEST_GROUP = get(ENV, "RECURSIVEARRAYTOOLS_TEST_GROUP", "Core")
114

12-
@testset "Optimized all" begin
13-
ap = ArrayPartition(ones(5), ones(5), ones(5))
14-
@test all(x -> x == 1.0, ap)
15-
@test !all(x -> x == 2.0, ap)
16-
@test all(ap .> 0)
5+
if TEST_GROUP == "Core" || TEST_GROUP == "ALL"
6+
@testset "Optimized any" begin
7+
ap = ArrayPartition(collect(1:5), collect(6:10), collect(11:15))
8+
@test any(x -> x == 4, ap)
9+
@test any(x -> x == 15, ap)
10+
@test !any(x -> x == 17, ap)
11+
@test any(ap .> 10)
12+
@test !any(ap .> 20)
13+
end
1714

18-
ap2 = ArrayPartition(ones(5), [1.0, 1.0, 0.0, 1.0, 1.0], ones(5))
19-
@test !all(x -> x == 1.0, ap2)
20-
end
15+
@testset "Optimized all" begin
16+
ap = ArrayPartition(ones(5), ones(5), ones(5))
17+
@test all(x -> x == 1.0, ap)
18+
@test !all(x -> x == 2.0, ap)
19+
@test all(ap .> 0)
20+
21+
ap2 = ArrayPartition(ones(5), [1.0, 1.0, 0.0, 1.0, 1.0], ones(5))
22+
@test !all(x -> x == 1.0, ap2)
23+
end
2124

22-
@testset "Matches AbstractArray default results" begin
23-
ap = ArrayPartition(rand(100), rand(100), rand(100))
24-
f = x -> x > 0.5
25+
@testset "Matches AbstractArray default results" begin
26+
ap = ArrayPartition(rand(100), rand(100), rand(100))
27+
f = x -> x > 0.5
2528

26-
# Results must match
27-
@test any(f, ap) == any(f, collect(ap))
28-
@test all(f, ap) == all(f, collect(ap))
29+
# Results must match
30+
@test any(f, ap) == any(f, collect(ap))
31+
@test all(f, ap) == all(f, collect(ap))
2932

30-
# Edge case: empty
31-
ap_empty = ArrayPartition(Float64[], Float64[])
32-
@test !any(x -> true, ap_empty)
33-
@test all(x -> true, ap_empty)
33+
# Edge case: empty
34+
ap_empty = ArrayPartition(Float64[], Float64[])
35+
@test !any(x -> true, ap_empty)
36+
@test all(x -> true, ap_empty)
37+
end
3438
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Core]
2+
versions = ["lts", "1.11", "1", "pre"]

lib/RecursiveArrayToolsRaggedArrays/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1010
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
1111
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
1212

13+
[sources]
14+
RecursiveArrayTools = {path = "../.."}
15+
1316
[compat]
1417
Adapt = "4"
1518
ArrayInterface = "7.17.0"

0 commit comments

Comments
 (0)