Skip to content

Commit 3b0cff7

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Drop Optimization QA source paths (#1264)
* Drop Optimization QA source paths Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> * QA envs: adopt SciMLTesting activate_group_env + [sources] (OrdinaryDiffEq pattern) Replace the hand-maintained per-package `Pkg.develop` lists in each sublib's `test/runtests.jl` with `SciMLTesting.activate_group_env`, and pin in-repo siblings declaratively via each QA env's `[sources]` table — matching how OrdinaryDiffEq.jl drives its monorepo QA envs. Per sublib: - test/qa/Project.toml: add the transitive in-repo runtime sibling closure to [deps], [sources], and [compat]. The package under test is developed via activate_group_env's `parent` and is deliberately NOT listed in [sources]. - test/runtests.jl: `using SciMLTesting`; activate_qa_env delegates to activate_group_env(joinpath(@__DIR__, "qa")). - Project.toml: add SciMLTesting to [extras] + [targets].test + [compat]. Why not the package-under-test in [sources]: a self-referencing `Pkg = {path=".."}` entry makes Aqua's persistent_tasks check hard-error on Julia >= 1.11 (`AssertionError: tree_hash !== nothing && path !== nothing` in Pkg destructure). Listing only siblings avoids it; every [sources] entry also needs a matching [deps]/[extras] entry on >= 1.11, hence siblings in [deps] too. Closures are runtime-only, dropping the test-only siblings the previous approach developed (Auglag->Optimisers, NLPModels->LBFGSB/MOI/OptimJL, Multistart->NLopt), which were the #1228 phantom-dep risk. Verified locally (QA group, Runic-clean): OptimizationBBO, OptimizationMOI, OptimizationMadNLP, OptimizationPolyalgorithms on Julia 1.12 (native [sources]); OptimizationBBO, OptimizationPolyalgorithms on 1.10 (develop_sources! backport). All pass with persistent_tasks succeeding. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQ6iGqAH2j1uio2tEVNX3L --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c3a6066 commit 3b0cff7

81 files changed

Lines changed: 302 additions & 263 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/OptimizationAuglag/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1010
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1111

1212
[extras]
13+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
1314
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1415
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1516
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
@@ -23,6 +24,7 @@ OptimizationBase = {path = "../OptimizationBase"}
2324
OptimizationOptimisers = {path = "../OptimizationOptimisers"}
2425

2526
[compat]
27+
SciMLTesting = "2.1"
2628
Pkg = "1"
2729
SafeTestsets = "0.1"
2830
ForwardDiff = "1.0.1"
@@ -37,4 +39,4 @@ Test = "1.10.0"
3739
julia = "1.10"
3840

3941
[targets]
40-
test = ["Test", "ForwardDiff", "MLUtils", "OptimizationOptimisers", "Random", "SafeTestsets", "Pkg"]
42+
test = ["SciMLTesting", "Test", "ForwardDiff", "MLUtils", "OptimizationOptimisers", "Random", "SafeTestsets", "Pkg"]

lib/OptimizationAuglag/test/qa/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[deps]
2+
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
23
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
34
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
45
OptimizationAuglag = "2ea93f80-9333-43a1-a68d-1f53b957a421"
56
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
67
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
78

89
[sources]
9-
OptimizationAuglag = {path = "../.."}
10+
OptimizationBase = {path = "../../../OptimizationBase"}
1011

1112
[compat]
13+
OptimizationBase = "5"
1214
Aqua = "0.8"
1315
JET = "0.9, 0.10, 0.11"
1416
julia = "1.10"

lib/OptimizationAuglag/test/runtests.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
using Pkg
22
using SafeTestsets
3+
using SciMLTesting
34

45
const TEST_GROUP = get(ENV, "OPTIMIZATION_TEST_GROUP", "All")
56

6-
# QA (Aqua + JET) runs in an isolated environment (test/qa) so its tooling deps
7-
# never enter the main test target's resolve. On Julia < 1.11 the [sources] table
8-
# is ignored, so develop the package by path to test the PR branch code.
7+
# QA (Aqua + JET) runs in an isolated environment (test/qa). activate_group_env
8+
# develops the package under test (via `parent`) plus its in-repo `[sources]` siblings
9+
# by path — native `[sources]` on Julia >= 1.11, the develop_sources! backport on 1.10.
910
function activate_qa_env()
10-
Pkg.activate(joinpath(@__DIR__, "qa"))
11-
if VERSION < v"1.11.0-DEV.0"
12-
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
13-
end
14-
return Pkg.instantiate()
11+
return activate_group_env(joinpath(@__DIR__, "qa"))
1512
end
1613

1714
if TEST_GROUP == "Core" || TEST_GROUP == "All"

lib/OptimizationBBO/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1212
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
1313

1414
[extras]
15+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
1516
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1617
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1718
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -21,6 +22,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2122
OptimizationBase = {path = "../OptimizationBase"}
2223

2324
[compat]
25+
SciMLTesting = "2.1"
2426
BlackBoxOptim = "0.6.3"
2527
LogExpFunctions = "0.3.28"
2628
OptimizationBase = "5"
@@ -33,4 +35,4 @@ Test = "1.10"
3335
julia = "1.10"
3436

3537
[targets]
36-
test = ["Random", "Test", "SafeTestsets", "Pkg"]
38+
test = ["SciMLTesting", "Random", "Test", "SafeTestsets", "Pkg"]

lib/OptimizationBBO/test/qa/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[deps]
2+
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
23
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
34
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
45
OptimizationBBO = "3e6eede4-6085-4f62-9a71-46d9bc1eb92b"
56
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
67
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
78

89
[sources]
9-
OptimizationBBO = {path = "../.."}
10+
OptimizationBase = {path = "../../../OptimizationBase"}
1011

1112
[compat]
13+
OptimizationBase = "5"
1214
Aqua = "0.8"
1315
JET = "0.9, 0.10, 0.11"
1416
julia = "1.10"

lib/OptimizationBBO/test/runtests.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
using Pkg
22
using SafeTestsets
3+
using SciMLTesting
34

45
const TEST_GROUP = get(ENV, "OPTIMIZATION_TEST_GROUP", "All")
56

6-
# QA (Aqua + JET) runs in an isolated environment (test/qa) so its tooling deps
7-
# never enter the main test target's resolve. On Julia < 1.11 the [sources] table
8-
# is ignored, so develop the package by path to test the PR branch code.
7+
# QA (Aqua + JET) runs in an isolated environment (test/qa). activate_group_env
8+
# develops the package under test (via `parent`) plus its in-repo `[sources]` siblings
9+
# by path — native `[sources]` on Julia >= 1.11, the develop_sources! backport on 1.10.
910
function activate_qa_env()
10-
Pkg.activate(joinpath(@__DIR__, "qa"))
11-
if VERSION < v"1.11.0-DEV.0"
12-
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
13-
end
14-
return Pkg.instantiate()
11+
return activate_group_env(joinpath(@__DIR__, "qa"))
1512
end
1613

1714
if TEST_GROUP == "Core" || TEST_GROUP == "All"

lib/OptimizationBase/test/qa/Project.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
66
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
77
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
88

9-
[sources]
10-
OptimizationBase = {path = "../.."}
11-
129
[compat]
1310
Aqua = "0.8"
1411
JET = "0.9, 0.10, 0.11"

lib/OptimizationCMAEvolutionStrategy/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
99
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1010

1111
[extras]
12+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
1213
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1314
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1415
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
@@ -17,6 +18,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1718
OptimizationBase = {path = "../OptimizationBase"}
1819

1920
[compat]
21+
SciMLTesting = "2.1"
2022
Pkg = "1"
2123
SafeTestsets = "0.1"
2224
Test = "1"
@@ -27,4 +29,4 @@ SciMLBase = "2.122.1, 3"
2729
Reexport = "1.2"
2830

2931
[targets]
30-
test = ["Test", "SafeTestsets", "Pkg"]
32+
test = ["SciMLTesting", "Test", "SafeTestsets", "Pkg"]

lib/OptimizationCMAEvolutionStrategy/test/qa/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[deps]
2+
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
23
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
34
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
45
OptimizationCMAEvolutionStrategy = "bd407f91-200f-4536-9381-e4ba712f53f8"
56
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
67
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
78

89
[sources]
9-
OptimizationCMAEvolutionStrategy = {path = "../.."}
10+
OptimizationBase = {path = "../../../OptimizationBase"}
1011

1112
[compat]
13+
OptimizationBase = "5"
1214
Aqua = "0.8"
1315
JET = "0.9, 0.10, 0.11"
1416
julia = "1.10"

lib/OptimizationCMAEvolutionStrategy/test/runtests.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
using Pkg
22
using SafeTestsets
3+
using SciMLTesting
34

45
const TEST_GROUP = get(ENV, "OPTIMIZATION_TEST_GROUP", "All")
56

6-
# QA (Aqua + JET) runs in an isolated environment (test/qa) so its tooling deps
7-
# never enter the main test target's resolve. On Julia < 1.11 the [sources] table
8-
# is ignored, so develop the package by path to test the PR branch code.
7+
# QA (Aqua + JET) runs in an isolated environment (test/qa). activate_group_env
8+
# develops the package under test (via `parent`) plus its in-repo `[sources]` siblings
9+
# by path — native `[sources]` on Julia >= 1.11, the develop_sources! backport on 1.10.
910
function activate_qa_env()
10-
Pkg.activate(joinpath(@__DIR__, "qa"))
11-
if VERSION < v"1.11.0-DEV.0"
12-
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
13-
end
14-
return Pkg.instantiate()
11+
return activate_group_env(joinpath(@__DIR__, "qa"))
1512
end
1613

1714
if TEST_GROUP == "Core" || TEST_GROUP == "All"

0 commit comments

Comments
 (0)