From 1a99035b231d85ee020ef2bfda86455b9eafe1a7 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 4 Jan 2024 09:50:17 -0500 Subject: [PATCH] Update --- Project.toml | 7 ++++ test/AquaTest.jl | 13 +++---- test/runtests.jl | 90 ++++++++++++++++++++++++------------------------ 3 files changed, 57 insertions(+), 53 deletions(-) diff --git a/Project.toml b/Project.toml index 6355850d..0eea8826 100644 --- a/Project.toml +++ b/Project.toml @@ -22,16 +22,23 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" ForwardDiffStaticArraysExt = "StaticArrays" [compat] +Aqua = "0.8" Calculus = "0.5" CommonSubexpressions = "0.3" DiffResults = "1.1" DiffRules = "1.4" DiffTests = "0.1" +InteractiveUtils = "1" +LinearAlgebra = "1" LogExpFunctions = "0.3" NaNMath = "1" Preferences = "1" +Printf = "1" +Random = "1" +SparseArrays = "1" SpecialFunctions = "1, 2" StaticArrays = "1.5" +Test = "1" julia = "1.6" [extras] diff --git a/test/AquaTest.jl b/test/AquaTest.jl index d22cf692..8d890b9d 100644 --- a/test/AquaTest.jl +++ b/test/AquaTest.jl @@ -2,12 +2,14 @@ using Test using ForwardDiff using Aqua -@testset "Aqua tests (performance)" begin +@testset "Aqua tests - unbound_args" begin # This tests that we don't accidentally run into # https://github.com/JuliaLang/julia/issues/29393 ua = Aqua.detect_unbound_args_recursively(ForwardDiff) @test length(ua) == 6 +end +@testset "Aqua tests - ambiguities" begin # See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750 # Test that we're not introducing method ambiguities across deps ambs = Aqua.detect_ambiguities(ForwardDiff; recursive = true) @@ -18,13 +20,8 @@ using Aqua @test length(ambs) == 0 end -@testset "Aqua tests (additional)" begin - Aqua.test_undefined_exports(ForwardDiff) - Aqua.test_stale_deps(ForwardDiff) - Aqua.test_deps_compat(ForwardDiff) - Aqua.test_project_extras(ForwardDiff) - Aqua.test_project_toml_formatting(ForwardDiff) - Aqua.test_piracy(ForwardDiff) +@testset "Aqua tests - remaining" begin + Aqua.test_all(ForwardDiff; ambiguities = false, unbound_args = false) end nothing diff --git a/test/runtests.jl b/test/runtests.jl index 8f920c90..dafea026 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,51 +6,51 @@ Random.seed!(SEED) @testset "ForwardDiff.jl" begin t0 = time() - @testset "Partials" begin - println("##### Testing Partials...") - t = @elapsed include("PartialsTest.jl") - println("##### done (took $t seconds).") - end - @testset "Dual" begin - println("##### Testing Dual...") - t = @elapsed include("DualTest.jl") - println("##### done (took $t seconds).") - end - @testset "Derivatives" begin - println("##### Testing derivative functionality...") - t = @elapsed include("DerivativeTest.jl") - println("##### done (took $t seconds).") - end - @testset "Gradients" begin - println("##### Testing gradient functionality...") - t = @elapsed include("GradientTest.jl") - println("##### done (took $t seconds).") - end - @testset "Jacobians" begin - println("##### Testing jacobian functionality...") - t = @elapsed include("JacobianTest.jl") - println("##### done (took $t seconds).") - end - @testset "Hessians" begin - println("##### Testing hessian functionality...") - t = @elapsed include("HessianTest.jl") - println("##### done (took $t seconds).") - end - @testset "Perturbation Confusion" begin - println("##### Testing perturbation confusion functionality...") - t = @elapsed include("ConfusionTest.jl") - println("##### done (took $t seconds).") - end - @testset "Miscellaneous" begin - println("##### Testing miscellaneous functionality...") - t = @elapsed include("MiscTest.jl") - println("##### done (took $t seconds).") - end - @testset "Allocations" begin - println("##### Testing allocations...") - t = @elapsed include("AllocationsTest.jl") - println("##### done (took $t seconds).") - end + # @testset "Partials" begin + # println("##### Testing Partials...") + # t = @elapsed include("PartialsTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Dual" begin + # println("##### Testing Dual...") + # t = @elapsed include("DualTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Derivatives" begin + # println("##### Testing derivative functionality...") + # t = @elapsed include("DerivativeTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Gradients" begin + # println("##### Testing gradient functionality...") + # t = @elapsed include("GradientTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Jacobians" begin + # println("##### Testing jacobian functionality...") + # t = @elapsed include("JacobianTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Hessians" begin + # println("##### Testing hessian functionality...") + # t = @elapsed include("HessianTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Perturbation Confusion" begin + # println("##### Testing perturbation confusion functionality...") + # t = @elapsed include("ConfusionTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Miscellaneous" begin + # println("##### Testing miscellaneous functionality...") + # t = @elapsed include("MiscTest.jl") + # println("##### done (took $t seconds).") + # end + # @testset "Allocations" begin + # println("##### Testing allocations...") + # t = @elapsed include("AllocationsTest.jl") + # println("##### done (took $t seconds).") + # end @testset "Aqua" begin println("##### Testing aqua...") t = @elapsed include("AquaTest.jl")