Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aqua tests #356

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
using Test
import RRTMGP
using RRTMGP
using Aqua

@testset "Aqua tests - unbound args" begin
@testset "Aqua tests (performance)" begin
# This tests that we don't accidentally run into
# https://github.com/JuliaLang/julia/issues/29393
Aqua.test_unbound_args(RRTMGP)
# Aqua.test_unbound_args(RRTMGP)
ua = Aqua.detect_unbound_args_recursively(RRTMGP)
@test length(ua) == 0

# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750
# Test that we're not introducing method ambiguities across deps
Aqua.test_ambiguities(RRTMGP; recursive = true)
ambs = Aqua.detect_ambiguities(RRTMGP; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("RRTMGP", pkgdir(last(x).module)), ambs)

# Uncomment for debugging:
# for method_ambiguity in ambs
# @show method_ambiguity
# end
@test length(ambs) == 0
end

@testset "Aqua tests (additional)" begin
Aqua.test_undefined_exports(RRTMGP)
Aqua.test_stale_deps(RRTMGP)
Aqua.test_deps_compat(RRTMGP)
Aqua.test_project_extras(RRTMGP)
Aqua.test_project_toml_formatting(RRTMGP)
Aqua.test_piracy(RRTMGP)
end

nothing