diff --git a/Project.toml b/Project.toml index 09efecf..6ace2d1 100644 --- a/Project.toml +++ b/Project.toml @@ -32,7 +32,7 @@ Random = "1.10" SafeTestsets = "0.1" SciCompDSL = "1" SciMLSensitivity = "7.93" -SciMLTesting = "1" +SciMLTesting = "1.6" SciMLStructures = "1.10" StableRNGs = "1" Statistics = "1.10" diff --git a/src/ModelingToolkitNeuralNets.jl b/src/ModelingToolkitNeuralNets.jl index 8296d0e..77c6b92 100644 --- a/src/ModelingToolkitNeuralNets.jl +++ b/src/ModelingToolkitNeuralNets.jl @@ -1,8 +1,8 @@ module ModelingToolkitNeuralNets -using ModelingToolkitBase: @parameters, @named, @variables, System, t_nounits, getmetadata, hasmetadata +using ModelingToolkitBase: @parameters, @variables, System, t_nounits, getmetadata using IntervalSets: var".." -using Symbolics: Symbolics, @register_array_symbolic, @wrapped, unwrap, wrap, shape +using Symbolics: Symbolics, unwrap, wrap, shape using LuxCore: stateless_apply, outputsize using Lux: Lux using Random: Xoshiro diff --git a/test/qa/qa.jl b/test/qa/qa.jl index f7126db..0100bc5 100644 --- a/test/qa/qa.jl +++ b/test/qa/qa.jl @@ -1,19 +1,40 @@ -using Test -using ModelingToolkitNeuralNets -using Aqua +using SciMLTesting, ModelingToolkitNeuralNets, Test using JET -@testset verbose = true "Code quality (Aqua.jl)" begin - Aqua.find_persistent_tasks_deps(ModelingToolkitNeuralNets) - Aqua.test_ambiguities(ModelingToolkitNeuralNets, recursive = false) - Aqua.test_deps_compat(ModelingToolkitNeuralNets) - Aqua.test_piracies(ModelingToolkitNeuralNets) - Aqua.test_project_extras(ModelingToolkitNeuralNets) - Aqua.test_stale_deps(ModelingToolkitNeuralNets, ignore = Symbol[]) - Aqua.test_unbound_args(ModelingToolkitNeuralNets) - Aqua.test_undefined_exports(ModelingToolkitNeuralNets) -end - -@testset "Code linting (JET.jl)" begin - JET.test_package(ModelingToolkitNeuralNets; target_defined_modules = true) -end +run_qa( + ModelingToolkitNeuralNets; + explicit_imports = true, + ei_kwargs = (; + # `unwrap`/`shape` are re-exported by Symbolics but owned by SymbolicUtils; + # `initialparameters` is re-exported by Lux but owned by LuxCore. We use + # the re-exporting package deliberately (matching the rest of the SciML + # convention of going through Symbolics / Lux), so ignore the owner + # mismatch until the names are re-declared public in the re-exporter. + all_explicit_imports_via_owners = (; + ignore = (:shape, :unwrap), # owner SymbolicUtils, from Symbolics + ), + all_qualified_accesses_via_owners = (; + ignore = ( + :initialparameters, # owner LuxCore, accessed via Lux + :unwrap, # owner SymbolicUtils, accessed via Symbolics + ), + ), + # Non-public external names the package genuinely relies on. These are + # public (via the `public` keyword) on Julia 1.11+, so these ignores are + # no-ops there and only matter on the LTS (1.10) lane; drop each entry + # once its owner marks it public on the supported floor. + all_qualified_accesses_are_public = (; + ignore = ( + :Arr, :VariableDefaultValue, :option_to_metadata_type, :unwrap, # Symbolics + :initialparameters, # Lux + ), + ), + all_explicit_imports_are_public = (; + ignore = ( + :shape, :unwrap, :wrap, # Symbolics + :outputsize, :stateless_apply, # LuxCore + :t_nounits, # ModelingToolkitBase + ), + ), + ), +)