Uniformize monorepo structure to OrdinaryDiffEq.jl canonical style#1220
Merged
ChrisRackauckas merged 9 commits intoJun 8, 2026
Merged
Conversation
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>
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>
… 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>
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>
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>
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>
…ase 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>
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uniformizes Optimization.jl to the canonical OrdinaryDiffEq.jl monorepo structure.
Canonicalization done
OptimizationBase test/Project.toml removed (the only forbidden main
test/Project.toml)[deps]intolib/OptimizationBase/Project.toml[extras]+[targets].test.[sources](OptimizationLBFGSB,OptimizationManopt) into the package[sources], corrected to sibling paths../OptimizationLBFGSB/../OptimizationManopt(they were../../because they previously lived undertest/).[compat]for the new test extras (Aqua, ComponentArrays, IterTools, Lux, Manifolds, ModelingToolkit, Optim, Optimisers, OptimizationLBFGSB, OptimizationManopt, SafeTestsets, Symbolics, Tracker, BenchmarkTools, ChainRulesCore, Random, Pkg, SparseArrays, Test). No[compat]floor was lowered.[deps](ADTypes, DifferentiationInterface, LinearAlgebra, SciMLBase, SparseArrays, SparseConnectivityTracer) are kept only in[targets].test, not duplicated into[extras].Group threading (
OPTIMIZATION_TEST_GROUP)lib/<X>/test/runtests.jlis now a SafeTestsets group dispatcher: it readsget(ENV, "OPTIMIZATION_TEST_GROUP", "ALL")and@safetestset-includes the package's existing functional suite (moved verbatim tocore_tests.jl) under theCore/ALLgroup, mirroring the OrdinaryDiffEq sublibruntests.jlpattern.SafeTestsetsadded to each sublib's[extras]/[compat]/[targets].test.Root
test/runtests.jl_detect_sublibrary_groupdispatcher: handles bare sublib names and<sublib>_<group>suffixes, transitivelyPkg.develops a sublib's[sources]on Julia < 1.11, setsOPTIMIZATION_TEST_GROUP, andPkg.tests the sublib; otherwise runs the root's ownCore/GPU@safetestsetgroups. Fixes the previously-undefinedactivate_downstream_envin the GPU branch.Workflows
SublibraryCI.yml: passesgroup-env-name: OPTIMIZATION_TEST_GROUPandcheck-bounds: autotosublibrary-project-tests.yml@v1.DowngradeSublibraries.yml: passesgroup-env-name/group-env-value: Core, extendsskipwith the locally-developed in-repo sibling packages (OptimizationBase + the seven other[sources]siblings) plus stdlibs and SymbolicAnalysis. Noallow-reresolve(removed in v1).CI.yml(tests.yml@v1, GROUP-dispatched to Core) andDowngrade.yml(downgrade.yml@v1, noallow-reresolve) were already canonical and contain no hardcoded sublibrary GROUP rows (sublibs are covered by the SublibraryCI project model).test_groups.toml
Core-onlytest/test_groups.tomlto every sublib so the matrix discovery declares the real group (Coreon[lts, 1.11, 1, pre], matching the julia 1.10 floor) and does not spawn a phantom defaultQA-on-[1]job — no sublib has a QA suite (theAquaextras in Ipopt/MadNLP are unused by theirruntests.jl).Root
[sources]justification (invariant B)The root
Optimizationpackage re-exports onlyOptimizationBase(its sole in-repo[deps]dependency); the solver sublibraries are not root dependencies. Root[sources]therefore listsOptimizationBaseplus the four solver sublibraries used by the root test target (OptimizationLBFGSB,OptimizationMOI,OptimizationOptimJL,OptimizationOptimisers). Listing all 27 would inject false dependencies and break the true path graph, so it is intentionally left at 5.Verified locally (isolated depot, Julia 1.11)
Project.toml+test_groups.toml: all parse; every[targets].testentry resolves via[extras]∪[deps]; no name appears in both[deps]and[extras]; zerotest/Project.tomlremain (only the canonicaltest/downstream/Project.tomlsub-environment); zero@testitem/ReTestItems anywhere.OptimizationBBOandOptimizationPolyalgorithms(the latter resolving all three in-repo siblings via[sources]).OptimizationBBOCore group through the new@safetestsetdispatcher:Core | 25 25 pass,Testing OptimizationBBO tests passed._detect_sublibrary_grouprouting (OptimizationBBO→sublib/Core,OptimizationBBO_QA→sublib/QA,Core→root-Core,GPU→root-GPU): all correct..jl(28 dispatchers + root runtests): already clean, 0 reformats.Left to CI
SublibraryCImatrix (26 of 27 sublibraries were not run locally; many need heavy/external solvers — Ipopt, MadNLP, NLopt, Python via SciPy/PyCMA, etc.).Coregroup end-to-end viaPkg.test(heavy root test env: Enzyme, Lux, SciMLSensitivity, ...) and theDowngrade/DowngradeSublibrariesresolves.