Skip to content

Uniformize monorepo structure to the OrdinaryDiffEq.jl canonical style#197

Merged
ChrisRackauckas merged 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:uniformize-monorepo-structure
Jun 8, 2026
Merged

Uniformize monorepo structure to the OrdinaryDiffEq.jl canonical style#197
ChrisRackauckas merged 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:uniformize-monorepo-structure

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Uniformizes DiffEqProblemLibrary.jl to the OrdinaryDiffEq.jl canonical monorepo style so the SciML centralized sublibrary-project CI model works here.

Canonicalization done

Root (umbrella package, re-exports each sublibrary):

  • Added [sources] listing every lib/<Name> by relative path. This is the true path graph: the sublibraries are independent registered leaves with no in-repo dependencies on each other or on the root, so the umbrella root points at the leaves (root -> lib/<Name>) and the leaves get no [sources] edges (no forced cycles).
  • Rewrote test/runtests.jl as a _detect_sublibrary_group dispatcher (mirrors OrdinaryDiffEq's root runner): when GROUP names a lib/<X> it activates that sublibrary, transitively develops its [sources] on Julia < 1.11, sets DIFFEQPROBLEMLIBRARY_TEST_GROUP, and Pkg.tests it; otherwise it runs the root's own @safetestset groups (the ExplicitImports umbrella check).
  • Added SafeTestsets + Pkg to [extras]/[targets].test (used by the dispatcher).

Sublibraries (BV/DAE/DDE/Jump/Nonlinear/ODE/SDE ProblemLibrary):

  • Rewrote each test/runtests.jl to group-dispatch on DIFFEQPROBLEMLIBRARY_TEST_GROUP: Core runs the load/example (and, for NonlinearProblemLibrary, allocation) tests; QA runs Aqua. This matches the default sublibrary-project-tests groups (Core on [lts,1.11,1,pre] + QA on [1]), so no test_groups.toml is needed.
  • Added Test to [extras]/[targets].test for the Aqua-only sublibraries (now used by the @testset dispatch).
  • Renamed lib/<Name>/LICENSELICENSE.md and added a README.md per sublibrary.

Workflows:

  • SublibraryCI.yml: group-env-name: DIFFEQPROBLEMLIBRARY_TEST_GROUP, check-bounds: auto.
  • DowngradeSublibraries.yml: added group-env-name/group-env-value: Core, expanded the skip list with the sibling sublibrary names + stdlibs. (sublibrary-downgrade.yml@v1 no longer accepts allow-reresolve.)
  • CI.yml (root track): GROUP-dispatched matrix over the root package's own test groups (Core, QA) only — sublibraries are covered by SublibraryCI's project model and are not double-tested through the root.
  • Downgrade.yml (root track): pass group: Core, skip the in-repo sublibraries (developed via [sources]); downgrade.yml@v1 no longer accepts allow-reresolve.

Hard rules honored: no test/Project.toml exists and none introduced; no @testitem/ReTestItems present or added; no [compat] floor lowered; no test/tolerance loosened, skipped, or commented out; the group-env-name DIFFEQPROBLEMLIBRARY_TEST_GROUP is threaded consistently (caller workflows == every sublib runtests).

Verified locally (isolated depot, Julia 1.11.9)

  • TOML-parsed every Project.toml; confirmed every [targets].test dep is declared in [extras]/[deps]; zero test/Project.toml; zero @testitem/ReTestItems.
  • YAML-parsed all 9 workflows (parse OK).
  • Instantiated the root with its [sources] (developed all 7 sublibs, full tree built) and loaded DiffEqProblemLibrary.
  • Ran the new @safetestset/@testset group dispatch:
    • BVProblemLibrary QA group via Pkg.test: Aqua | 10 10 — tests passed.
    • SDEProblemLibrary Core group via Pkg.test: Load Tests | 1 1 — tests passed (Aqua correctly skipped).
    • Root Core group via Pkg.test: ExplicitImports | 2 2 — tests passed.
  • Ran Runic on all changed .jl (rc=0, already conformant).

What CI must confirm

  • Full SublibraryCI matrix across [lts,1.11,1,pre] for the Core/QA groups of all 7 sublibs (only BV-QA, SDE-Core run locally; the other sublibs' suites and the pre/lts/1 cells are left to CI).
  • DowngradeSublibraries (auto-discovered lib/*) and root Downgrade resolve with the new skip lists.
  • Root CI Core/QA cells on 1/lts.

Ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

ChrisRackauckas and others added 9 commits June 7, 2026 16:05
Make DiffEqProblemLibrary.jl match the OrdinaryDiffEq.jl canonical monorepo
invariants so the matrix-discovery / sublibrary-project CI model works.

Root (umbrella package, re-exports each sublibrary):
- Add [sources] listing every lib/<Name> by relative path so the in-repo
  PR-branch sublibrary code is developed for testing (the true path graph:
  root -> leaves; the sublibraries are independent registered leaves with no
  in-repo dependencies, so they get no [sources] edges).
- Rewrite test/runtests.jl as a _detect_sublibrary_group dispatcher: when GROUP
  names a lib/<X> it activates that sublibrary, develops its [sources]
  transitively (Julia < 1.11), sets DIFFEQPROBLEMLIBRARY_TEST_GROUP and
  Pkg.test's it; otherwise it runs the root's own @safetestset groups.
- Add SafeTestsets + Pkg to [extras]/[targets].test (needed by the dispatcher).

Sublibraries:
- Rewrite each test/runtests.jl to group-dispatch on
  DIFFEQPROBLEMLIBRARY_TEST_GROUP: Core runs the load/example (and, for
  NonlinearProblemLibrary, allocation) tests; QA runs Aqua. This matches the
  default sublibrary-project-tests groups (Core on [lts,1.11,1,pre] + QA on [1]),
  so no test_groups.toml is needed.
- Add Test to [extras]/[targets].test for the Aqua-only sublibraries (now used
  by the @testset dispatch).
- Rename lib/<Name>/LICENSE -> LICENSE.md and add a README.md per sublibrary.

Workflows:
- SublibraryCI.yml: set group-env-name=DIFFEQPROBLEMLIBRARY_TEST_GROUP and
  check-bounds=auto.
- DowngradeSublibraries.yml: add group-env-name/group-env-value=Core and expand
  the skip list with the sibling sublibrary names + stdlibs. (sublibrary-downgrade.yml@v1
  no longer accepts allow-reresolve.)
- CI.yml (root track): GROUP-dispatched matrix over the root package's own test
  groups (Core, QA) only; sublibraries are covered by SublibraryCI's project
  model and are not double-tested through the root.
- Downgrade.yml (root track): pass group=Core, skip the in-repo sublibraries
  (developed via [sources]); downgrade.yml@v1 no longer accepts allow-reresolve.

No test/Project.toml exist and none are introduced; no ReTestItems/@testitem
present or added. No [compat] floors lowered.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the isempty(VERSION.prerelease) guard so the three zero-allocation
assertions execute on every Julia version, matching base/master behavior.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace all-caps "ALL" group-name default and comparisons with canonical
"All" in each sublibrary's test/runtests.jl, matching SciML/OrdinaryDiffEq.jl
casing. "Core" and "QA" were already canonical; the root test/runtests.jl
was already canonical. Casing only: 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>
Convert TagBot.yml to the canonical OrdinaryDiffEq monorepo form: add the
top-level permissions block, the workflow_dispatch lookback input (default
"3"), the named root TagBot job, and a TagBot-Subpackages matrix
(fail-fast: false) over the seven registered sublibraries, each tagged with
subdir: lib/<Name>. All seven libs are registered in General and point at
this repo with the matching subdir.

Add Downstream.yml (IntegrationTest) mirroring OrdinaryDiffEq's exact form:
develop every lib/* path into the downstream project and run its test suite,
skipping on ResolverError. Matrix targets the genuine downstream consumers
DiffEqDevTools.jl and OrdinaryDiffEq.jl (Regression_I).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move QA tests for every package that runs QA into a dedicated, isolated
test/qa Pkg environment matching the OrdinaryDiffEq.jl canonical layout,
instead of running QA inline in the package's main test env.

For each of the 7 sublibraries (BVProblemLibrary, DAEProblemLibrary,
DDEProblemLibrary, JumpProblemLibrary, NonlinearProblemLibrary,
ODEProblemLibrary, SDEProblemLibrary) and the root DiffEqProblemLibrary
umbrella package:

- Add test/qa/Project.toml: the QA tools the package actually uses
  (Aqua for every sublib; ExplicitImports for the root), the package
  itself, and Test; with [sources] giving the package (and the root's
  sublibs) by relative path and [compat] for every dep + julia.
- Add test/qa/qa.jl carrying the package's existing QA testset verbatim,
  preserving the exact Aqua.test_all options (ambiguities = false, and
  persistent_tasks = false for Jump/SDE) and the root's ExplicitImports
  check.
- Add activate_qa_env() to runtests.jl (Pkg.activate(test/qa) +
  Pkg.instantiate) and run QA in the QA/All branch via
  @safetestset include("qa/qa.jl").
- Remove the QA tools (Aqua / ExplicitImports) from each package's main
  Project.toml [extras] + [targets].test; they now live only in the qa
  env. Test/SafeTestsets/Pkg remain in main.

Existing QA behavior is preserved exactly: only the QA tests each package
already ran are moved. NonlinearProblemLibrary's allocation tests use
@allocated and run in the Core group, so AllocCheck stays in its main env;
no new QA tooling is added anywhere. The Core/QA/All group casing contract
matching the runtests dispatchers is unchanged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the allocation tests out of the Core (base) test path and into the
isolated test/qa environment, matching the canonical OrdinaryDiffEq.jl
group-folder structure where allocation/JET/Aqua tooling lives in
test/qa/Project.toml rather than the package's main [extras]/[targets].test.

- Add lib/NonlinearProblemLibrary/test/qa/allocation_tests.jl (the existing
  p1_f!/p2_f!/p23_f! zero-allocation @testset, unchanged).
- Add AllocCheck to test/qa/Project.toml ([deps] + [compat] = "0.2").
- Drop AllocCheck from the main Project.toml [extras]/[targets].test/[compat]
  so the base test env carries only Pkg/SafeTestsets/Test.
- runtests.jl runs the allocation tests before Aqua in the QA path (env
  activated), so no heavy tooling leaks into the base env or into
  reverse-dependency resolution.

The allocation tests therefore run in exactly one group (QA); the Core/All
casing contract and the DIFFEQPROBLEMLIBRARY_TEST_GROUP dispatcher are
unchanged. No tests are dropped, skipped, or loosened; no compat floor lowered.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the version matrix explicit for every lib/<Name> sublibrary, consumed
by the centralized SciML sublibrary-project-tests.yml workflow (via
compute_affected_sublibraries.jl --projects-matrix):

  [Core]
  versions = ["lts", "1", "pre"]

  [QA]
  versions = ["lts", "1"]

Previously the sublibraries had no test_groups.toml and fell back to the
script default (Core on [lts,1.11,1,pre], QA on [1]). The explicit files pin
the canonical matrix: standard groups on lts/1/pre, QA on lts/1. QA remains a
dep-adding group (test/qa/Project.toml) and is excluded from the base All run.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Run the root umbrella package's Core group on ["lts", "1", "pre"] and the QA
group on ["lts", "1"], matching the per-sublibrary test_groups.toml matrices
and the canonical SciML convention (standard groups on lts/1/pre, QA on
lts/1). QA is excluded only from the pre-release Julia.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert TagBot.yml to the canonical SciML thin caller, with a
tagbot-subpackages matrix over the 7 registered lib/<Name> sublibraries
(all confirmed present in the General registry).

Drop the hand-listed downgrade skip: inputs (stdlibs + in-repo sublibs)
in Downgrade.yml and DowngradeSublibraries.yml; the centralized workflow
now auto-populates skip with stdlibs union in-repo sublibs union the
caller package. Drop the redundant julia-version pins so the central
'lts' floor default applies.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 8, 2026 09:30
@ChrisRackauckas ChrisRackauckas merged commit db05775 into SciML:master Jun 8, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants