From d985656f68bbe1d38b2080ee03d4a9508651a56c Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Wed, 29 Nov 2023 14:35:44 +0100 Subject: [PATCH] Aqua + typos CI --- .github/workflows/SpellCheck.yml | 13 +++++++++++++ .typos.toml | 2 ++ Project.toml | 12 ++++++++++++ test/Project.toml | 2 ++ test/qa.jl | 13 +++++++++++++ test/runtests.jl | 1 + 6 files changed, 43 insertions(+) create mode 100644 .github/workflows/SpellCheck.yml create mode 100644 .typos.toml create mode 100644 test/qa.jl diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 000000000..599253c8c --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,13 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v3 + - name: Check spelling + uses: crate-ci/typos@v1.16.23 \ No newline at end of file diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000..f66c8bab9 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +AGS = "AGS" \ No newline at end of file diff --git a/Project.toml b/Project.toml index 431e82167..c2b9e5373 100644 --- a/Project.toml +++ b/Project.toml @@ -46,13 +46,25 @@ ArrayInterface = "6, 7" ConsoleProgressMonitor = "0.1" DocStringExtensions = "0.8, 0.9" Enzyme = "0.11.2" +FiniteDiff = "2" +ForwardDiff = "0.10" +LinearAlgebra = "1" +Logging = "1" LoggingExtras = "0.4, 0.5, 1" +ModelingToolkit = "8" +Pkg = "1" +Printf = "1" ProgressLogging = "0.1" Reexport = "0.2, 1.0" Requires = "1.0" +ReverseDiff = "1" SciMLBase = "1.79.0, 2" +SparseArrays = "1" +SparseDiffTools = "2" Symbolics = "5" TerminalLoggers = "0.1" +Tracker = "0.2" +Zygote = "0.6" julia = "1.6" [extras] diff --git a/test/Project.toml b/test/Project.toml index 60d7dbcbf..1f21a4e6a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" @@ -26,6 +27,7 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] +Aqua = "0.8" ComponentArrays = ">= 0.13.9" DiffEqFlux = ">= 2" Enzyme = ">= 0.11.0" diff --git a/test/qa.jl b/test/qa.jl new file mode 100644 index 000000000..6da7ee249 --- /dev/null +++ b/test/qa.jl @@ -0,0 +1,13 @@ +using Optimization, Aqua +@testset "Aqua" begin + Aqua.find_persistent_tasks_deps(Optimization) + Aqua.test_ambiguities(Optimization, recursive = false) + Aqua.test_deps_compat(Optimization) + Aqua.test_piracies(Optimization, + treat_as_own = [OptimizationProblem, + Optimization.SciMLBase.AbstractOptimizationCache]) + Aqua.test_project_extras(Optimization) + Aqua.test_stale_deps(Optimization) + Aqua.test_unbound_args(Optimization) + Aqua.test_undefined_exports(Optimization) +end diff --git a/test/runtests.jl b/test/runtests.jl index 5d35ad22e..ca1a60aca 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,6 +22,7 @@ end @time begin if GROUP == "All" || GROUP == "Core" + @safetestset "Quality Assurance" include("qa.jl") VERSION >= v"1.9" && @safetestset "AD Tests" begin include("ADtests.jl") end