Skip to content

Commit bdaa669

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Uniformize monorepo structure to OrdinaryDiffEq.jl canonical style (SciML#1220)
* Uniformize monorepo structure to OrdinaryDiffEq.jl canonical style Align Optimization.jl with the canonical OrdinaryDiffEq.jl monorepo layout: - Delete lib/OptimizationBase/test/Project.toml; fold its [deps] into the package's [extras] + [targets].test and move its [sources] (OptimizationLBFGSB, OptimizationManopt) into the main [sources] (now ../OptimizationLBFGSB / ../OptimizationManopt). Add the corresponding [compat] entries. No test/Project.toml remains anywhere (the kept test/downstream/Project.toml is a per-group sub-environment, matching the canonical pattern for special test groups). - Thread OPTIMIZATION_TEST_GROUP consistently: every lib/<X>/test/runtests.jl is now a SafeTestsets group dispatcher that reads get(ENV, "OPTIMIZATION_TEST_GROUP", "ALL") and @safetestset-includes the package's functional suite (moved to core_tests.jl) under the Core/ALL group. SafeTestsets added to each sublib's [extras]/[compat]/[targets].test. - Rewrite root test/runtests.jl as the canonical _detect_sublibrary_group dispatcher (handles bare sublib names and <sublib>_<group> suffixes, transitively develops a sublib's [sources] on Julia < 1.11, sets OPTIMIZATION_TEST_GROUP, and Pkg.tests the sublib; otherwise runs the root's own Core/GPU @safetestset groups). Fixes the previously-undefined activate_downstream_env in the GPU branch. - SublibraryCI.yml: pass group-env-name=OPTIMIZATION_TEST_GROUP and check-bounds=auto to sublibrary-project-tests.yml@v1. - DowngradeSublibraries.yml: pass group-env-name/group-env-value=Core and extend the skip list with the locally-developed in-repo sibling packages. No allow-reresolve input (removed in v1). - Add a Core-only test/test_groups.toml to every sublib so the matrix discovery declares the real group (Core on [lts,1.11,1,pre]) and does not spawn a phantom default QA-on-[1] job (no sublib has a QA suite). Root [sources] intentionally lists only OptimizationBase (the sole in-repo [deps] dependency) plus the four solver sublibraries used by the root test target; the root package re-exports only OptimizationBase, so adding the remaining sublibraries would inject false dependencies and break the true [sources] path graph. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Use canonical Title-case "All" for sublib test-group names Match OrdinaryDiffEq.jl canonical casing: the sublibrary test/runtests.jl files defaulted to and compared against the all-caps "ALL" group name. Capitalize to Title-case "All" so the group-name strings line up with the centralized matrix convention ("Core"/"QA"/test_groups.toml keys passed verbatim, capitalized). Casing-only change; dispatch logic, env var names, and fallback chains are unchanged. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: canonicalize TagBot/Documentation workflows, bump downgrade Julia to 1.11 - TagBot.yml: add top-level permissions block, workflow_dispatch lookback input, root TagBot-Optimization job, and a TagBot-Subpackages matrix (fail-fast: false) over the 26 registered lib/<Name> sublibraries, each calling JuliaRegistries/TagBot@v1 with subdir: lib/<Name>. Matches OrdinaryDiffEq.jl's canonical TagBot structure. OptimizationQuadDIRECT is omitted since it is not registered in the General registry. - Documentation.yml: convert from the old inline build/deploy form to the central SciML/.github documentation.yml@v1 caller. Sublibraries resolve via the existing docs/Project.toml [sources] entries. - Downgrade.yml / DowngradeSublibraries.yml: set julia-version to 1.11. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add component READMEs to all sublibraries missing one Add lib/<Name>/README.md to the 26 sublibraries that lacked one, using the canonical OrdinaryDiffEq.jl sublibrary README template: the standard SciML badge block (Zulip, Global Docs, ColPrac, SciML Code Style) plus the "component package of Optimization.jl in the SciML ecosystem" wording with a one-line description of each package's role. SimpleOptimization already had a README and is left unchanged. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: add canonical .codecov.yml and rename LICENSE to LICENSE.md Match OrdinaryDiffEq.jl's canonical monorepo layout: - Add .codecov.yml with `comment: false` to disable Codecov PR comments. - Rename the root LICENSE to LICENSE.md (content preserved via git mv). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: isolate root QA into canonical test/qa sub-environment Move the root package's Quality Assurance tests (Aqua + JET) into an isolated test/qa/ Project so the QA tooling dependencies no longer enter the main test target's resolve, matching the canonical OrdinaryDiffEq lib/<Name>/test/qa/ structure. - Add test/qa/Project.toml: deps Aqua, JET, Optimization, Test; [sources] Optimization = {path = "../.."}; [compat] for each + julia 1.10. - Move test/qa.jl -> test/qa/qa.jl (Aqua + JET tests preserved verbatim; add `using Test` so the file is self-contained in the isolated env). - runtests.jl: add activate_qa_env() (Pkg.activate(test/qa) + instantiate, plus develop-by-path on Julia < 1.11 where [sources] is ignored). The QA safetestset now runs last in the Core group after activating the qa env, so the main-environment tests above are unaffected. CI dispatches only GROUP=Core, so QA continues to run exactly as before. - Remove Aqua and JET from the main Project.toml [extras], [targets].test, and [compat]; they now live solely in the qa environment. Verified on Julia 1.11 in an isolated depot: the qa env instantiates and resolves (Aqua 0.8.16, JET 0.9.20, Optimization 5.6.1 via ../.., Test 1.11.0); the Aqua testset runs green (10/10 pass). No sublibrary runs QA today (the three that list Aqua in [extras] never call it), so per the preserve-existing-behavior rule none were given a qa env. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: align sublibrary test_groups.toml version matrix to canonical base set Set every lib/*/test/test_groups.toml [Core] group to the canonical base/standard version matrix ["lts", "1", "pre"], dropping the redundant "1.11" entry so the standard test matrix matches the uniform monorepo contract (base = lts/1/pre). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: split root QA into its own dep-adding group (excluded from Core) Make the root package follow the canonical group-folder contract: - runtests.jl: QA (Aqua + JET, isolated test/qa environment) was running inside the Core/All block, which both pulled the isolated qa env into the base run and ran QA on the Core version matrix. Move it into its own `GROUP == "QA"` branch so the base/Core run stays in the main test env and QA runs only when its group is selected. - Add root test/test_groups.toml declaring Core (lts/1/pre), QA (lts/1), and GPU (1, self-hosted) with the canonical version matrix. - CI.yml: run Core on [lts, 1, pre] and QA on [lts, 1] via a group/version matrix instead of a single hardcoded Core/[1.11, lts] job. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: canonical TagBot thin caller + downgrade skip cleanup Convert TagBot.yml from the inline JuliaRegistries/TagBot form to the canonical SciML/.github tagbot.yml@v1 thin caller, with a tagbot-subpackages matrix over the 26 registered lib/* sublibraries (OptimizationQuadDIRECT excluded: not registered in General). Reduce the downgrade callers' skip lists to only the genuine non-stdlib, non-sublib extra (SymbolicAnalysis); stdlibs and in-repo sublibraries are now auto-populated by the centralized downgrade workflows. Move julia-version from 1.11 to lts (the minimum-supported floor). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 06fe912 commit bdaa669

148 files changed

Lines changed: 5373 additions & 4749 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.

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: false

.github/workflows/CI.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22+
group:
23+
- "Core"
2224
version:
23-
- "1.11"
2425
- "lts"
26+
- "1"
27+
- "pre"
28+
include:
29+
- group: "QA"
30+
version: "lts"
31+
- group: "QA"
32+
version: "1"
2533
uses: "SciML/.github/.github/workflows/tests.yml@v1"
2634
with:
2735
julia-version: "${{ matrix.version }}"
28-
group: "Core"
36+
group: "${{ matrix.group }}"
2937
coverage-directories: "src,lib/OptimizationBase/src,lib/OptimizationBBO/src,lib/OptimizationCMAEvolutionStrategy/src,lib/OptimizationEvolutionary/src,lib/OptimizationGCMAES/src,lib/OptimizationIpopt/src,lib/OptimizationMadNLP/src,lib/OptimizationManopt/src,lib/OptimizationMOI/src,lib/OptimizationMetaheuristics/src,lib/OptimizationMultistartOptimization/src,lib/OptimizationNLopt/src,lib/OptimizationNOMAD/src,lib/OptimizationOptimJL/src,lib/OptimizationOptimisers/src,lib/OptimizationPolyalgorithms/src,lib/OptimizationQuadDIRECT/src,lib/OptimizationSpeedMapping/src"
3038
secrets: "inherit"
Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
11
name: Documentation
2-
32
on:
43
push:
54
branches:
65
- master
7-
tags: "*"
6+
tags: '*'
87
pull_request:
9-
108
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v6
15-
- uses: julia-actions/setup-julia@latest
16-
with:
17-
version: "1"
18-
- name: Add the HolyLabRegistry
19-
run: julia --project -e 'using Pkg; Pkg.Registry.add(); Pkg.Registry.add(RegistrySpec(url = "https://github.com/HolyLab/HolyLabRegistry.git"))'
20-
- name: Install dependencies
21-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(vcat(PackageSpec(path = pwd()), [PackageSpec(path = joinpath("lib", dir)) for dir in readdir("lib") if (dir !== "OptimizationMultistartOptimization")])); Pkg.instantiate()'
22-
- name: Build and deploy
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
25-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
26-
run: julia --color=yes --project=docs/ --code-coverage=user docs/make.jl
27-
- uses: julia-actions/julia-processcoverage@v1
28-
with:
29-
directories: src,lib/OptimizationBBO/src,lib/OptimizationCMAEvolutionStrategy/src,lib/OptimizationEvolutionary/src,lib/OptimizationGCMAES/src,lib/OptimizationMOI/src,lib/OptimizationMetaheuristics/src,lib/OptimizationMultistartOptimization/src,lib/OptimizationNLopt/src,lib/OptimizationNOMAD/src,lib/OptimizationOptimJL/src,lib/OptimizationOptimisers/src,lib/OptimizationPolyalgorithms/src,lib/OptimizationQuadDIRECT/src,lib/OptimizationSpeedMapping/src
30-
- uses: codecov/codecov-action@v6
31-
with:
32-
file: lcov.info
9+
build-and-deploy-docs:
10+
name: "Documentation"
11+
uses: "SciML/.github/.github/workflows/documentation.yml@v1"
12+
secrets: "inherit"

.github/workflows/Downgrade.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
name: "Downgrade"
1616
uses: "SciML/.github/.github/workflows/downgrade.yml@v1"
1717
with:
18-
julia-version: "1.10"
18+
julia-version: "lts"
1919
group: "Core"
2020
# SymbolicAnalysis skipped: 0.3.x doesn't support Symbolics 7 (required by ModelingToolkit 11)
21-
skip: "Pkg,TOML,LinearAlgebra,Logging,Printf,Random,SparseArrays,Test,SymbolicAnalysis"
21+
skip: "SymbolicAnalysis"
2222
secrets: "inherit"

.github/workflows/DowngradeSublibraries.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
uses: "SciML/.github/.github/workflows/sublibrary-downgrade.yml@v1"
1919
secrets: "inherit"
2020
with:
21-
julia-version: "1.10"
22-
# SymbolicAnalysis skipped: 0.3.x doesn't support Symbolics 7 (required by ModelingToolkit 11)
23-
skip: "Pkg,TOML,LinearAlgebra,Logging,Printf,Random,SparseArrays,Test,SymbolicAnalysis"
21+
julia-version: "lts"
22+
# SymbolicAnalysis skipped: 0.3.x doesn't support Symbolics 7 (required by
23+
# ModelingToolkit 11). Stdlibs and in-repo sublibraries are auto-populated by
24+
# the centralized workflow.
25+
skip: "SymbolicAnalysis"
26+
group-env-name: "OPTIMIZATION_TEST_GROUP"
27+
group-env-value: "Core"
28+
# 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: OPTIMIZATION_TEST_GROUP
24+
check-bounds: auto
2225
secrets: "inherit"

.github/workflows/TagBot.yml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
1-
name: TagBot
1+
name: "TagBot"
22
on:
33
issue_comment:
4-
types:
5-
- created
4+
types: [created]
65
workflow_dispatch:
76
jobs:
8-
TagBot:
9-
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: JuliaRegistries/TagBot@v1
13-
with:
14-
token: ${{ secrets.GITHUB_TOKEN }}
15-
ssh: ${{ secrets.DOCUMENTER_KEY }}
7+
tagbot:
8+
uses: "SciML/.github/.github/workflows/tagbot.yml@v1"
9+
secrets: "inherit"
10+
tagbot-subpackages:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
subdir:
15+
- "lib/OptimizationAuglag"
16+
- "lib/OptimizationBBO"
17+
- "lib/OptimizationBase"
18+
- "lib/OptimizationCMAEvolutionStrategy"
19+
- "lib/OptimizationEvolutionary"
20+
- "lib/OptimizationGCMAES"
21+
- "lib/OptimizationIpopt"
22+
- "lib/OptimizationLBFGSB"
23+
- "lib/OptimizationMOI"
24+
- "lib/OptimizationMadNLP"
25+
- "lib/OptimizationManopt"
26+
- "lib/OptimizationMetaheuristics"
27+
- "lib/OptimizationMultistartOptimization"
28+
- "lib/OptimizationNLPModels"
29+
- "lib/OptimizationNLopt"
30+
- "lib/OptimizationNOMAD"
31+
- "lib/OptimizationODE"
32+
- "lib/OptimizationOptimJL"
33+
- "lib/OptimizationOptimisers"
34+
- "lib/OptimizationPRIMA"
35+
- "lib/OptimizationPolyalgorithms"
36+
- "lib/OptimizationPyCMA"
37+
- "lib/OptimizationSciPy"
38+
- "lib/OptimizationSophia"
39+
- "lib/OptimizationSpeedMapping"
40+
- "lib/SimpleOptimization"
41+
uses: "SciML/.github/.github/workflows/tagbot.yml@v1"
42+
with:
43+
subdir: "${{ matrix.subdir }}"
44+
secrets: "inherit"
File renamed without changes.

Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ path = "lib/OptimizationOptimisers"
3434

3535
[compat]
3636
ADTypes = "1.18"
37-
Aqua = "0.8"
3837
ArrayInterface = "7.10"
3938
BenchmarkTools = "1"
4039
Boltz = "1"
@@ -48,7 +47,6 @@ Flux = "0.13, 0.14, 0.15, 0.16"
4847
ForwardDiff = "0.10, 1"
4948
Ipopt = "1"
5049
IterTools = "1.3"
51-
JET = "0.9, 0.10, 0.11"
5250
LinearAlgebra = "1.10"
5351
LinearSolve = "3.64.0"
5452
Logging = "1.10"
@@ -83,7 +81,6 @@ Zygote = "0.6, 0.7"
8381
julia = "1.10"
8482

8583
[extras]
86-
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
8784
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
8885
Boltz = "4544d5e4-abc5-4dea-817f-29e4c205d9c8"
8986
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
@@ -94,7 +91,6 @@ Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
9491
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
9592
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
9693
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
97-
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
9894
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
9995
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
10096
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
@@ -120,4 +116,4 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
120116
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
121117

122118
[targets]
123-
test = ["Aqua", "BenchmarkTools", "Boltz", "ComponentArrays", "DiffEqFlux", "Enzyme", "FiniteDiff", "Flux", "ForwardDiff", "Ipopt", "IterTools", "JET", "LinearSolve", "Lux", "MLUtils", "ModelingToolkit", "Optim", "OptimizationLBFGSB", "OptimizationMOI", "OptimizationOptimJL", "OptimizationOptimisers", "OrdinaryDiffEqTsit5", "Pkg", "Random", "ReverseDiff", "SafeTestsets", "SciMLSensitivity", "SparseArrays", "Symbolics", "Test", "Tracker", "Zygote", "Mooncake", "SciMLLogging"]
119+
test = ["BenchmarkTools", "Boltz", "ComponentArrays", "DiffEqFlux", "Enzyme", "FiniteDiff", "Flux", "ForwardDiff", "Ipopt", "IterTools", "LinearSolve", "Lux", "MLUtils", "ModelingToolkit", "Optim", "OptimizationLBFGSB", "OptimizationMOI", "OptimizationOptimJL", "OptimizationOptimisers", "OrdinaryDiffEqTsit5", "Pkg", "Random", "ReverseDiff", "SafeTestsets", "SciMLSensitivity", "SparseArrays", "Symbolics", "Test", "Tracker", "Zygote", "Mooncake", "SciMLLogging"]

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+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1314
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1415
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
1516
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
@@ -21,6 +22,7 @@ OptimizationBase = {path = "../OptimizationBase"}
2122
OptimizationOptimisers = {path = "../OptimizationOptimisers"}
2223

2324
[compat]
25+
SafeTestsets = "0.1"
2426
ForwardDiff = "1.0.1"
2527
LinearAlgebra = "1.10"
2628
MLUtils = "0.4.8"
@@ -32,4 +34,4 @@ Test = "1.10.0"
3234
julia = "1.10"
3335

3436
[targets]
35-
test = ["Test", "ForwardDiff", "MLUtils", "OptimizationOptimisers", "Random"]
37+
test = ["Test", "ForwardDiff", "MLUtils", "OptimizationOptimisers", "Random", "SafeTestsets"]

0 commit comments

Comments
 (0)