diff --git a/Project.toml b/Project.toml index c89697d3..911613e8 100644 --- a/Project.toml +++ b/Project.toml @@ -29,7 +29,6 @@ CommonSolve = "0.2" ConcreteStructs = "0.2" DiffEqBase = "6.176.0, 7.0" Documenter = "1" -ExplicitImports = "1" FastClosures = "0.3" ForwardDiff = "0.10, 1" Functors = "0.4, 0.5" @@ -51,7 +50,7 @@ PrecompileTools = "1.2.1" Random = "1.10" SciMLBase = "2, 3.3" SciMLSensitivity = "7.43" -SciMLTesting = "1" +SciMLTesting = "1.7" StableRNGs = "1" Static = "1" SteadyStateDiffEq = "2.5.0" @@ -62,7 +61,6 @@ julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" @@ -82,4 +80,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Aqua", "Documenter", "ExplicitImports", "ForwardDiff", "Functors", "GPUArraysCore", "InteractiveUtils", "LuxCUDA", "LuxTestUtils", "MLDataDevices", "NLsolve", "NonlinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqAdamsBashforthMoulton", "SafeTestsets", "SciMLSensitivity", "SciMLTesting", "StableRNGs", "Test", "Zygote"] +test = ["Aqua", "Documenter", "ForwardDiff", "Functors", "GPUArraysCore", "InteractiveUtils", "LuxCUDA", "LuxTestUtils", "MLDataDevices", "NLsolve", "NonlinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqAdamsBashforthMoulton", "SafeTestsets", "SciMLSensitivity", "SciMLTesting", "StableRNGs", "Test", "Zygote"] diff --git a/src/DeepEquilibriumNetworks.jl b/src/DeepEquilibriumNetworks.jl index 2f2a1950..22f103f3 100644 --- a/src/DeepEquilibriumNetworks.jl +++ b/src/DeepEquilibriumNetworks.jl @@ -10,7 +10,7 @@ using FastClosures: @closure using Random: Random, AbstractRNG, randn! using SciMLBase: SciMLBase, AbstractNonlinearAlgorithm, AbstractODEAlgorithm, NonlinearSolution, ODESolution, ODEFunction, ODEProblem, - SteadyStateProblem, _unwrap_val + SteadyStateProblem using SciMLSensitivity: SteadyStateAdjoint, GaussAdjoint, ZygoteVJP using Static: StaticSymbol, StaticInt, known, static diff --git a/src/utils.jl b/src/utils.jl index 9e45f5f0..c5707ebb 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,3 +1,9 @@ +# Mirror of SciMLBase's internal `_unwrap_val` (a `_`-prefixed internal that will not be +# made public). Reproduced locally so `Val`-wrapped depth/scale specs can be unwrapped +# without depending on a non-public binding. +_unwrap_val(::Val{B}) where {B} = B +_unwrap_val(B) = B + @generated function split_and_reshape(x::AbstractMatrix, ::Val{idxs}, ::Val{shapes}) where { idxs, shapes, } diff --git a/test/qa/Project.toml b/test/qa/Project.toml index 123b618f..496c3cfb 100644 --- a/test/qa/Project.toml +++ b/test/qa/Project.toml @@ -2,14 +2,12 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" DeepEquilibriumNetworks = "6748aba7-0e9b-415e-a410-ae3cc0ecb334" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Lux = "b2108857-7c20-44ae-9111-449ecde12c47" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" -SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" +SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [sources] @@ -18,12 +16,11 @@ DeepEquilibriumNetworks = {path = "../.."} [compat] Aqua = "0.8" Documenter = "1" -ExplicitImports = "1" Lux = "1" NonlinearSolve = "4" OrdinaryDiffEq = "6.74, 7" Random = "1.10" -SciMLSensitivity = "7.43" -SciMLTesting = "1" +SciMLTesting = "1.7" +SteadyStateDiffEq = "2.5.0" Test = "1.10" julia = "1.10" diff --git a/test/qa/qa.jl b/test/qa/qa.jl index 74f3c884..3c799470 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,21 +1,13 @@ -using DeepEquilibriumNetworks, Test - -@testset "Aqua" begin - using Aqua - - Aqua.test_all(DeepEquilibriumNetworks; ambiguities = false) - Aqua.test_ambiguities(DeepEquilibriumNetworks; recursive = false) -end - -@testset "ExplicitImports" begin - import SciMLSensitivity - - using ExplicitImports - - @test check_no_implicit_imports(DeepEquilibriumNetworks) === nothing - @test check_no_stale_explicit_imports(DeepEquilibriumNetworks) === nothing - @test check_all_qualified_accesses_via_owners(DeepEquilibriumNetworks) === nothing -end +using SciMLTesting, DeepEquilibriumNetworks, Test + +run_qa( + DeepEquilibriumNetworks; + explicit_imports = true, + # `Aqua.test_all`'s default ambiguities check recurses into deps and is noisy; run + # it only against this package's own methods (the prior hand-rolled qa.jl disabled + # the recursive sweep and called `test_ambiguities(...; recursive = false)`). + aqua_kwargs = (; ambiguities = (; recursive = false)), +) @testset "Doctests" begin using Documenter