From 840dd08911ba1d229040c4389cc7f058f4310357 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 7 Jun 2026 16:05:49 -0400 Subject: [PATCH 1/9] Uniformize monorepo structure to the OrdinaryDiffEq.jl canonical style 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/ 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/ 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//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 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/CI.yml | 11 +++ .github/workflows/Downgrade.yml | 8 +- .github/workflows/DowngradeSublibraries.yml | 5 +- .github/workflows/SublibraryCI.yml | 3 + Project.toml | 15 +++- lib/BVProblemLibrary/{LICENSE => LICENSE.md} | 0 lib/BVProblemLibrary/Project.toml | 4 +- lib/BVProblemLibrary/README.md | 10 +++ lib/BVProblemLibrary/test/runtests.jl | 24 ++++-- lib/DAEProblemLibrary/{LICENSE => LICENSE.md} | 0 lib/DAEProblemLibrary/Project.toml | 4 +- lib/DAEProblemLibrary/README.md | 10 +++ lib/DAEProblemLibrary/test/runtests.jl | 24 ++++-- lib/DDEProblemLibrary/{LICENSE => LICENSE.md} | 0 lib/DDEProblemLibrary/Project.toml | 4 +- lib/DDEProblemLibrary/README.md | 10 +++ lib/DDEProblemLibrary/test/runtests.jl | 24 ++++-- .../{LICENSE => LICENSE.md} | 0 lib/JumpProblemLibrary/Project.toml | 4 +- lib/JumpProblemLibrary/README.md | 10 +++ lib/JumpProblemLibrary/test/runtests.jl | 24 ++++-- .../{LICENSE => LICENSE.md} | 0 lib/NonlinearProblemLibrary/README.md | 10 +++ lib/NonlinearProblemLibrary/test/runtests.jl | 81 +++++++++++-------- lib/ODEProblemLibrary/{LICENSE => LICENSE.md} | 0 lib/ODEProblemLibrary/Project.toml | 4 +- lib/ODEProblemLibrary/README.md | 10 +++ lib/ODEProblemLibrary/test/runtests.jl | 24 ++++-- lib/SDEProblemLibrary/{LICENSE => LICENSE.md} | 0 lib/SDEProblemLibrary/Project.toml | 4 +- lib/SDEProblemLibrary/README.md | 10 +++ lib/SDEProblemLibrary/test/runtests.jl | 24 ++++-- test/runtests.jl | 81 ++++++++++++++++--- 33 files changed, 353 insertions(+), 89 deletions(-) rename lib/BVProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/BVProblemLibrary/README.md rename lib/DAEProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/DAEProblemLibrary/README.md rename lib/DDEProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/DDEProblemLibrary/README.md rename lib/JumpProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/JumpProblemLibrary/README.md rename lib/NonlinearProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/NonlinearProblemLibrary/README.md rename lib/ODEProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/ODEProblemLibrary/README.md rename lib/SDEProblemLibrary/{LICENSE => LICENSE.md} (100%) create mode 100644 lib/SDEProblemLibrary/README.md diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d6112a8..f97d3fa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,10 +18,21 @@ jobs: strategy: fail-fast: false matrix: + # Only the root umbrella package's own test groups are listed here. + # The lib/* sublibraries are covered by SublibraryCI.yml (project model); + # they are intentionally not re-tested through the root matrix. + group: + - Core + - QA version: - "1" - "lts" + exclude: + # QA (Aqua-style explicit-imports check) only needs one Julia version. + - group: QA + version: "lts" uses: "SciML/.github/.github/workflows/tests.yml@v1" with: julia-version: "${{ matrix.version }}" + group: "${{ matrix.group }}" secrets: "inherit" diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 743ef8f..ab3098e 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -10,6 +10,9 @@ on: - master paths-ignore: - 'docs/**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: downgrade: name: "Downgrade" @@ -19,5 +22,8 @@ jobs: uses: "SciML/.github/.github/workflows/downgrade.yml@v1" with: julia-version: "${{ matrix.julia-version }}" - skip: "Pkg,TOML" + group: "Core" + # Skip the in-repo sublibraries (developed via the root's [sources]) so + # downgrade-compat does not try to pin them to old registered versions. + skip: "Pkg,TOML,BVProblemLibrary,DAEProblemLibrary,DDEProblemLibrary,JumpProblemLibrary,NonlinearProblemLibrary,ODEProblemLibrary,SDEProblemLibrary" secrets: "inherit" diff --git a/.github/workflows/DowngradeSublibraries.yml b/.github/workflows/DowngradeSublibraries.yml index 590a0e2..9452749 100644 --- a/.github/workflows/DowngradeSublibraries.yml +++ b/.github/workflows/DowngradeSublibraries.yml @@ -19,4 +19,7 @@ jobs: secrets: "inherit" with: julia-version: "lts" - skip: "Pkg,TOML,Statistics,LinearAlgebra,SparseArrays,InteractiveUtils,Random,Test,Markdown" + skip: "Pkg,TOML,Statistics,LinearAlgebra,SparseArrays,InteractiveUtils,Random,Test,Markdown,BVProblemLibrary,DAEProblemLibrary,DDEProblemLibrary,JumpProblemLibrary,NonlinearProblemLibrary,ODEProblemLibrary,SDEProblemLibrary" + group-env-name: "DIFFEQPROBLEMLIBRARY_TEST_GROUP" + group-env-value: "Core" + # Every lib/* sublibrary is downgrade-tested (projects auto-discovered, no exclusions). diff --git a/.github/workflows/SublibraryCI.yml b/.github/workflows/SublibraryCI.yml index 6cec66b..6e62171 100644 --- a/.github/workflows/SublibraryCI.yml +++ b/.github/workflows/SublibraryCI.yml @@ -19,4 +19,7 @@ concurrency: jobs: sublibraries: uses: "SciML/.github/.github/workflows/sublibrary-project-tests.yml@v1" + with: + group-env-name: DIFFEQPROBLEMLIBRARY_TEST_GROUP + check-bounds: auto secrets: "inherit" diff --git a/Project.toml b/Project.toml index 57756a0..6f53248 100644 --- a/Project.toml +++ b/Project.toml @@ -12,6 +12,15 @@ NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141" ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5" SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e" +[sources] +BVProblemLibrary = {path = "lib/BVProblemLibrary"} +DAEProblemLibrary = {path = "lib/DAEProblemLibrary"} +DDEProblemLibrary = {path = "lib/DDEProblemLibrary"} +JumpProblemLibrary = {path = "lib/JumpProblemLibrary"} +NonlinearProblemLibrary = {path = "lib/NonlinearProblemLibrary"} +ODEProblemLibrary = {path = "lib/ODEProblemLibrary"} +SDEProblemLibrary = {path = "lib/SDEProblemLibrary"} + [compat] BVProblemLibrary = "0.1" DAEProblemLibrary = "0.1" @@ -19,12 +28,16 @@ DDEProblemLibrary = "0.1" JumpProblemLibrary = "1, 2.0" NonlinearProblemLibrary = "0.1" ODEProblemLibrary = "1" +SafeTestsets = "0.1" SDEProblemLibrary = "1" +Test = "1.10" julia = "1.10" [extras] ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ExplicitImports", "Test"] +test = ["ExplicitImports", "Pkg", "SafeTestsets", "Test"] diff --git a/lib/BVProblemLibrary/LICENSE b/lib/BVProblemLibrary/LICENSE.md similarity index 100% rename from lib/BVProblemLibrary/LICENSE rename to lib/BVProblemLibrary/LICENSE.md diff --git a/lib/BVProblemLibrary/Project.toml b/lib/BVProblemLibrary/Project.toml index b685b91..c8f47f6 100644 --- a/lib/BVProblemLibrary/Project.toml +++ b/lib/BVProblemLibrary/Project.toml @@ -12,10 +12,12 @@ Aqua = "0.8" DiffEqBase = "6, 7" Markdown = "1.10" SpecialFunctions = "2.3" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/BVProblemLibrary/README.md b/lib/BVProblemLibrary/README.md new file mode 100644 index 0000000..cbe383b --- /dev/null +++ b/lib/BVProblemLibrary/README.md @@ -0,0 +1,10 @@ +# BVProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +BVProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade boundary value problems (BVProblems) for testing and benchmarking boundary value differential equation solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/BVProblemLibrary/test/runtests.jl b/lib/BVProblemLibrary/test/runtests.jl index fabf5d5..883ed39 100644 --- a/lib/BVProblemLibrary/test/runtests.jl +++ b/lib/BVProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The test is simply that all of the examples build! using BVProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(BVProblemLibrary; ambiguities = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test BVProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(BVProblemLibrary; ambiguities = false) + end +end diff --git a/lib/DAEProblemLibrary/LICENSE b/lib/DAEProblemLibrary/LICENSE.md similarity index 100% rename from lib/DAEProblemLibrary/LICENSE rename to lib/DAEProblemLibrary/LICENSE.md diff --git a/lib/DAEProblemLibrary/Project.toml b/lib/DAEProblemLibrary/Project.toml index 1fc77af..a28bbca 100644 --- a/lib/DAEProblemLibrary/Project.toml +++ b/lib/DAEProblemLibrary/Project.toml @@ -10,10 +10,12 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" Aqua = "0.8" DiffEqBase = "6, 7" Markdown = "1.10" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/DAEProblemLibrary/README.md b/lib/DAEProblemLibrary/README.md new file mode 100644 index 0000000..77a9b50 --- /dev/null +++ b/lib/DAEProblemLibrary/README.md @@ -0,0 +1,10 @@ +# DAEProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +DAEProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade differential-algebraic equation problems (DAEProblems) for testing and benchmarking DAE solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/DAEProblemLibrary/test/runtests.jl b/lib/DAEProblemLibrary/test/runtests.jl index bc4d71f..efc7fbe 100644 --- a/lib/DAEProblemLibrary/test/runtests.jl +++ b/lib/DAEProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The test is simply that all of the examples build! using DAEProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(DAEProblemLibrary; ambiguities = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test DAEProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(DAEProblemLibrary; ambiguities = false) + end +end diff --git a/lib/DDEProblemLibrary/LICENSE b/lib/DDEProblemLibrary/LICENSE.md similarity index 100% rename from lib/DDEProblemLibrary/LICENSE rename to lib/DDEProblemLibrary/LICENSE.md diff --git a/lib/DDEProblemLibrary/Project.toml b/lib/DDEProblemLibrary/Project.toml index 1a3cfcc..eefdbf2 100644 --- a/lib/DDEProblemLibrary/Project.toml +++ b/lib/DDEProblemLibrary/Project.toml @@ -8,10 +8,12 @@ DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" [compat] Aqua = "0.8" DiffEqBase = "6, 7" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/DDEProblemLibrary/README.md b/lib/DDEProblemLibrary/README.md new file mode 100644 index 0000000..dd2d821 --- /dev/null +++ b/lib/DDEProblemLibrary/README.md @@ -0,0 +1,10 @@ +# DDEProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +DDEProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade delay differential equation problems (DDEProblems) for testing and benchmarking delay differential equation solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/DDEProblemLibrary/test/runtests.jl b/lib/DDEProblemLibrary/test/runtests.jl index 6b2280d..da4ebd8 100644 --- a/lib/DDEProblemLibrary/test/runtests.jl +++ b/lib/DDEProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The main test is simply that all of the examples build! using DDEProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(DDEProblemLibrary; ambiguities = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test DDEProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(DDEProblemLibrary; ambiguities = false) + end +end diff --git a/lib/JumpProblemLibrary/LICENSE b/lib/JumpProblemLibrary/LICENSE.md similarity index 100% rename from lib/JumpProblemLibrary/LICENSE rename to lib/JumpProblemLibrary/LICENSE.md diff --git a/lib/JumpProblemLibrary/Project.toml b/lib/JumpProblemLibrary/Project.toml index 9c9e90a..d128c48 100644 --- a/lib/JumpProblemLibrary/Project.toml +++ b/lib/JumpProblemLibrary/Project.toml @@ -10,10 +10,12 @@ RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" Aqua = "0.8" Catalyst = "16" RuntimeGeneratedFunctions = "0.5" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/JumpProblemLibrary/README.md b/lib/JumpProblemLibrary/README.md new file mode 100644 index 0000000..5e3f41d --- /dev/null +++ b/lib/JumpProblemLibrary/README.md @@ -0,0 +1,10 @@ +# JumpProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +JumpProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade jump process / reaction network problems for testing and benchmarking jump and Gillespie solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/JumpProblemLibrary/test/runtests.jl b/lib/JumpProblemLibrary/test/runtests.jl index 044e97a..8ce39e6 100644 --- a/lib/JumpProblemLibrary/test/runtests.jl +++ b/lib/JumpProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The test is simply that all of the examples build! using JumpProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(JumpProblemLibrary; ambiguities = false, persistent_tasks = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test JumpProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(JumpProblemLibrary; ambiguities = false, persistent_tasks = false) + end +end diff --git a/lib/NonlinearProblemLibrary/LICENSE b/lib/NonlinearProblemLibrary/LICENSE.md similarity index 100% rename from lib/NonlinearProblemLibrary/LICENSE rename to lib/NonlinearProblemLibrary/LICENSE.md diff --git a/lib/NonlinearProblemLibrary/README.md b/lib/NonlinearProblemLibrary/README.md new file mode 100644 index 0000000..7b79f56 --- /dev/null +++ b/lib/NonlinearProblemLibrary/README.md @@ -0,0 +1,10 @@ +# NonlinearProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +NonlinearProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade nonlinear systems (NonlinearProblems) for testing and benchmarking nonlinear solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/NonlinearProblemLibrary/test/runtests.jl b/lib/NonlinearProblemLibrary/test/runtests.jl index 9fe5dbc..36e921a 100644 --- a/lib/NonlinearProblemLibrary/test/runtests.jl +++ b/lib/NonlinearProblemLibrary/test/runtests.jl @@ -1,45 +1,56 @@ -# The test is simply that all of the examples build! using NonlinearProblemLibrary using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(NonlinearProblemLibrary; ambiguities = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") -# Allocation tests - ensure key functions don't allocate -if get(ENV, "GROUP", "all") == "all" || get(ENV, "GROUP", "all") == "nopre" - @testset "Allocation Tests" begin - using AllocCheck +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test NonlinearProblemLibrary isa Module + end - # Test p23_f! (Chandrasekhar function) - the fixed function - @testset "p23_f! zero allocations" begin - x = ones(10) - out = zeros(10) - # Warmup - NonlinearProblemLibrary.p23_f!(out, x) - # Test - allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) - @test allocs == 0 - end + # Allocation tests - ensure key functions don't allocate. + # Skipped on prerelease Julia (allocation behavior is not yet stable there). + if isempty(VERSION.prerelease) + @time @testset "Allocation Tests" begin + using AllocCheck - # Test other key functions - @testset "p1_f! zero allocations" begin - x = ones(10) - x[1] = -1.2 - out = zeros(10) - NonlinearProblemLibrary.p1_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) - @test allocs == 0 - end + # Test p23_f! (Chandrasekhar function) - the fixed function + @testset "p23_f! zero allocations" begin + x = ones(10) + out = zeros(10) + # Warmup + NonlinearProblemLibrary.p23_f!(out, x) + # Test + allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) + @test allocs == 0 + end + + # Test other key functions + @testset "p1_f! zero allocations" begin + x = ones(10) + x[1] = -1.2 + out = zeros(10) + NonlinearProblemLibrary.p1_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) + @test allocs == 0 + end - @testset "p2_f! zero allocations" begin - x = [3.0, -1.0, 0.0, 1.0] - out = zeros(4) - NonlinearProblemLibrary.p2_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) - @test allocs == 0 + @testset "p2_f! zero allocations" begin + x = [3.0, -1.0, 0.0, 1.0] + out = zeros(4) + NonlinearProblemLibrary.p2_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) + @test allocs == 0 + end end end end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(NonlinearProblemLibrary; ambiguities = false) + end +end diff --git a/lib/ODEProblemLibrary/LICENSE b/lib/ODEProblemLibrary/LICENSE.md similarity index 100% rename from lib/ODEProblemLibrary/LICENSE rename to lib/ODEProblemLibrary/LICENSE.md diff --git a/lib/ODEProblemLibrary/Project.toml b/lib/ODEProblemLibrary/Project.toml index 452f0b5..66919ad 100644 --- a/lib/ODEProblemLibrary/Project.toml +++ b/lib/ODEProblemLibrary/Project.toml @@ -14,10 +14,12 @@ DiffEqBase = "6, 7" LinearAlgebra = "1.10" Markdown = "1.10" Random = "1.10" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/ODEProblemLibrary/README.md b/lib/ODEProblemLibrary/README.md new file mode 100644 index 0000000..69c4aa1 --- /dev/null +++ b/lib/ODEProblemLibrary/README.md @@ -0,0 +1,10 @@ +# ODEProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +ODEProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade ordinary differential equation problems (ODEProblems) for testing and benchmarking ODE solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/ODEProblemLibrary/test/runtests.jl b/lib/ODEProblemLibrary/test/runtests.jl index 9d7d4e9..260176c 100644 --- a/lib/ODEProblemLibrary/test/runtests.jl +++ b/lib/ODEProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The test is simply that all of the examples build! using ODEProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(ODEProblemLibrary; ambiguities = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test ODEProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(ODEProblemLibrary; ambiguities = false) + end +end diff --git a/lib/SDEProblemLibrary/LICENSE b/lib/SDEProblemLibrary/LICENSE.md similarity index 100% rename from lib/SDEProblemLibrary/LICENSE rename to lib/SDEProblemLibrary/LICENSE.md diff --git a/lib/SDEProblemLibrary/Project.toml b/lib/SDEProblemLibrary/Project.toml index 24fb8c6..b75c537 100644 --- a/lib/SDEProblemLibrary/Project.toml +++ b/lib/SDEProblemLibrary/Project.toml @@ -14,10 +14,12 @@ DiffEqBase = "6, 7" Markdown = "1.10" RuntimeGeneratedFunctions = "0.5" SciMLBase = "2.0.1, 3" +Test = "1.10" julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua"] +test = ["Aqua", "Test"] diff --git a/lib/SDEProblemLibrary/README.md b/lib/SDEProblemLibrary/README.md new file mode 100644 index 0000000..28f6cbd --- /dev/null +++ b/lib/SDEProblemLibrary/README.md @@ -0,0 +1,10 @@ +# SDEProblemLibrary.jl + +[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged) +[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/DiffEqDocs/stable/) + +[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac) +[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) + +SDEProblemLibrary.jl is a component of the [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl) monorepo. A library of premade stochastic differential equation problems (SDEProblems) for testing and benchmarking SDE solvers. +While completely independent and usable on its own, users wanting the full set of premade differential equation problems should use [DiffEqProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl). diff --git a/lib/SDEProblemLibrary/test/runtests.jl b/lib/SDEProblemLibrary/test/runtests.jl index ac537bf..6c2232a 100644 --- a/lib/SDEProblemLibrary/test/runtests.jl +++ b/lib/SDEProblemLibrary/test/runtests.jl @@ -1,8 +1,20 @@ -# The test is simply that all of the examples build! using SDEProblemLibrary +using Test -# Check that there are no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities -# in dependencies -using Aqua -Aqua.test_all(SDEProblemLibrary; ambiguities = false, persistent_tasks = false) +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") + +# The Core test is simply that all of the examples build (load the module). +if TEST_GROUP == "Core" || TEST_GROUP == "ALL" + @time @testset "Load Tests" begin + @test SDEProblemLibrary isa Module + end +end + +# Quality assurance: no undefined exports, stale dependencies, etc. +# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +if TEST_GROUP == "QA" || TEST_GROUP == "ALL" + using Aqua + @time @testset "Aqua" begin + Aqua.test_all(SDEProblemLibrary; ambiguities = false, persistent_tasks = false) + end +end diff --git a/test/runtests.jl b/test/runtests.jl index fa0a720..d97b0d3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,9 +1,72 @@ -# The test is simply that all of the examples build! -using DiffEqProblemLibrary -using ExplicitImports -using Test - -@testset "ExplicitImports" begin - @test check_no_implicit_imports(DiffEqProblemLibrary) === nothing - @test check_no_stale_explicit_imports(DiffEqProblemLibrary) === nothing -end +using Pkg +using SafeTestsets, Test + +const GROUP = get(ENV, "GROUP", "All") + +@time begin + # Detect sublibrary test groups. + # GROUP can be a bare sublibrary name (Core test group) or + # "{sublibrary}_{TEST_GROUP}" for any custom group (e.g., QA). + # Sublibraries declare their groups in test/test_groups.toml (when they + # differ from the default Core + QA). + lib_dir = joinpath(dirname(@__DIR__), "lib") + + # Scan underscores right-to-left to find the longest matching sublibrary prefix. + function _detect_sublibrary_group(group, lib_dir) + isdir(joinpath(lib_dir, group)) && return (group, "Core") + for i in length(group):-1:1 + if group[i] == '_' && isdir(joinpath(lib_dir, group[1:(i - 1)])) + return (group[1:(i - 1)], group[(i + 1):end]) + end + end + return (group, "Core") + end + base_group, test_group = _detect_sublibrary_group(GROUP, lib_dir) + + if isdir(joinpath(lib_dir, base_group)) + Pkg.activate(joinpath(lib_dir, base_group)) + # On Julia < 1.11, the [sources] section in Project.toml is not supported. + # Manually Pkg.develop local path dependencies so CI tests the PR branch code. + # The transitive walk also develops each developed dependency's own [sources]. + if VERSION < v"1.11.0-DEV.0" + developed = Set{String}() + push!(developed, normpath(joinpath(lib_dir, base_group))) + specs = Pkg.PackageSpec[] + queue = [joinpath(lib_dir, base_group)] + while !isempty(queue) + pkg_dir = popfirst!(queue) + toml_path = joinpath(pkg_dir, "Project.toml") + isfile(toml_path) || continue + toml = Pkg.TOML.parsefile(toml_path) + if haskey(toml, "sources") + for (dep_name, source_spec) in toml["sources"] + if source_spec isa Dict && haskey(source_spec, "path") + dep_path = normpath(joinpath(pkg_dir, source_spec["path"])) + if isdir(dep_path) && !(dep_path in developed) + push!(developed, dep_path) + @info "Queuing local source dependency" dep_name dep_path + push!(specs, Pkg.PackageSpec(path = dep_path)) + push!(queue, dep_path) + end + end + end + end + end + isempty(specs) || Pkg.develop(specs) + end + withenv("DIFFEQPROBLEMLIBRARY_TEST_GROUP" => test_group) do + Pkg.test(base_group, julia_args = ["--check-bounds=auto", "--compiled-modules=yes", "--depwarn=yes"], force_latest_compatible_version = false, allow_reresolve = true) + end + elseif GROUP == "All" || GROUP == "Core" || GROUP == "QA" + # The root umbrella package's own test: it re-exports each sublibrary, + # so the test is that the whole thing builds with no implicit or stale + # explicit imports. + @time @safetestset "ExplicitImports" begin + using DiffEqProblemLibrary + using ExplicitImports + using Test + @test check_no_implicit_imports(DiffEqProblemLibrary) === nothing + @test check_no_stale_explicit_imports(DiffEqProblemLibrary) === nothing + end + end +end # @time From 4f66cae3c2beaf7321e88b18c40167bdfbbd1f4d Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 7 Jun 2026 17:04:17 -0400 Subject: [PATCH 2/9] Run NonlinearProblemLibrary allocation tests on all Julia versions 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/NonlinearProblemLibrary/test/runtests.jl | 57 ++++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/lib/NonlinearProblemLibrary/test/runtests.jl b/lib/NonlinearProblemLibrary/test/runtests.jl index 36e921a..9106ec1 100644 --- a/lib/NonlinearProblemLibrary/test/runtests.jl +++ b/lib/NonlinearProblemLibrary/test/runtests.jl @@ -9,39 +9,36 @@ if TEST_GROUP == "Core" || TEST_GROUP == "ALL" end # Allocation tests - ensure key functions don't allocate. - # Skipped on prerelease Julia (allocation behavior is not yet stable there). - if isempty(VERSION.prerelease) - @time @testset "Allocation Tests" begin - using AllocCheck + @time @testset "Allocation Tests" begin + using AllocCheck - # Test p23_f! (Chandrasekhar function) - the fixed function - @testset "p23_f! zero allocations" begin - x = ones(10) - out = zeros(10) - # Warmup - NonlinearProblemLibrary.p23_f!(out, x) - # Test - allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) - @test allocs == 0 - end + # Test p23_f! (Chandrasekhar function) - the fixed function + @testset "p23_f! zero allocations" begin + x = ones(10) + out = zeros(10) + # Warmup + NonlinearProblemLibrary.p23_f!(out, x) + # Test + allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) + @test allocs == 0 + end - # Test other key functions - @testset "p1_f! zero allocations" begin - x = ones(10) - x[1] = -1.2 - out = zeros(10) - NonlinearProblemLibrary.p1_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) - @test allocs == 0 - end + # Test other key functions + @testset "p1_f! zero allocations" begin + x = ones(10) + x[1] = -1.2 + out = zeros(10) + NonlinearProblemLibrary.p1_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) + @test allocs == 0 + end - @testset "p2_f! zero allocations" begin - x = [3.0, -1.0, 0.0, 1.0] - out = zeros(4) - NonlinearProblemLibrary.p2_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) - @test allocs == 0 - end + @testset "p2_f! zero allocations" begin + x = [3.0, -1.0, 0.0, 1.0] + out = zeros(4) + NonlinearProblemLibrary.p2_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) + @test allocs == 0 end end end From a18663e773422ba37576b3e79c9f7cee7255cb04 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 7 Jun 2026 19:18:42 -0400 Subject: [PATCH 3/9] Use canonical Title-case test group names (All) matching OrdinaryDiffEq 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/BVProblemLibrary/test/runtests.jl | 6 +++--- lib/DAEProblemLibrary/test/runtests.jl | 6 +++--- lib/DDEProblemLibrary/test/runtests.jl | 6 +++--- lib/JumpProblemLibrary/test/runtests.jl | 6 +++--- lib/NonlinearProblemLibrary/test/runtests.jl | 6 +++--- lib/ODEProblemLibrary/test/runtests.jl | 6 +++--- lib/SDEProblemLibrary/test/runtests.jl | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/BVProblemLibrary/test/runtests.jl b/lib/BVProblemLibrary/test/runtests.jl index 883ed39..30c7f9d 100644 --- a/lib/BVProblemLibrary/test/runtests.jl +++ b/lib/BVProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using BVProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test BVProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(BVProblemLibrary; ambiguities = false) diff --git a/lib/DAEProblemLibrary/test/runtests.jl b/lib/DAEProblemLibrary/test/runtests.jl index efc7fbe..b37988a 100644 --- a/lib/DAEProblemLibrary/test/runtests.jl +++ b/lib/DAEProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using DAEProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test DAEProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(DAEProblemLibrary; ambiguities = false) diff --git a/lib/DDEProblemLibrary/test/runtests.jl b/lib/DDEProblemLibrary/test/runtests.jl index da4ebd8..deb76b4 100644 --- a/lib/DDEProblemLibrary/test/runtests.jl +++ b/lib/DDEProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using DDEProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test DDEProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(DDEProblemLibrary; ambiguities = false) diff --git a/lib/JumpProblemLibrary/test/runtests.jl b/lib/JumpProblemLibrary/test/runtests.jl index 8ce39e6..18a8cad 100644 --- a/lib/JumpProblemLibrary/test/runtests.jl +++ b/lib/JumpProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using JumpProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test JumpProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(JumpProblemLibrary; ambiguities = false, persistent_tasks = false) diff --git a/lib/NonlinearProblemLibrary/test/runtests.jl b/lib/NonlinearProblemLibrary/test/runtests.jl index 9106ec1..eee164d 100644 --- a/lib/NonlinearProblemLibrary/test/runtests.jl +++ b/lib/NonlinearProblemLibrary/test/runtests.jl @@ -1,9 +1,9 @@ using NonlinearProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test NonlinearProblemLibrary isa Module end @@ -45,7 +45,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(NonlinearProblemLibrary; ambiguities = false) diff --git a/lib/ODEProblemLibrary/test/runtests.jl b/lib/ODEProblemLibrary/test/runtests.jl index 260176c..5e51db4 100644 --- a/lib/ODEProblemLibrary/test/runtests.jl +++ b/lib/ODEProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using ODEProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test ODEProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(ODEProblemLibrary; ambiguities = false) diff --git a/lib/SDEProblemLibrary/test/runtests.jl b/lib/SDEProblemLibrary/test/runtests.jl index 6c2232a..2b4762e 100644 --- a/lib/SDEProblemLibrary/test/runtests.jl +++ b/lib/SDEProblemLibrary/test/runtests.jl @@ -1,10 +1,10 @@ using SDEProblemLibrary using Test -const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "ALL") +const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") # The Core test is simply that all of the examples build (load the module). -if TEST_GROUP == "Core" || TEST_GROUP == "ALL" +if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test SDEProblemLibrary isa Module end @@ -12,7 +12,7 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. -if TEST_GROUP == "QA" || TEST_GROUP == "ALL" +if TEST_GROUP == "QA" || TEST_GROUP == "All" using Aqua @time @testset "Aqua" begin Aqua.test_all(SDEProblemLibrary; ambiguities = false, persistent_tasks = false) From 41418550921216742782b69fbccc00cdfe60f2f5 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sun, 7 Jun 2026 20:30:20 -0400 Subject: [PATCH 4/9] ci: canonical TagBot subpackage matrix + add Downstream IntegrationTest 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/. 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Downstream.yml | 53 ++++++++++++++++++++++++++++++++ .github/workflows/TagBot.yml | 43 +++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Downstream.yml diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml new file mode 100644 index 0000000..b25a5ea --- /dev/null +++ b/.github/workflows/Downstream.yml @@ -0,0 +1,53 @@ +name: IntegrationTest +on: + push: + branches: [master] + tags: [v*] + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + test: + name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }} + runs-on: ${{ matrix.os }} + env: + GROUP: ${{ matrix.package.group }} + strategy: + fail-fast: false + matrix: + julia-version: ['1.10'] + os: [ubuntu-latest] + package: + - {user: SciML, repo: DiffEqDevTools.jl, group: All} + - {user: SciML, repo: OrdinaryDiffEq.jl, group: Regression_I} + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v3 + with: + version: ${{ matrix.julia-version }} + arch: x64 + - name: Clone Downstream + uses: actions/checkout@v6 + with: + repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} + path: downstream + - name: Load this and run the downstream tests + shell: julia --color=yes --project=downstream {0} + run: | + using Pkg + try + Pkg.develop(map(path ->Pkg.PackageSpec.(;path="lib/$(path)"), readdir("./lib"))); + Pkg.test(coverage=true) + catch err + err isa Pkg.Resolve.ResolverError || rethrow() + @info "Not compatible with this release. No problem." exception=err + exit(0) + end + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v6 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: false + disable_safe_directory: true diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..8bec5f9 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,12 +4,53 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: "3" + +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read + jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - - uses: JuliaRegistries/TagBot@v1 + - name: Tag DiffEqProblemLibrary + uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} ssh: ${{ secrets.DOCUMENTER_KEY }} + + TagBot-Subpackages: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: + - BVProblemLibrary + - DAEProblemLibrary + - DDEProblemLibrary + - JumpProblemLibrary + - NonlinearProblemLibrary + - ODEProblemLibrary + - SDEProblemLibrary + steps: + - name: Tag ${{ matrix.package }} + uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} + subdir: "lib/${{ matrix.package }}" From 8f18c3db28592df86e3ff2dbf1d4a727c030c704 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Mon, 8 Jun 2026 02:26:04 -0400 Subject: [PATCH 5/9] test: isolate QA into canonical test/qa sub-environment 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 3 +-- lib/BVProblemLibrary/Project.toml | 7 ++++--- lib/BVProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/BVProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/BVProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/DAEProblemLibrary/Project.toml | 7 ++++--- lib/DAEProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/DAEProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/DAEProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/DDEProblemLibrary/Project.toml | 7 ++++--- lib/DDEProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/DDEProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/DDEProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/JumpProblemLibrary/Project.toml | 7 ++++--- lib/JumpProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/JumpProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/JumpProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/NonlinearProblemLibrary/Project.toml | 7 ++++--- .../test/qa/Project.toml | 13 ++++++++++++ lib/NonlinearProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/NonlinearProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/ODEProblemLibrary/Project.toml | 7 ++++--- lib/ODEProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/ODEProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/ODEProblemLibrary/test/runtests.jl | 14 ++++++++----- lib/SDEProblemLibrary/Project.toml | 7 ++++--- lib/SDEProblemLibrary/test/qa/Project.toml | 13 ++++++++++++ lib/SDEProblemLibrary/test/qa/qa.jl | 6 ++++++ lib/SDEProblemLibrary/test/runtests.jl | 14 ++++++++----- test/qa/Project.toml | 20 +++++++++++++++++++ test/qa/qa.jl | 11 ++++++++++ test/runtests.jl | 14 ++++++------- 32 files changed, 263 insertions(+), 65 deletions(-) create mode 100644 lib/BVProblemLibrary/test/qa/Project.toml create mode 100644 lib/BVProblemLibrary/test/qa/qa.jl create mode 100644 lib/DAEProblemLibrary/test/qa/Project.toml create mode 100644 lib/DAEProblemLibrary/test/qa/qa.jl create mode 100644 lib/DDEProblemLibrary/test/qa/Project.toml create mode 100644 lib/DDEProblemLibrary/test/qa/qa.jl create mode 100644 lib/JumpProblemLibrary/test/qa/Project.toml create mode 100644 lib/JumpProblemLibrary/test/qa/qa.jl create mode 100644 lib/NonlinearProblemLibrary/test/qa/Project.toml create mode 100644 lib/NonlinearProblemLibrary/test/qa/qa.jl create mode 100644 lib/ODEProblemLibrary/test/qa/Project.toml create mode 100644 lib/ODEProblemLibrary/test/qa/qa.jl create mode 100644 lib/SDEProblemLibrary/test/qa/Project.toml create mode 100644 lib/SDEProblemLibrary/test/qa/qa.jl create mode 100644 test/qa/Project.toml create mode 100644 test/qa/qa.jl diff --git a/Project.toml b/Project.toml index 6f53248..84bf407 100644 --- a/Project.toml +++ b/Project.toml @@ -34,10 +34,9 @@ Test = "1.10" julia = "1.10" [extras] -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["ExplicitImports", "Pkg", "SafeTestsets", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/BVProblemLibrary/Project.toml b/lib/BVProblemLibrary/Project.toml index c8f47f6..c6718eb 100644 --- a/lib/BVProblemLibrary/Project.toml +++ b/lib/BVProblemLibrary/Project.toml @@ -8,16 +8,17 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] -Aqua = "0.8" DiffEqBase = "6, 7" Markdown = "1.10" +SafeTestsets = "0.1" SpecialFunctions = "2.3" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/BVProblemLibrary/test/qa/Project.toml b/lib/BVProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..3b6a6c9 --- /dev/null +++ b/lib/BVProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +BVProblemLibrary = "ded0fc24-dfea-4565-b1d9-79c027d14d84" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +BVProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +BVProblemLibrary = "0.1" +Test = "1.10" +julia = "1.10" diff --git a/lib/BVProblemLibrary/test/qa/qa.jl b/lib/BVProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..36a36a3 --- /dev/null +++ b/lib/BVProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using BVProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(BVProblemLibrary; ambiguities = false) +end diff --git a/lib/BVProblemLibrary/test/runtests.jl b/lib/BVProblemLibrary/test/runtests.jl index 30c7f9d..0821ce9 100644 --- a/lib/BVProblemLibrary/test/runtests.jl +++ b/lib/BVProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using BVProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(BVProblemLibrary; ambiguities = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/DAEProblemLibrary/Project.toml b/lib/DAEProblemLibrary/Project.toml index a28bbca..1492602 100644 --- a/lib/DAEProblemLibrary/Project.toml +++ b/lib/DAEProblemLibrary/Project.toml @@ -7,15 +7,16 @@ DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" [compat] -Aqua = "0.8" DiffEqBase = "6, 7" Markdown = "1.10" +SafeTestsets = "0.1" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/DAEProblemLibrary/test/qa/Project.toml b/lib/DAEProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..5883ba1 --- /dev/null +++ b/lib/DAEProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +DAEProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +DAEProblemLibrary = "0.1" +Test = "1.10" +julia = "1.10" diff --git a/lib/DAEProblemLibrary/test/qa/qa.jl b/lib/DAEProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..0bb41bc --- /dev/null +++ b/lib/DAEProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using DAEProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(DAEProblemLibrary; ambiguities = false) +end diff --git a/lib/DAEProblemLibrary/test/runtests.jl b/lib/DAEProblemLibrary/test/runtests.jl index b37988a..0d470a9 100644 --- a/lib/DAEProblemLibrary/test/runtests.jl +++ b/lib/DAEProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using DAEProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(DAEProblemLibrary; ambiguities = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/DDEProblemLibrary/Project.toml b/lib/DDEProblemLibrary/Project.toml index eefdbf2..6621d19 100644 --- a/lib/DDEProblemLibrary/Project.toml +++ b/lib/DDEProblemLibrary/Project.toml @@ -6,14 +6,15 @@ version = "0.1.5" DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" [compat] -Aqua = "0.8" DiffEqBase = "6, 7" +SafeTestsets = "0.1" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/DDEProblemLibrary/test/qa/Project.toml b/lib/DDEProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..233d74a --- /dev/null +++ b/lib/DDEProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +DDEProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +DDEProblemLibrary = "0.1" +Test = "1.10" +julia = "1.10" diff --git a/lib/DDEProblemLibrary/test/qa/qa.jl b/lib/DDEProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..ce167c0 --- /dev/null +++ b/lib/DDEProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using DDEProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(DDEProblemLibrary; ambiguities = false) +end diff --git a/lib/DDEProblemLibrary/test/runtests.jl b/lib/DDEProblemLibrary/test/runtests.jl index deb76b4..f69ce74 100644 --- a/lib/DDEProblemLibrary/test/runtests.jl +++ b/lib/DDEProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using DDEProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(DDEProblemLibrary; ambiguities = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/JumpProblemLibrary/Project.toml b/lib/JumpProblemLibrary/Project.toml index d128c48..f595ccd 100644 --- a/lib/JumpProblemLibrary/Project.toml +++ b/lib/JumpProblemLibrary/Project.toml @@ -7,15 +7,16 @@ Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83" RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" [compat] -Aqua = "0.8" Catalyst = "16" RuntimeGeneratedFunctions = "0.5" +SafeTestsets = "0.1" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/JumpProblemLibrary/test/qa/Project.toml b/lib/JumpProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..4d15c00 --- /dev/null +++ b/lib/JumpProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +JumpProblemLibrary = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +JumpProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +JumpProblemLibrary = "2" +Test = "1.10" +julia = "1.10" diff --git a/lib/JumpProblemLibrary/test/qa/qa.jl b/lib/JumpProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..3d703ee --- /dev/null +++ b/lib/JumpProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using JumpProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(JumpProblemLibrary; ambiguities = false, persistent_tasks = false) +end diff --git a/lib/JumpProblemLibrary/test/runtests.jl b/lib/JumpProblemLibrary/test/runtests.jl index 18a8cad..9fbaaf7 100644 --- a/lib/JumpProblemLibrary/test/runtests.jl +++ b/lib/JumpProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using JumpProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(JumpProblemLibrary; ambiguities = false, persistent_tasks = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/NonlinearProblemLibrary/Project.toml b/lib/NonlinearProblemLibrary/Project.toml index 0689990..947ea8c 100644 --- a/lib/NonlinearProblemLibrary/Project.toml +++ b/lib/NonlinearProblemLibrary/Project.toml @@ -8,16 +8,17 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" [compat] AllocCheck = "0.2" -Aqua = "0.8" LinearAlgebra = "1.6" +SafeTestsets = "0.1" SciMLBase = "2, 3" Test = "1" julia = "1.10" [extras] AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AllocCheck", "Aqua", "Test"] +test = ["AllocCheck", "Pkg", "SafeTestsets", "Test"] diff --git a/lib/NonlinearProblemLibrary/test/qa/Project.toml b/lib/NonlinearProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..b9ebff4 --- /dev/null +++ b/lib/NonlinearProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +NonlinearProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +NonlinearProblemLibrary = "0.1" +Test = "1" +julia = "1.10" diff --git a/lib/NonlinearProblemLibrary/test/qa/qa.jl b/lib/NonlinearProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..5274826 --- /dev/null +++ b/lib/NonlinearProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using NonlinearProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(NonlinearProblemLibrary; ambiguities = false) +end diff --git a/lib/NonlinearProblemLibrary/test/runtests.jl b/lib/NonlinearProblemLibrary/test/runtests.jl index eee164d..24556e2 100644 --- a/lib/NonlinearProblemLibrary/test/runtests.jl +++ b/lib/NonlinearProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using NonlinearProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test NonlinearProblemLibrary isa Module @@ -46,8 +52,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(NonlinearProblemLibrary; ambiguities = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/ODEProblemLibrary/Project.toml b/lib/ODEProblemLibrary/Project.toml index 66919ad..7d70379 100644 --- a/lib/ODEProblemLibrary/Project.toml +++ b/lib/ODEProblemLibrary/Project.toml @@ -9,17 +9,18 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [compat] -Aqua = "0.8" DiffEqBase = "6, 7" LinearAlgebra = "1.10" Markdown = "1.10" Random = "1.10" +SafeTestsets = "0.1" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/ODEProblemLibrary/test/qa/Project.toml b/lib/ODEProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..d52ff29 --- /dev/null +++ b/lib/ODEProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +ODEProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +ODEProblemLibrary = "1" +Test = "1.10" +julia = "1.10" diff --git a/lib/ODEProblemLibrary/test/qa/qa.jl b/lib/ODEProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..cdfb145 --- /dev/null +++ b/lib/ODEProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using ODEProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(ODEProblemLibrary; ambiguities = false) +end diff --git a/lib/ODEProblemLibrary/test/runtests.jl b/lib/ODEProblemLibrary/test/runtests.jl index 5e51db4..ce074ef 100644 --- a/lib/ODEProblemLibrary/test/runtests.jl +++ b/lib/ODEProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using ODEProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(ODEProblemLibrary; ambiguities = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/lib/SDEProblemLibrary/Project.toml b/lib/SDEProblemLibrary/Project.toml index b75c537..61614d8 100644 --- a/lib/SDEProblemLibrary/Project.toml +++ b/lib/SDEProblemLibrary/Project.toml @@ -9,17 +9,18 @@ RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" [compat] -Aqua = "0.8" DiffEqBase = "6, 7" Markdown = "1.10" RuntimeGeneratedFunctions = "0.5" +SafeTestsets = "0.1" SciMLBase = "2.0.1, 3" Test = "1.10" julia = "1.10" [extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Aqua", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/SDEProblemLibrary/test/qa/Project.toml b/lib/SDEProblemLibrary/test/qa/Project.toml new file mode 100644 index 0000000..2cdb197 --- /dev/null +++ b/lib/SDEProblemLibrary/test/qa/Project.toml @@ -0,0 +1,13 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +SDEProblemLibrary = {path = "../.."} + +[compat] +Aqua = "0.8" +SDEProblemLibrary = "1" +Test = "1.10" +julia = "1.10" diff --git a/lib/SDEProblemLibrary/test/qa/qa.jl b/lib/SDEProblemLibrary/test/qa/qa.jl new file mode 100644 index 0000000..faf5dfb --- /dev/null +++ b/lib/SDEProblemLibrary/test/qa/qa.jl @@ -0,0 +1,6 @@ +using SDEProblemLibrary +using Aqua + +@testset "Aqua" begin + Aqua.test_all(SDEProblemLibrary; ambiguities = false, persistent_tasks = false) +end diff --git a/lib/SDEProblemLibrary/test/runtests.jl b/lib/SDEProblemLibrary/test/runtests.jl index 2b4762e..6a700a2 100644 --- a/lib/SDEProblemLibrary/test/runtests.jl +++ b/lib/SDEProblemLibrary/test/runtests.jl @@ -1,8 +1,14 @@ +using Pkg using SDEProblemLibrary -using Test +using SafeTestsets, Test const TEST_GROUP = get(ENV, "DIFFEQPROBLEMLIBRARY_TEST_GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + # The Core test is simply that all of the examples build (load the module). if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @@ -13,8 +19,6 @@ end # Quality assurance: no undefined exports, stale dependencies, etc. # Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" - using Aqua - @time @testset "Aqua" begin - Aqua.test_all(SDEProblemLibrary; ambiguities = false, persistent_tasks = false) - end + activate_qa_env() + @time @safetestset "Aqua" include("qa/qa.jl") end diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..afaeb56 --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,20 @@ +[deps] +DiffEqProblemLibrary = "a077e3f3-b75c-5d7f-a0c6-6bc4c8ec64a9" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +BVProblemLibrary = {path = "../../lib/BVProblemLibrary"} +DAEProblemLibrary = {path = "../../lib/DAEProblemLibrary"} +DDEProblemLibrary = {path = "../../lib/DDEProblemLibrary"} +DiffEqProblemLibrary = {path = "../.."} +JumpProblemLibrary = {path = "../../lib/JumpProblemLibrary"} +NonlinearProblemLibrary = {path = "../../lib/NonlinearProblemLibrary"} +ODEProblemLibrary = {path = "../../lib/ODEProblemLibrary"} +SDEProblemLibrary = {path = "../../lib/SDEProblemLibrary"} + +[compat] +DiffEqProblemLibrary = "5" +ExplicitImports = "1" +Test = "1.10" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..8c77d8f --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,11 @@ +# The root umbrella package's own test: it re-exports each sublibrary, +# so the test is that the whole thing builds with no implicit or stale +# explicit imports. +using DiffEqProblemLibrary +using ExplicitImports +using Test + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(DiffEqProblemLibrary) === nothing + @test check_no_stale_explicit_imports(DiffEqProblemLibrary) === nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index d97b0d3..ceb763e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,6 +3,11 @@ using SafeTestsets, Test const GROUP = get(ENV, "GROUP", "All") +function activate_qa_env() + Pkg.activate(joinpath(@__DIR__, "qa")) + return Pkg.instantiate() +end + @time begin # Detect sublibrary test groups. # GROUP can be a bare sublibrary name (Core test group) or @@ -61,12 +66,7 @@ const GROUP = get(ENV, "GROUP", "All") # The root umbrella package's own test: it re-exports each sublibrary, # so the test is that the whole thing builds with no implicit or stale # explicit imports. - @time @safetestset "ExplicitImports" begin - using DiffEqProblemLibrary - using ExplicitImports - using Test - @test check_no_implicit_imports(DiffEqProblemLibrary) === nothing - @test check_no_stale_explicit_imports(DiffEqProblemLibrary) === nothing - end + activate_qa_env() + @time @safetestset "ExplicitImports" include("qa/qa.jl") end end # @time From cb5d06f54a03520ac93de144797db7dfd777309c Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Mon, 8 Jun 2026 02:48:38 -0400 Subject: [PATCH 6/9] test(NonlinearProblemLibrary): isolate AllocCheck into the QA test env 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/NonlinearProblemLibrary/Project.toml | 4 +- .../test/qa/Project.toml | 2 + .../test/qa/allocation_tests.jl | 34 +++++++++++++++ lib/NonlinearProblemLibrary/test/runtests.jl | 41 +++---------------- 4 files changed, 42 insertions(+), 39 deletions(-) create mode 100644 lib/NonlinearProblemLibrary/test/qa/allocation_tests.jl diff --git a/lib/NonlinearProblemLibrary/Project.toml b/lib/NonlinearProblemLibrary/Project.toml index 947ea8c..bc377fc 100644 --- a/lib/NonlinearProblemLibrary/Project.toml +++ b/lib/NonlinearProblemLibrary/Project.toml @@ -7,7 +7,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" [compat] -AllocCheck = "0.2" LinearAlgebra = "1.6" SafeTestsets = "0.1" SciMLBase = "2, 3" @@ -15,10 +14,9 @@ Test = "1" julia = "1.10" [extras] -AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AllocCheck", "Pkg", "SafeTestsets", "Test"] +test = ["Pkg", "SafeTestsets", "Test"] diff --git a/lib/NonlinearProblemLibrary/test/qa/Project.toml b/lib/NonlinearProblemLibrary/test/qa/Project.toml index b9ebff4..5ee5061 100644 --- a/lib/NonlinearProblemLibrary/test/qa/Project.toml +++ b/lib/NonlinearProblemLibrary/test/qa/Project.toml @@ -1,4 +1,5 @@ [deps] +AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a" Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -7,6 +8,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" NonlinearProblemLibrary = {path = "../.."} [compat] +AllocCheck = "0.2" Aqua = "0.8" NonlinearProblemLibrary = "0.1" Test = "1" diff --git a/lib/NonlinearProblemLibrary/test/qa/allocation_tests.jl b/lib/NonlinearProblemLibrary/test/qa/allocation_tests.jl new file mode 100644 index 0000000..8b27dbf --- /dev/null +++ b/lib/NonlinearProblemLibrary/test/qa/allocation_tests.jl @@ -0,0 +1,34 @@ +using NonlinearProblemLibrary +using AllocCheck +using Test + +@testset "Allocation Tests" begin + # Test p23_f! (Chandrasekhar function) - the fixed function + @testset "p23_f! zero allocations" begin + x = ones(10) + out = zeros(10) + # Warmup + NonlinearProblemLibrary.p23_f!(out, x) + # Test + allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) + @test allocs == 0 + end + + # Test other key functions + @testset "p1_f! zero allocations" begin + x = ones(10) + x[1] = -1.2 + out = zeros(10) + NonlinearProblemLibrary.p1_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) + @test allocs == 0 + end + + @testset "p2_f! zero allocations" begin + x = [3.0, -1.0, 0.0, 1.0] + out = zeros(4) + NonlinearProblemLibrary.p2_f!(out, x) + allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) + @test allocs == 0 + end +end diff --git a/lib/NonlinearProblemLibrary/test/runtests.jl b/lib/NonlinearProblemLibrary/test/runtests.jl index 24556e2..e58a5c2 100644 --- a/lib/NonlinearProblemLibrary/test/runtests.jl +++ b/lib/NonlinearProblemLibrary/test/runtests.jl @@ -13,45 +13,14 @@ if TEST_GROUP == "Core" || TEST_GROUP == "All" @time @testset "Load Tests" begin @test NonlinearProblemLibrary isa Module end - - # Allocation tests - ensure key functions don't allocate. - @time @testset "Allocation Tests" begin - using AllocCheck - - # Test p23_f! (Chandrasekhar function) - the fixed function - @testset "p23_f! zero allocations" begin - x = ones(10) - out = zeros(10) - # Warmup - NonlinearProblemLibrary.p23_f!(out, x) - # Test - allocs = @allocated NonlinearProblemLibrary.p23_f!(out, x) - @test allocs == 0 - end - - # Test other key functions - @testset "p1_f! zero allocations" begin - x = ones(10) - x[1] = -1.2 - out = zeros(10) - NonlinearProblemLibrary.p1_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p1_f!(out, x) - @test allocs == 0 - end - - @testset "p2_f! zero allocations" begin - x = [3.0, -1.0, 0.0, 1.0] - out = zeros(4) - NonlinearProblemLibrary.p2_f!(out, x) - allocs = @allocated NonlinearProblemLibrary.p2_f!(out, x) - @test allocs == 0 - end - end end -# Quality assurance: no undefined exports, stale dependencies, etc. -# Ambiguity checks are disabled since tests fail due to ambiguities in dependencies. +# Quality assurance: allocation checks (AllocCheck), then no undefined exports, +# stale dependencies, etc. (Aqua). These run in the isolated test/qa environment +# so the heavy tooling stays out of the main test env. Ambiguity checks are +# disabled since tests fail due to ambiguities in dependencies. if TEST_GROUP == "QA" || TEST_GROUP == "All" activate_qa_env() + @time @safetestset "Allocation Tests" include("qa/allocation_tests.jl") @time @safetestset "Aqua" include("qa/qa.jl") end From 8a7d7a6718c32746a21bd1ee2e5ad9a64a3f7bd7 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Mon, 8 Jun 2026 02:48:47 -0400 Subject: [PATCH 7/9] ci: add per-sublibrary test_groups.toml version matrices Make the version matrix explicit for every lib/ 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/BVProblemLibrary/test/test_groups.toml | 5 +++++ lib/DAEProblemLibrary/test/test_groups.toml | 5 +++++ lib/DDEProblemLibrary/test/test_groups.toml | 5 +++++ lib/JumpProblemLibrary/test/test_groups.toml | 5 +++++ lib/NonlinearProblemLibrary/test/test_groups.toml | 5 +++++ lib/ODEProblemLibrary/test/test_groups.toml | 5 +++++ lib/SDEProblemLibrary/test/test_groups.toml | 5 +++++ 7 files changed, 35 insertions(+) create mode 100644 lib/BVProblemLibrary/test/test_groups.toml create mode 100644 lib/DAEProblemLibrary/test/test_groups.toml create mode 100644 lib/DDEProblemLibrary/test/test_groups.toml create mode 100644 lib/JumpProblemLibrary/test/test_groups.toml create mode 100644 lib/NonlinearProblemLibrary/test/test_groups.toml create mode 100644 lib/ODEProblemLibrary/test/test_groups.toml create mode 100644 lib/SDEProblemLibrary/test/test_groups.toml diff --git a/lib/BVProblemLibrary/test/test_groups.toml b/lib/BVProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/BVProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/DAEProblemLibrary/test/test_groups.toml b/lib/DAEProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/DAEProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/DDEProblemLibrary/test/test_groups.toml b/lib/DDEProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/DDEProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/JumpProblemLibrary/test/test_groups.toml b/lib/JumpProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/JumpProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/NonlinearProblemLibrary/test/test_groups.toml b/lib/NonlinearProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/NonlinearProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/ODEProblemLibrary/test/test_groups.toml b/lib/ODEProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/ODEProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] diff --git a/lib/SDEProblemLibrary/test/test_groups.toml b/lib/SDEProblemLibrary/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/lib/SDEProblemLibrary/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"] From 605a5bba7cb8d924586f10943b4ff811f125ed41 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Mon, 8 Jun 2026 02:48:52 -0400 Subject: [PATCH 8/9] ci: align root Tests matrix with the canonical version matrix 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/CI.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f97d3fa..be3bb3e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,12 +25,13 @@ jobs: - Core - QA version: - - "1" - "lts" + - "1" + - "pre" exclude: - # QA (Aqua-style explicit-imports check) only needs one Julia version. + # QA (explicit-imports check) does not need the pre-release Julia. - group: QA - version: "lts" + version: "pre" uses: "SciML/.github/.github/workflows/tests.yml@v1" with: julia-version: "${{ matrix.version }}" From 36da8afaf539a5dba29eba67c132ab2864fb8b44 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Mon, 8 Jun 2026 05:12:38 -0400 Subject: [PATCH 9/9] ci: canonical TagBot thin caller + downgrade-caller cleanup Convert TagBot.yml to the canonical SciML thin caller, with a tagbot-subpackages matrix over the 7 registered lib/ 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 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/Downgrade.yml | 7 --- .github/workflows/DowngradeSublibraries.yml | 2 - .github/workflows/TagBot.yml | 66 ++++++--------------- 3 files changed, 18 insertions(+), 57 deletions(-) diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index ab3098e..36d3b21 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -16,14 +16,7 @@ concurrency: jobs: downgrade: name: "Downgrade" - strategy: - matrix: - julia-version: ['1.10'] uses: "SciML/.github/.github/workflows/downgrade.yml@v1" with: - julia-version: "${{ matrix.julia-version }}" group: "Core" - # Skip the in-repo sublibraries (developed via the root's [sources]) so - # downgrade-compat does not try to pin them to old registered versions. - skip: "Pkg,TOML,BVProblemLibrary,DAEProblemLibrary,DDEProblemLibrary,JumpProblemLibrary,NonlinearProblemLibrary,ODEProblemLibrary,SDEProblemLibrary" secrets: "inherit" diff --git a/.github/workflows/DowngradeSublibraries.yml b/.github/workflows/DowngradeSublibraries.yml index 9452749..8cf4dab 100644 --- a/.github/workflows/DowngradeSublibraries.yml +++ b/.github/workflows/DowngradeSublibraries.yml @@ -18,8 +18,6 @@ jobs: uses: "SciML/.github/.github/workflows/sublibrary-downgrade.yml@v1" secrets: "inherit" with: - julia-version: "lts" - skip: "Pkg,TOML,Statistics,LinearAlgebra,SparseArrays,InteractiveUtils,Random,Test,Markdown,BVProblemLibrary,DAEProblemLibrary,DDEProblemLibrary,JumpProblemLibrary,NonlinearProblemLibrary,ODEProblemLibrary,SDEProblemLibrary" group-env-name: "DIFFEQPROBLEMLIBRARY_TEST_GROUP" group-env-value: "Core" # Every lib/* sublibrary is downgrade-tested (projects auto-discovered, no exclusions). diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index 8bec5f9..5b9ed11 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,56 +1,26 @@ -name: TagBot +name: "TagBot" on: issue_comment: - types: - - created + types: [created] workflow_dispatch: - inputs: - lookback: - default: "3" - -permissions: - actions: read - checks: read - contents: write - deployments: read - issues: read - discussions: read - packages: read - pages: read - pull-requests: read - repository-projects: read - security-events: read - statuses: read - jobs: - TagBot: - if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' - runs-on: ubuntu-latest - steps: - - name: Tag DiffEqProblemLibrary - uses: JuliaRegistries/TagBot@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ssh: ${{ secrets.DOCUMENTER_KEY }} + tagbot: + uses: "SciML/.github/.github/workflows/tagbot.yml@v1" + secrets: "inherit" - TagBot-Subpackages: - if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' - runs-on: ubuntu-latest + tagbot-subpackages: strategy: fail-fast: false matrix: - package: - - BVProblemLibrary - - DAEProblemLibrary - - DDEProblemLibrary - - JumpProblemLibrary - - NonlinearProblemLibrary - - ODEProblemLibrary - - SDEProblemLibrary - steps: - - name: Tag ${{ matrix.package }} - uses: JuliaRegistries/TagBot@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ssh: ${{ secrets.DOCUMENTER_KEY }} - subdir: "lib/${{ matrix.package }}" + subdir: + - "lib/BVProblemLibrary" + - "lib/DAEProblemLibrary" + - "lib/DDEProblemLibrary" + - "lib/JumpProblemLibrary" + - "lib/NonlinearProblemLibrary" + - "lib/ODEProblemLibrary" + - "lib/SDEProblemLibrary" + uses: "SciML/.github/.github/workflows/tagbot.yml@v1" + with: + subdir: "${{ matrix.subdir }}" + secrets: "inherit"