Skip to content

Commit

Permalink
aqua CI and related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Jan 3, 2024
1 parent 3689da7 commit c9112bf
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,27 @@ FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
JumpProcessFastBroadcastExt = "FastBroadcast"

[compat]
ArrayInterface = "6, 7"
DataStructures = "0.17, 0.18"
ArrayInterface = "7"
DataStructures = "0.18"
DiffEqBase = "6.122"
DocStringExtensions = "0.8.6, 0.9"
DocStringExtensions = "0.9"
FastBroadcast = "0.2.6"
FunctionWrappers = "1.0"
Graphs = "1.4"
LinearAlgebra = "1.9"
Markdown = "1.9"
PoissonRandom = "0.4"
Random = "1.9"
RandomNumbers = "1.3"
RecursiveArrayTools = "2, 3"
RecursiveArrayTools = "3"
Reexport = "0.2, 1.0"
SciMLBase = "1.51, 2"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
SciMLBase = "2.15.2"
StaticArrays = "1.0"
UnPack = "1.0.2"
julia = "1.6"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -55,4 +60,4 @@ StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DiffEqCallbacks", "LinearAlgebra", "OrdinaryDiffEq", "SafeTestsets", "StableRNGs", "Statistics", "StochasticDiffEq", "Test", "FastBroadcast"]
test = ["Aqua", "DiffEqCallbacks", "LinearAlgebra", "OrdinaryDiffEq", "SafeTestsets", "StableRNGs", "Statistics", "StochasticDiffEq", "Test", "FastBroadcast"]
34 changes: 34 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Test
using JumpProcesses
using Aqua

@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(JumpProcesses)

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

# Uncomment for debugging:
# for method_ambiguity in ambs
# @show method_ambiguity
# end
@warn "Number of method ambiguities: $(length(ambs))"
@test length(ambs) <= 8
end

@testset "Aqua tests (additional)" begin
Aqua.test_undefined_exports(JumpProcesses)
Aqua.test_stale_deps(JumpProcesses)
Aqua.test_deps_compat(JumpProcesses, check_extras = false)
Aqua.test_project_extras(JumpProcesses)
# Aqua.test_project_toml_formatting(JumpProcesses) # failing
# Aqua.test_piracy(JumpProcesses) # failing
end

nothing
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using JumpProcesses, DiffEqBase, SafeTestsets

@time begin
@time @safetestset "Aqua" begin include("aqua.jl") end
@time @safetestset "Constant Rate Tests" begin include("constant_rate.jl") end
@time @safetestset "Variable Rate Tests" begin include("variable_rate.jl") end
@time @safetestset "ExtendedJumpArray Tests" begin include("extended_jump_array.jl") end
Expand Down

0 comments on commit c9112bf

Please sign in to comment.