diff --git a/src/Evolutionary.jl b/src/Evolutionary.jl index 114d31f..bc1fff1 100644 --- a/src/Evolutionary.jl +++ b/src/Evolutionary.jl @@ -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 diff --git a/test/qa/Project.toml b/test/qa/Project.toml index f226efb..e2e6300 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -1,8 +1,5 @@ [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" @@ -10,9 +7,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" 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" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index b5fe9fa..994c639 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -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