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

Add Aqua.jl testing #1628

Merged
merged 11 commits into from
Sep 20, 2023
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Build Status](https://github.com/trixi-framework/Trixi.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/Trixi.jl/actions?query=workflow%3ACI)
[![Codecov](https://codecov.io/gh/trixi-framework/Trixi.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/Trixi.jl)
[![Coveralls](https://coveralls.io/repos/github/trixi-framework/Trixi.jl/badge.svg?branch=main)](https://coveralls.io/github/trixi-framework/Trixi.jl?branch=main)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)
[![Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/Trixi)](https://pkgs.genieframework.com?packages=Trixi)
Expand Down
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Build Status](https://github.com/trixi-framework/Trixi.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/Trixi.jl/actions?query=workflow%3ACI)
[![Codecov](https://codecov.io/gh/trixi-framework/Trixi.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/Trixi.jl)
[![Coveralls](https://coveralls.io/repos/github/trixi-framework/Trixi.jl/badge.svg?branch=main)](https://coveralls.io/github/trixi-framework/Trixi.jl?branch=main)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)

Expand Down
20 changes: 11 additions & 9 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
[compat]
BSON = "0.3.3"
CairoMakie = "0.6, 0.7, 0.8, 0.9, 0.10"
Flux = "0.13 - 0.13.12" # TODO: Return to "0.13" once https://github.com/FluxML/Flux.jl/issues/2204 is resolved
sloede marked this conversation as resolved.
Show resolved Hide resolved
ForwardDiff = "0.10"
MPI = "0.20"
OrdinaryDiffEq = "6.49.1"
Plots = "1.16"

[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand All @@ -21,6 +13,16 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.7"
BSON = "0.3.3"
CairoMakie = "0.6, 0.7, 0.8, 0.9, 0.10"
Flux = "0.13.15, 0.14"
ForwardDiff = "0.10"
MPI = "0.20"
OrdinaryDiffEq = "6.49.1"
Plots = "1.16"

[preferences.OrdinaryDiffEq]
PrecompileAutoSpecialize = false
PrecompileAutoSwitch = false
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3)

@time if TRIXI_TEST == "all" || TRIXI_TEST == "misc_part2"
include("test_special_elixirs.jl")
include("test_aqua.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "performance_specializations_part1"
Expand Down
18 changes: 18 additions & 0 deletions test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module TestAqua

using Aqua
using Test
using Trixi

include("test_trixi.jl")

@timed_testset "Aqua.jl" begin
Aqua.test_all(Trixi,
ambiguities = false,
# exceptions necessary for adding a new method `StartUpDG.estimate_h`
# in src/solvers/dgmulti/sbp.jl
piracy = (treat_as_own = [Trixi.StartUpDG.RefElemData,
Trixi.StartUpDG.MeshData],))
end

end #module
2 changes: 1 addition & 1 deletion test/test_tree_2d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")
@trixi_testset "elixir_euler_sedov_blast_wave_neuralnetwork_perssonperaire.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_sedov_blast_wave_neuralnetwork_perssonperaire.jl"),
l2 = [0.0845430093623868, 0.09271459184623232, 0.09271459184623232, 0.4377291875101709],
linf = [1.3608553480069898, 1.6822884847136004, 1.6822884847135997, 4.220147414536653],
linf = [1.3608553480069898, 1.6822884847136004, 1.6822884847135997, 4.2201475428867035],
maxiters = 30,
coverage_override = (maxiters=6,))
end
Expand Down