Skip to content

Commit a5f1d3a

Browse files
Merge pull request #135 from ChrisRackauckas-Claude/explicit-imports-20260102-040812
Improve explicit imports hygiene
2 parents a95d8da + 651a690 commit a5f1d3a

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

src/ModelOrderReduction.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module ModelOrderReduction
22

3-
using DocStringExtensions
3+
using DocStringExtensions: DocStringExtensions, FUNCTIONNAME, SIGNATURES, TYPEDSIGNATURES
44

5-
using ModelingToolkit
6-
using LinearAlgebra
5+
using ModelingToolkit: ModelingToolkit, @variables, Differential, Equation, Num, ODESystem,
6+
SymbolicUtils, Symbolics, arguments, build_function, complete,
7+
expand, substitute, tearing_substitution
8+
using LinearAlgebra: LinearAlgebra, /, \, mul!, qr, svd
79

8-
using Setfield
10+
using Setfield: Setfield, @set!
911

1012
include("utils.jl")
1113

src/precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using PrecompileTools
1+
using PrecompileTools: PrecompileTools, @compile_workload, @setup_workload
22

33
@setup_workload begin
44
# Setup code - create minimal test data

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using SparseArrays
1+
using SparseArrays: SparseArrays, sparse
22
using ModelingToolkit: iscall, operation
33

44
"""

test/Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3-
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
3+
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
44
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
55
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
6+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
67
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
78
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
89

910
[compat]
1011
Aqua = "0.8"
11-
OrdinaryDiffEq = "6"
12+
ExplicitImports = "1"
1213
MethodOfLines = "0.11"
1314
ModelingToolkit = "10.10"
15+
OrdinaryDiffEq = "6"
1416
SafeTestsets = "0.1"

test/explicit_imports.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Test
2+
using ExplicitImports
3+
using ModelOrderReduction
4+
5+
@testset "ExplicitImports" begin
6+
@testset "No implicit imports" begin
7+
@test check_no_implicit_imports(ModelOrderReduction) === nothing
8+
end
9+
10+
@testset "No stale explicit imports" begin
11+
@test check_no_stale_explicit_imports(ModelOrderReduction) === nothing
12+
end
13+
end

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ using SafeTestsets
33
@safetestset "Quality Assurance" begin
44
include("qa.jl")
55
end
6+
@safetestset "Explicit Imports" begin
7+
include("explicit_imports.jl")
8+
end
69
@safetestset "POD" begin
710
include("DataReduction.jl")
811
end

0 commit comments

Comments
 (0)