Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Evolutionary.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module Evolutionary
using LinearAlgebra, Statistics
using LinearAlgebra: Diagonal, Symmetric, diag, diagm, eigen!, norm
using Statistics: mean
using Base: @kwdef
using UnPack: @unpack
using StackViews
using StackViews: StackView
using Random: AbstractRNG, default_rng, randperm, shuffle, randn!
using NLSolversBase: NLSolversBase, AbstractObjective, ConstraintBounds,
AbstractConstraints, nconstraints_x, nconstraints
Expand Down
8 changes: 1 addition & 7 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Evolutionary = "86b6b26d-c046-49b6-aa0b-5f0f74682bd6"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
Evolutionary = {path = "../.."}

[compat]
Aqua = "0.8"
JET = "0.9,0.10,0.11"
SafeTestsets = "0.0.1, 0.1"
SciMLTesting = "1"
SciMLTesting = "1.6"
Test = "1"
julia = "1.10"
55 changes: 30 additions & 25 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
using Evolutionary
using Aqua
using JET
using Test
using SciMLTesting, Evolutionary, Test

@testset "Quality Assurance" begin
@testset "Aqua" begin
# ambiguities, unbound_args and piracies currently fail; keep the
# other Aqua sub-checks running and mark the failing ones broken.
# Tracked in https://github.com/SciML/Evolutionary.jl/issues/145
Aqua.test_all(
Evolutionary;
ambiguities = false,
unbound_args = false,
piracies = false,
)
@test_broken false # Aqua ambiguities: 18 found in optimize overloads (src/api/optimize.jl) — tracked in https://github.com/SciML/Evolutionary.jl/issues/145
@test_broken false # Aqua unbound_args: 3 methods (src/api/expressions.jl) — tracked in https://github.com/SciML/Evolutionary.jl/issues/145
@test_broken false # Aqua piracies: 7 methods (Expr ops, replace, value) — tracked in https://github.com/SciML/Evolutionary.jl/issues/145
end
@testset "JET" begin
# JET.test_package reports errors (e.g. +(::Nothing,::Int) and kwcall
# on deprecated crossover/mutation aliases in src/deprecated.jl).
# Tracked in https://github.com/SciML/Evolutionary.jl/issues/145
@test_broken false # JET: report_package errors — tracked in https://github.com/SciML/Evolutionary.jl/issues/145
end
run_qa(
Evolutionary;
explicit_imports = true,
# ambiguities, unbound_args and piracies still fail; keep them disabled and
# tracked. https://github.com/SciML/Evolutionary.jl/issues/145
aqua_broken = (
:ambiguities, # 18 ambiguities in optimize overloads (src/api/optimize.jl)
:unbound_args, # 3 methods (src/api/expressions.jl)
:piracies, # 7 methods (Expr ops, replace, value)
),
ei_kwargs = (;
# other packages' non-public names: ignore until they go public upstream.
all_explicit_imports_are_public = (;
ignore = (
:default_rng, # Random (stdlib non-public)
:nconstraints, # NLSolversBase non-public
:nconstraints_x, # NLSolversBase non-public
),
),
),
)

# JET surfaces method/typo errors only on Julia >= 1.12 (the QA `1` lane), while the
# LTS lane is clean, so neither a hard JET check (fails 1.12) nor `jet_broken = true`
# (auto-flags an Unexpected Pass on the clean LTS lane) is correct across the matrix.
# Keep the finding tracked as a static broken placeholder.
# https://github.com/SciML/Evolutionary.jl/issues/145
@testset "JET" begin
@test_broken false # report_package: +(::Nothing,::Int), kwcall on SPX, Evolutionary.expr (Julia >= 1.12)
end
Loading