From 5c05eb50d6330e488b5590855c6b9a7f1f300a33 Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Wed, 29 Nov 2023 13:44:57 +0100 Subject: [PATCH] Aqua + typos CI --- .github/workflows/SpellCheck.yml | 13 +++++++++++++ .typos.toml | 4 ++++ Project.toml | 10 +++++++++- test/qa.jl | 12 ++++++++++++ test/runtests.jl | 2 ++ 5 files changed, 40 insertions(+), 1 deletion(-) 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 00000000..599253c8 --- /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 00000000..e004d221 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,4 @@ +[default.extend-words] +nd = "nd" +dout = "dout" +Missings = "Missings" \ No newline at end of file diff --git a/Project.toml b/Project.toml index 9b9c9a07..ea55089d 100644 --- a/Project.toml +++ b/Project.toml @@ -31,6 +31,7 @@ IntegralsForwardDiffExt = "ForwardDiff" IntegralsZygoteExt = ["Zygote", "ChainRulesCore"] [compat] +Aqua = "0.8" Arblib = "1" ChainRulesCore = "0.10.7, 1" CommonSolve = "0.2" @@ -38,18 +39,25 @@ Cuba = "2" Cubature = "1" Distributions = "0.23, 0.24, 0.25" FastGaussQuadrature = "0.5" +FiniteDiff = "2" ForwardDiff = "0.10" HCubature = "1.4" LinearAlgebra = "1.9" MonteCarloIntegration = "0.0.1, 0.0.2, 0.0.3, 0.1" +Pkg = "1" QuadGK = "2.9" Reexport = "0.2, 1.0" Requires = "1" +SafeTestsets = "0.1" SciMLBase = "2.6" +SciMLSensitivity = "7" +StaticArrays = "1" +Test = "1" Zygote = "0.4.22, 0.5, 0.6" julia = "1.9" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Arblib = "fb37089c-8514-4489-9461-98f9c8763369" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Cuba = "8a292aeb-7a57-582c-b821-06e4c11590b1" @@ -66,4 +74,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Arblib", "SciMLSensitivity", "StaticArrays", "FiniteDiff", "Pkg", "SafeTestsets", "Test", "Distributions", "ForwardDiff", "Zygote", "ChainRulesCore", "FastGaussQuadrature", "Cuba", "Cubature"] +test = ["Aqua", "Arblib", "SciMLSensitivity", "StaticArrays", "FiniteDiff", "Pkg", "SafeTestsets", "Test", "Distributions", "ForwardDiff", "Zygote", "ChainRulesCore", "FastGaussQuadrature", "Cuba", "Cubature"] diff --git a/test/qa.jl b/test/qa.jl new file mode 100644 index 00000000..ccf11830 --- /dev/null +++ b/test/qa.jl @@ -0,0 +1,12 @@ +using Integrals, Aqua +@testset "Aqua" begin + Aqua.find_persistent_tasks_deps(Integrals) + Aqua.test_ambiguities(Integrals, recursive = false) + Aqua.test_deps_compat(Integrals) + Aqua.test_piracies(Integrals, + treat_as_own = [IntegralProblem, SampledIntegralProblem]) + Aqua.test_project_extras(Integrals) + Aqua.test_stale_deps(Integrals) + Aqua.test_unbound_args(Integrals) + Aqua.test_undefined_exports(Integrals) +end diff --git a/test/runtests.jl b/test/runtests.jl index 0e4390a4..8d15e5b9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,8 @@ using Pkg using SafeTestsets using Test + +@time @safetestset "Quality Assurance" include("qa.jl") @time @safetestset "Interface Tests" include("interface_tests.jl") @time @safetestset "Derivative Tests" include("derivative_tests.jl") @time @safetestset "Infinite Integral Tests" include("inf_integral_tests.jl")