From 2c9e146251c9395e93c53824b52145e86388c681 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Mon, 11 Mar 2024 18:34:28 +0100 Subject: [PATCH 1/2] add test using ExplicitImports.jl --- src/DispersiveShallowWater.jl | 14 +++++++------- test/Project.toml | 1 + test/test_aqua.jl | 3 +++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/DispersiveShallowWater.jl b/src/DispersiveShallowWater.jl index cff382c0..8be20bff 100644 --- a/src/DispersiveShallowWater.jl +++ b/src/DispersiveShallowWater.jl @@ -1,16 +1,16 @@ module DispersiveShallowWater -using DiffEqBase -using Interpolations -using LinearAlgebra: mul!, ldiv!, factorize, I, Diagonal -using PolynomialBases +using DiffEqBase: DiffEqBase, SciMLBase, terminate! +using Interpolations: Interpolations, linear_interpolation +using LinearAlgebra: mul!, I, Diagonal +using PolynomialBases: PolynomialBases using Printf: @printf, @sprintf -using RecipesBase +using RecipesBase: RecipesBase, @recipe, @series using Reexport: @reexport using Roots: AlefeldPotraShi, find_zero -using SciMLBase: CallbackSet, DiscreteCallback, ODEProblem, ODESolution -import SciMLBase: get_tmp_cache, u_modified! +using SciMLBase: DiscreteCallback, ODEProblem, ODESolution +import SciMLBase: u_modified! @reexport using StaticArrays: SVector using SimpleUnPack: @unpack diff --git a/test/Project.toml b/test/Project.toml index 79505b70..ce728fb3 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,6 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" diff --git a/test/test_aqua.jl b/test/test_aqua.jl index 614dd06b..a5b9b7f2 100644 --- a/test/test_aqua.jl +++ b/test/test_aqua.jl @@ -1,12 +1,15 @@ module TestAqua using Aqua +using ExplicitImports using Test using DispersiveShallowWater @testset "Aqua.jl" begin Aqua.test_all(DispersiveShallowWater, ambiguities = false) + @test isnothing(check_no_implicit_imports(DispersiveShallowWater)) + @test isnothing(check_no_stale_explicit_imports(DispersiveShallowWater)) end end #module From 7179cf1d2cb86a07a1125b0002509151424b3155 Mon Sep 17 00:00:00 2001 From: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:59:18 +0100 Subject: [PATCH 2/2] Update test/test_aqua.jl Co-authored-by: Hendrik Ranocha --- test/test_aqua.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_aqua.jl b/test/test_aqua.jl index a5b9b7f2..532ac601 100644 --- a/test/test_aqua.jl +++ b/test/test_aqua.jl @@ -1,7 +1,7 @@ module TestAqua using Aqua -using ExplicitImports +using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports using Test using DispersiveShallowWater