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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/ModelingToolkitNeuralNets.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
55 changes: 38 additions & 17 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -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
),
),
),
)
Loading