From 5d5afd7817fd7f3bb542005bfea351dd45298338 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 14 Jun 2026 09:03:46 -0400 Subject: [PATCH] Use SciMLTesting v1.2 folder-based run_tests Convert ModelingToolkitNeuralNets.jl to the SciMLTesting v1.2 model: test/qa.jl moves into test/qa/, and runtests.jl becomes a single declarative run_tests call. The single-"All" CI matrix requires GROUP=All to run QA together with the functional tests, which folder-discovery's All (QA always excluded) cannot express, so the explicit-args form of run_tests is used (still v1.2). Per-GROUP behavior is preserved: GROUP=All runs the functional tests plus QA; GROUP=Core runs the functional tests only. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- Project.toml | 4 +++- test/{ => qa}/qa.jl | 0 test/runtests.jl | 25 +++++++++++-------------- 3 files changed, 14 insertions(+), 15 deletions(-) rename test/{ => qa}/qa.jl (100%) diff --git a/Project.toml b/Project.toml index 0baeb2a..bbb154d 100644 --- a/Project.toml +++ b/Project.toml @@ -32,6 +32,7 @@ Random = "1.10" SafeTestsets = "0.1" SciCompDSL = "1" SciMLSensitivity = "7.93" +SciMLTesting = "1" SciMLStructures = "1.10" StableRNGs = "1" Statistics = "1.10" @@ -56,6 +57,7 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SciCompDSL = "91a8cdf1-4ca6-467b-a780-87fda3fff15e" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226" +SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" @@ -63,4 +65,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Aqua", "JET", "Test", "OrdinaryDiffEqVerner", "DifferentiationInterface", "SciMLSensitivity", "SciCompDSL", "Zygote", "ForwardDiff", "ModelingToolkit", "ModelingToolkitStandardLibrary", "OptimizationBase", "OptimizationOptimisers", "OptimizationOptimJL", "SafeTestsets", "SciMLStructures", "StableRNGs", "Statistics", "SymbolicIndexingInterface"] +test = ["Aqua", "JET", "Test", "OrdinaryDiffEqVerner", "DifferentiationInterface", "SciMLSensitivity", "SciCompDSL", "Zygote", "ForwardDiff", "ModelingToolkit", "ModelingToolkitStandardLibrary", "OptimizationBase", "OptimizationOptimisers", "OptimizationOptimJL", "SafeTestsets", "SciMLStructures", "SciMLTesting", "StableRNGs", "Statistics", "SymbolicIndexingInterface"] diff --git a/test/qa.jl b/test/qa/qa.jl similarity index 100% rename from test/qa.jl rename to test/qa/qa.jl diff --git a/test/runtests.jl b/test/runtests.jl index 5f4b3a7..66df770 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,16 +1,13 @@ -using ModelingToolkitNeuralNets -using Test using SafeTestsets +using SciMLTesting -const GROUP = get(ENV, "GROUP", "All") - -@testset verbose = true "ModelingToolkitNeuralNets.jl" begin - if GROUP != "Core" - @safetestset "QA" include("qa.jl") - end - @safetestset "Basic" include("lotka_volterra.jl") - @safetestset "MTK model macro compatibility" include("macro.jl") - @safetestset "Symbolic Neural Network Macro" include("symbolicnn_macro.jl") - @safetestset "Neural Network Parameter Metadata" include("nn_ps_accessors.jl") - @safetestset "Reported issues" include("reported_issues.jl") -end +run_tests(; + core = function () + @safetestset "Basic" include("lotka_volterra.jl") + @safetestset "MTK model macro compatibility" include("macro.jl") + @safetestset "Symbolic Neural Network Macro" include("symbolicnn_macro.jl") + @safetestset "Neural Network Parameter Metadata" include("nn_ps_accessors.jl") + return @safetestset "Reported issues" include("reported_issues.jl") + end, + qa = joinpath(@__DIR__, "qa", "qa.jl"), +)