Skip to content

Commit

Permalink
Add aqua test
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Oct 6, 2022
1 parent 03814a4 commit d3f1697
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ using Aqua
# This tests that we don't accidentally run into
# https://github.com/JuliaLang/julia/issues/29393
Aqua.test_unbound_args(ClimaAtmos)

# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750
# Test that we're not introducing method ambiguities across deps
ambs = Aqua.detect_ambiguities(ClimaAtmos; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("ClimaAtmos", pkgdir(last(x).module)), ambs)
for method_ambiguity in ambs
@show method_ambiguity
end
# If the number of ambiguities is less than the limit below,
# then please lower the limit based on the new number of ambiguities.
# We're trying to drive this number down to zero to reduce latency.
@info "Number of method ambiguities: $(length(ambs))"
@test length(ambs) 100

# returns a vector of all unbound args
# ua = Aqua.detect_unbound_args_recursively(ClimaCore)
end

nothing

0 comments on commit d3f1697

Please sign in to comment.