diff --git a/Project.toml b/Project.toml index 366ff131ff..e2426008aa 100644 --- a/Project.toml +++ b/Project.toml @@ -59,6 +59,7 @@ MTKBifurcationKitExt = "BifurcationKit" MTKDeepDiffsExt = "DeepDiffs" [compat] +Aqua = "0.8" AbstractTrees = "0.3, 0.4" ArrayInterface = "6, 7" Combinatorics = "1" @@ -108,6 +109,7 @@ julia = "1.9" [extras] AmplNLWriter = "7c4d4715-977e-5154-bfe0-e096adeac482" +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" ControlSystemsMTK = "687d7614-c7e5-45fc-bfc3-9ee385575c88" @@ -132,4 +134,4 @@ Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AmplNLWriter", "BenchmarkTools", "BifurcationKit", "ControlSystemsMTK", "NonlinearSolve", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials", "StochasticDelayDiffEq"] +test = ["AmplNLWriter", "Aqua", "BenchmarkTools", "BifurcationKit", "ControlSystemsMTK", "NonlinearSolve", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials", "StochasticDelayDiffEq"] diff --git a/test/qa.jl b/test/qa.jl new file mode 100644 index 0000000000..66c126dcde --- /dev/null +++ b/test/qa.jl @@ -0,0 +1,12 @@ +using ModelingToolkit, Aqua +@testset "Aqua" begin + Aqua.find_persistent_tasks_deps(ModelingToolkit) + Aqua.test_ambiguities(ModelingToolkit, recursive = false) + Aqua.test_deps_compat(ModelingToolkit) + Aqua.test_piracies(ModelingToolkit, + treat_as_own = []) + Aqua.test_project_extras(ModelingToolkit) + Aqua.test_stale_deps(ModelingToolkit) + Aqua.test_unbound_args(ModelingToolkit) + Aqua.test_undefined_exports(ModelingToolkit) +end diff --git a/test/runtests.jl b/test/runtests.jl index 65a16e8d0c..8f38a7bbb1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using SafeTestsets, Test +@safetestset "Quality Assurance" include("qa.jl") @safetestset "Linear Algebra Test" include("linalg.jl") @safetestset "AbstractSystem Test" include("abstractsystem.jl") @safetestset "Variable Scope Tests" include("variable_scope.jl")