Skip to content

Commit

Permalink
Aqua CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoStrouwen committed Dec 29, 2023
1 parent 416ca0a commit cfa45b0
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 54 deletions.
7 changes: 7 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ SciMLBaseZygoteExt = "Zygote"

[compat]
ADTypes = "0.2.5"
Aqua = "0.8"
ArrayInterface = "7.6"
ChainRules = "1.58.0"
ChainRulesCore = "1.18"
CommonSolve = "0.2.4"
ConstructionBase = "1.5"
DataFrames = "1.6"
DelayDiffEq = "5"
Distributed = "1.9"
DocStringExtensions = "0.9"
EnumX = "1"
Expand All @@ -66,7 +68,9 @@ LinearAlgebra = "1.9"
Logging = "1.9"
Markdown = "1.9"
ModelingToolkit = "8.74"
OrdinaryDiffEq = "6"
PartialFunctions = "1.1"
Pkg = "1"
PrecompileTools = "1.2"
Preferences = "1.3"
Printf = "1.9"
Expand All @@ -77,12 +81,15 @@ RecipesBase = "1.0"
RecursiveArrayTools = "3.0"
Reexport = "1"
RuntimeGeneratedFunctions = "0.5"
SafeTestsets = "0.1"
SciMLOperators = "0.3.7"
StaticArrays = "1.7"
StaticArraysCore = "1.4"
Statistics = "1.9"
StochasticDiffEq = "6"
SymbolicIndexingInterface = "0.3"
Tables = "1.11"
Test = "1"
TruncatedStacktraces = "1.4"
Zygote = "0.6.67"
julia = "1.9"
Expand Down
3 changes: 2 additions & 1 deletion src/operators/basic_operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ end

Base.adjoint(L::FactorizedDiffEqArrayOperator) = FactorizedDiffEqArrayOperator(L.F')
Base.size(L::FactorizedDiffEqArrayOperator, args...) = size(L.F, args...)
Base.size(L::FactorizedDiffEqArrayOperator, i::Integer) = size(L.F, i)

Check warning on line 189 in src/operators/basic_operators.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/basic_operators.jl#L189

Added line #L189 was not covered by tests
function LinearAlgebra.ldiv!(Y::AbstractVecOrMat, L::FactorizedDiffEqArrayOperator,
B::AbstractVecOrMat)
ldiv!(Y, L.F, B)
Expand All @@ -202,5 +203,5 @@ has_ldiv!(::FactorizedDiffEqArrayOperator) = true
# The (u,p,t) and (du,u,p,t) interface
for T in [DiffEqScalar, DiffEqArrayOperator, FactorizedDiffEqArrayOperator, DiffEqIdentity]
(L::T)(u, p, t) = (update_coefficients!(L, u, p, t); L * u)
(L::T)(du, u, p, t) = (update_coefficients!(L, u, p, t); mul!(du, L, u))
(L::T)(du::AbstractArray, u::AbstractArray, p, t) = (update_coefficients!(L, u, p, t); mul!(du, L, u))

Check warning on line 206 in src/operators/basic_operators.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/basic_operators.jl#L206

Added line #L206 was not covered by tests
end
2 changes: 1 addition & 1 deletion src/operators/diffeq_operator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function (L::AffineDiffEqOperator)(u, p, t::Number)
du
end

function (L::AffineDiffEqOperator)(du, u, p, t::Number)
function (L::AffineDiffEqOperator)(du::AbstractArray, u::AbstractArray, p, t::Number)

Check warning on line 49 in src/operators/diffeq_operator.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/diffeq_operator.jl#L49

Added line #L49 was not covered by tests
update_coefficients!(L, u, p, t)
L.du_cache === nothing &&
error("Can only use inplace AffineDiffEqOperator if du_cache is given.")
Expand Down
34 changes: 0 additions & 34 deletions test/aqua.jl

This file was deleted.

11 changes: 11 additions & 0 deletions test/qa.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using SciMLBase, Aqua
@testset "Aqua" begin
Aqua.find_persistent_tasks_deps(SciMLBase)
Aqua.test_ambiguities(SciMLBase, recursive = false)
Aqua.test_deps_compat(SciMLBase)
Aqua.test_piracies(SciMLBase)
Aqua.test_project_extras(SciMLBase)
Aqua.test_stale_deps(SciMLBase)
Aqua.test_unbound_args(SciMLBase)
Aqua.test_undefined_exports(SciMLBase)
end
30 changes: 12 additions & 18 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ using SafeTestsets
using Test
using SciMLBase

# https://github.com/JuliaArrays/FillArrays.jl/pull/163
@test_broken isempty(detect_ambiguities(SciMLBase))

const GROUP = get(ENV, "GROUP", "All")
const is_APPVEYOR = (Sys.iswindows() && haskey(ENV, "APPVEYOR"))

function activate_downstream_env()
Pkg.activate("downstream")
Expand All @@ -23,8 +19,8 @@ end

@time begin
if GROUP == "Core" || GROUP == "All"
@time @safetestset "Aqua" begin
include("aqua.jl")
@time @safetestset "Quality Assurance" begin
include("qa.jl")
end
@time @safetestset "Display" begin
include("display.jl")
Expand Down Expand Up @@ -64,7 +60,7 @@ end
end
end

if !is_APPVEYOR && GROUP == "Downstream"
if GROUP == "Downstream"
activate_downstream_env()
@time @safetestset "Ensembles of Zero Length Solutions" begin
include("downstream/ensemble_zero_length.jl")
Expand All @@ -87,16 +83,14 @@ end
@time @safetestset "Symbol and integer based indexing of interpolated solutions" begin
include("downstream/symbol_indexing.jl")
end
if VERSION >= v"1.8"
@time @safetestset "Symbol and integer based indexing of integrators" begin
include("downstream/integrator_indexing.jl")
end
@time @safetestset "Problem Indexing" begin
include("downstream/problem_interface.jl")
end
@time @safetestset "Solution Indexing" begin
include("downstream/solution_interface.jl")
end
@time @safetestset "Symbol and integer based indexing of integrators" begin
include("downstream/integrator_indexing.jl")
end
@time @safetestset "Problem Indexing" begin
include("downstream/problem_interface.jl")
end
@time @safetestset "Solution Indexing" begin
include("downstream/solution_interface.jl")
end
@time @safetestset "Unitful interpolations" begin
include("downstream/unitful_interpolations.jl")
Expand All @@ -112,7 +106,7 @@ end
end
end

if !is_APPVEYOR && GROUP == "Python"
if GROUP == "Python"
activate_python_env()
@time @safetestset "PyCall" begin
include("python/pycall.jl")
Expand Down

0 comments on commit cfa45b0

Please sign in to comment.