diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 45ba366..b966ae8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,18 +15,5 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: tests: - name: "Tests" - strategy: - fail-fast: false - matrix: - group: - - All - version: - - '1' - - 'lts' - - 'pre' - uses: "SciML/.github/.github/workflows/tests.yml@v1" - with: - group: "${{ matrix.group }}" - julia-version: "${{ matrix.version }}" + uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1" secrets: "inherit" diff --git a/Project.toml b/Project.toml index 9f7ef90..4583f72 100644 --- a/Project.toml +++ b/Project.toml @@ -18,23 +18,37 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" [compat] +BlackBoxOptim = "0.6" Calculus = "0.5.2" CommonSolve = "0.2.6" DelayDiffEq = "5.63, 6" Dierckx = "0.5" DiffEqBase = "6.213, 7" Distributions = "0.25.87" +ExplicitImports = "1" ForwardDiff = "0.10.38" +Logging = "1" +NLopt = "0.6, 1" +Optim = "1" +Optimization = "3, 4" +OptimizationBBO = "0.1, 0.2, 0.3, 0.4" +OptimizationNLopt = "0.1, 0.2, 0.3" +OptimizationOptimJL = "0.1, 0.2, 0.3, 0.4" OrdinaryDiffEq = "6.103, 7" PenaltyFunctions = "0.3" PreallocationTools = "0.4.34, 1.0" +Random = "1" RecursiveArrayTools = "3.50, 4" SciMLBase = "2.153, 3" SciMLSensitivity = "7.80" +SteadyStateDiffEq = "2" Statistics = "1.10" StatsAPI = "1.8.0" StochasticDiffEq = "6.87, 7" -julia = "1.6" +Sundials = "4" +Test = "1" +Zygote = "0.6, 0.7" +julia = "1.10" [extras] BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209" @@ -49,6 +63,7 @@ OptimizationBBO = "3e6eede4-6085-4f62-9a71-46d9bc1eb92b" OptimizationNLopt = "4e6fcdb7-1186-4e1f-a706-475e75c168bb" OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" @@ -58,4 +73,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Test", "ExplicitImports", "BlackBoxOptim", "DelayDiffEq", "ForwardDiff", "Logging", "NLopt", "Optim", "Optimization", "OptimizationBBO", "OptimizationNLopt", "OptimizationOptimJL", "OrdinaryDiffEq", "Random", "SciMLSensitivity", "StochasticDiffEq", "SteadyStateDiffEq", "Sundials", "Zygote"] +test = ["Test", "ExplicitImports", "BlackBoxOptim", "DelayDiffEq", "ForwardDiff", "Logging", "NLopt", "Optim", "Optimization", "OptimizationBBO", "OptimizationNLopt", "OptimizationOptimJL", "OrdinaryDiffEq", "Pkg", "Random", "SciMLSensitivity", "StochasticDiffEq", "SteadyStateDiffEq", "Sundials", "Zygote"] diff --git a/test/qa/Project.toml b/test/qa/Project.toml new file mode 100644 index 0000000..b535fcd --- /dev/null +++ b/test/qa/Project.toml @@ -0,0 +1,14 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +DiffEqParamEstim = "1130ab10-4a5a-5621-a13d-e4788d82bd4c" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[sources] +DiffEqParamEstim = {path = "../.."} + +[compat] +Aqua = "0.8" +JET = "0.9,0.10,0.11" +Test = "1" +julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl new file mode 100644 index 0000000..beb946c --- /dev/null +++ b/test/qa/qa.jl @@ -0,0 +1,13 @@ +using DiffEqParamEstim, Aqua, JET, Test + +@testset "Aqua" begin + # stale_deps and deps_compat disabled: genuine findings tracked in + # https://github.com/SciML/DiffEqParamEstim.jl/issues/306 + Aqua.test_all(DiffEqParamEstim; stale_deps = false, deps_compat = false) + @test_broken false # Aqua stale_deps: Calculus is a stale dep — tracked in https://github.com/SciML/DiffEqParamEstim.jl/issues/306 + @test_broken false # Aqua deps_compat: LinearAlgebra dep + Pkg extra missing compat entries — tracked in https://github.com/SciML/DiffEqParamEstim.jl/issues/306 +end + +@testset "JET" begin + JET.test_package(DiffEqParamEstim; target_defined_modules = true) +end diff --git a/test/runtests.jl b/test/runtests.jl index 6a52905..2da5008 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,40 +1,50 @@ +using Pkg using DiffEqParamEstim, Test -@time @testset "Explicit Imports" begin - include("explicit_imports.jl") -end +const GROUP = get(ENV, "GROUP", "All") -@time @testset "Tests on ODEs" begin - include("tests_on_odes/test_problems.jl") - include("tests_on_odes/l2loss_test.jl") - include("tests_on_odes/optim_test.jl") - include("tests_on_odes/nlopt_test.jl") - include("tests_on_odes/two_stage_method_test.jl") - include("tests_on_odes/blackboxoptim_test.jl") - include("tests_on_odes/regularization_test.jl") - include("tests_on_odes/weighted_loss_test.jl") - include("tests_on_odes/l2_colloc_grad_test.jl") - #include("tests_on_odes/genetic_algorithm_test.jl") # Not updated to v0.6 -end +if GROUP == "QA" + Pkg.activate("qa") + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() + include("qa/qa.jl") +else + @time @testset "Explicit Imports" begin + include("explicit_imports.jl") + end -@time @testset "Multiple Shooting Objective" begin - include("multiple_shooting_objective_test.jl") -end -@time @testset "Likelihood Loss" begin - include("likelihood.jl") -end -@time @testset "Out-of-place ODE Tests" begin - include("out_of_place_odes.jl") -end -@time @testset "Steady State Tests" begin - include("steady_state_tests.jl") -end -@time @testset "DAE Tests" begin - include("dae_tests.jl") -end -@time @testset "DDE Tests" begin - include("dde_tests.jl") -end -@time @testset "Test on Monte" begin - include("test_on_monte.jl") + @time @testset "Tests on ODEs" begin + include("tests_on_odes/test_problems.jl") + include("tests_on_odes/l2loss_test.jl") + include("tests_on_odes/optim_test.jl") + include("tests_on_odes/nlopt_test.jl") + include("tests_on_odes/two_stage_method_test.jl") + include("tests_on_odes/blackboxoptim_test.jl") + include("tests_on_odes/regularization_test.jl") + include("tests_on_odes/weighted_loss_test.jl") + include("tests_on_odes/l2_colloc_grad_test.jl") + #include("tests_on_odes/genetic_algorithm_test.jl") # Not updated to v0.6 + end + + @time @testset "Multiple Shooting Objective" begin + include("multiple_shooting_objective_test.jl") + end + @time @testset "Likelihood Loss" begin + include("likelihood.jl") + end + @time @testset "Out-of-place ODE Tests" begin + include("out_of_place_odes.jl") + end + @time @testset "Steady State Tests" begin + include("steady_state_tests.jl") + end + @time @testset "DAE Tests" begin + include("dae_tests.jl") + end + @time @testset "DDE Tests" begin + include("dde_tests.jl") + end + @time @testset "Test on Monte" begin + include("test_on_monte.jl") + end end diff --git a/test/test_groups.toml b/test/test_groups.toml new file mode 100644 index 0000000..1fe84cd --- /dev/null +++ b/test/test_groups.toml @@ -0,0 +1,5 @@ +[Core] +versions = ["lts", "1", "pre"] + +[QA] +versions = ["lts", "1"]