Skip to content

Commit

Permalink
Aqua CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoStrouwen committed Dec 28, 2023
1 parent aa744e5 commit e19951e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
13 changes: 12 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Aqua = "0.8"
Cubature = "1"
Distributions = "0.21, 0.22, 0.23, 0.24, 0.25"
ExtendableSparse = "1"
Flux = "0.12, 0.13"
ForwardDiff = "0.10"
GLM = "1.3"
IterativeSolvers = "0.9"
LinearAlgebra = "1.9"
PolyChaos = "0.2"
Pkg = "1"
QuadGK = "2"
QuasiMonteCarlo = "0.3"
SafeTestsets = "0.1"
SparseArrays = "1.9"
Statistics = "1"
Test = "1"
Tracker = "0.2"
Zygote = "0.4, 0.5, 0.6"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Cubature = "667455a9-e2ce-5579-9412-b964f529a492"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand All @@ -38,4 +49,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"

[targets]
test = ["Cubature", "SafeTestsets", "Flux", "ForwardDiff", "PolyChaos", "QuadGK", "Test", "Tracker", "Pkg"]
test = ["Aqua", "Cubature", "SafeTestsets", "Flux", "ForwardDiff", "PolyChaos", "QuadGK", "Test", "Tracker", "Pkg"]
2 changes: 1 addition & 1 deletion src/Optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ function surrogate_optimize(obj, rtea::RTEA, lb, ub, surrRTEAND::AbstractSurroga
return pareto_set, pareto_front
end

function surrogate_optimize(obj::Function, ::EI, lb, ub, krig, sample_type::SectionSample;
function surrogate_optimize(obj::Function, ::EI, lb::AbstractArray, ub::AbstractArray, krig, sample_type::SectionSample;
maxiters = 100, num_new_samples = 100)
dtol = 1e-3 * norm(ub - lb)
eps = 0.01
Expand Down
5 changes: 2 additions & 3 deletions src/Surrogates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export LobachevskyStructure,
SecondOrderPolynomialStructure
export WendlandStructure
export AbstractSurrogate, SamplingAlgorithm
export Kriging, RadialBasis, add_point!, current_estimate, std_error_at_point
export Kriging, RadialBasis, add_point!, std_error_at_point
# Parallelization Strategies
export potential_optimal_points
export MinimumConstantLiar, MaximumConstantLiar, MeanConstantLiar, KrigingBeliever,
Expand All @@ -104,10 +104,9 @@ export sample, GridSample, RandomSample, SobolSample, LatinHypercubeSample,
export RandomSample, KroneckerSample, GoldenSample, SectionSample

# Optimization algorithms
export SRBF, LCBS, EI, DYCORS, SOP, EGO, RTEA, SMB, surrogate_optimize
export SRBF, LCBS, EI, DYCORS, SOP, RTEA, SMB, surrogate_optimize
export LobachevskySurrogate, lobachevsky_integral, lobachevsky_integrate_dimension
export LinearSurrogate
export SVMSurrogate
export InverseDistanceSurrogate
export SecondOrderPolynomialSurrogate
export Wendland
Expand Down
11 changes: 11 additions & 0 deletions test/qa.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Surrogates, Aqua
@testset "Aqua" begin
Aqua.find_persistent_tasks_deps(Surrogates)
Aqua.test_ambiguities(Surrogates, recursive = false)
Aqua.test_deps_compat(Surrogates)
Aqua.test_piracies(Surrogates, broken = true)
Aqua.test_project_extras(Surrogates)
Aqua.test_stale_deps(Surrogates)
Aqua.test_unbound_args(Surrogates)
Aqua.test_undefined_exports(Surrogates)
end
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ function dev_subpkg(subpkg)
end

@testset "Surrogates" begin
@safetestset "Quality Assurance" begin
include("qa.jl")
end
@testset "Libs" begin
@testset "$pkg" for pkg in [
"SurrogatesAbstractGPs", "SurrogatesFlux",
Expand Down

0 comments on commit e19951e

Please sign in to comment.