Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jan 4, 2024
1 parent 5639465 commit 1a99035
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 53 deletions.
7 changes: 7 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
13 changes: 5 additions & 8 deletions test/AquaTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
90 changes: 45 additions & 45 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1a99035

Please sign in to comment.