-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using Test | ||
using CloudMicrophysics | ||
using Aqua | ||
|
||
@testset "Quality assurance - Aqua" begin | ||
|
||
@testset "Aqua tests (performance)" begin | ||
# This tests that we don't accidentally run into | ||
# https://github.com/JuliaLang/julia/issues/29393 | ||
ua = Aqua.detect_unbound_args_recursively(CloudMicrophysics) | ||
# Uncomment for debugging: | ||
# for unbound_arg in ua | ||
# @show unbound_arg | ||
# end | ||
|
||
# There are unbound ambiguities in CM that match this pattern: | ||
# https://github.com/JuliaTesting/Aqua.jl/issues/86 | ||
@test length(ua) <= 4 | ||
|
||
# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750 | ||
# Test that we're not introducing method ambiguities across deps | ||
ambs = Aqua.detect_ambiguities(CloudMicrophysics; recursive = true) | ||
pkg_match(pkgname, pkdir::Nothing) = false | ||
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir) | ||
filter!( | ||
x -> pkg_match("CloudMicrophysics", pkgdir(last(x).module)), | ||
ambs, | ||
) | ||
|
||
# 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. | ||
# Uncomment for debugging: | ||
# for method_ambiguity in ambs | ||
# @show method_ambiguity | ||
# end | ||
@test length(ambs) ≤ 0 | ||
end | ||
ignore = [:CUDA] | ||
@testset "Aqua tests (additional)" begin | ||
Aqua.test_undefined_exports(CloudMicrophysics) | ||
Aqua.test_stale_deps(CloudMicrophysics; ignore) | ||
Aqua.test_deps_compat(CloudMicrophysics; ignore) | ||
Aqua.test_project_extras(CloudMicrophysics) | ||
Aqua.test_project_toml_formatting(CloudMicrophysics) | ||
Aqua.test_piracy(CloudMicrophysics) | ||
end | ||
|
||
end | ||
nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters