Skip to content

Commit f08e858

Browse files
ChrisRackauckasclaude
authored andcommitted
Fix Runic formatting and typos across codebase
- Run Runic formatter on all files to fix formatting issues - Fix typos: reinitiailize -> reinitialize, attactor -> attractor, neccessary -> necessary, becase -> because - Add false positives to .typos.toml: SME (algorithm name), yhat, accpt, gam, clos (variable names), Comput (journal abbreviation), occurence/occured/occuring (API function names), inferrable (Julia convention) Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0b91dd9 commit f08e858

20 files changed

Lines changed: 181 additions & 96 deletions

File tree

.typos.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,23 @@ IIF = "IIF" # Integrating Factor method (IIF1M, IIF2M, IIF1Mil)
8787
iif = "iif"
8888
currate = "currate" # current rate variable in tau-leaping
8989
SIE = "SIE" # SIEA/SIEB algorithm name prefix
90+
SME = "SME" # SME algorithm name (Stochastic Modified Euler)
9091
resetted = "resetted" # variable name in stepsize control
9192
strat = "strat" # Stratonovich abbreviation
93+
94+
# Variable names used in codebase
95+
yhat = "yhat" # estimated y value
96+
accpt = "accpt" # accepted step flag variable
97+
gam = "gam" # gamma abbreviation in tableaux
98+
clos = "clos" # closure abbreviation
99+
100+
# Journal abbreviations in BibTeX citations
101+
Comput = "Comput" # J. Comput. Phys. (Journal of Computational Physics)
102+
103+
# Function names with historical spelling (API-stable)
104+
occurence = "occurence" # in check_event_occurence, is_event_occurence
105+
occured = "occured" # in comments near occurence functions
106+
occuring = "occuring" # in comments near occurence functions
107+
108+
# Julia spelling convention
109+
inferrable = "inferrable" # Julia uses "inferrable" not "inferable"

lib/DiffEqBase/ext/DiffEqBaseReverseDiffExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function DiffEqBase.solve_up(
175175
)
176176
end
177177

178-
# Required becase ReverseDiff.@grad function DiffEqBase.solve_up is not supported!
178+
# Required because ReverseDiff.@grad function DiffEqBase.solve_up is not supported!
179179
import DiffEqBase: solve_up
180180
ReverseDiff.@grad function solve_up(prob, sensealg, u0, p, args...; kwargs...)
181181
out = DiffEqBase._solve_adjoint(

lib/DiffEqBase/src/callbacks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ end
319319
end
320320

321321
"""
322-
Return a nudged (if neccessary) value of `integrator.tprev` to avoid repeat event detection
322+
Return a nudged (if necessary) value of `integrator.tprev` to avoid repeat event detection
323323
- `integrator`
324324
- `callback`: Last occuring callback
325325
- `condition_tprev`: Condition of last occuring callback evaluated at `integrator.tprev`

lib/DiffEqBase/src/solve.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,8 @@ function promote_f(
819819
J_T = Base.promote_op(similar, typeof(f.jac_prototype), Type{uElType})
820820
sig = Tuple{J_T, typeof(u0), typeof(p), typeof(t)}
821821
f = @set f.jac = FunctionWrappersWrappers.FunctionWrappersWrapper(
822-
Void(f.jac), (sig,), (Nothing,))
822+
Void(f.jac), (sig,), (Nothing,)
823+
)
823824
elseif isdefined(f, :sparsity) && f.sparsity isa AbstractMatrix &&
824825
!(f.sparsity isa Matrix)
825826
# The sparsity pattern is a non-dense matrix (e.g. SparseMatrixCSC).
@@ -836,7 +837,8 @@ function promote_f(
836837
else
837838
sig = Tuple{Matrix{uElType}, typeof(u0), typeof(p), typeof(t)}
838839
f = @set f.jac = FunctionWrappersWrappers.FunctionWrappersWrapper(
839-
Void(f.jac), (sig,), (Nothing,))
840+
Void(f.jac), (sig,), (Nothing,)
841+
)
840842
end
841843
end
842844
return unwrapped_f(f, wrapfun_iip(f.f, (u0, u0, p, t), Val(CS)))

lib/DiffEqBase/test/downstream/community_callback_tests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ using StaticArrays
9898
using MultiScaleArrays
9999

100100
t_last = 0.0
101-
function attactor(du, u, p, t)
101+
function attractor(du, u, p, t)
102102
α, β = p
103103
n = length(u.nodes)
104104
return for k in 1:n
@@ -195,7 +195,7 @@ cback = VectorContinuousCallback(
195195
(x -> Int(((x - 1) * x) / 2))(length(Newton.nodes))
196196
)
197197

198-
problemp = ODEProblem(attactor, Newton, (0.0, Inf), parameters)
198+
problemp = ODEProblem(attractor, Newton, (0.0, Inf), parameters)
199199

200200
world = init(problemp, AutoTsit5(Rosenbrock23()); save_everystep = false, callback = cback)
201201

@@ -225,7 +225,7 @@ cb = VectorContinuousCallback(cond!, terminate_affect!, nothing, 1)
225225
u0 = [0.0, 0.0, 1.0]
226226
prob = ODEProblem(f!, u0, (0.0, 10.0); callback = cb)
227227
soln = solve(prob, Tsit5())
228-
@test soln.t[end] 4.712347213360699 atol = 1e-4
228+
@test soln.t[end] 4.712347213360699 atol = 1.0e-4
229229

230230
odefun = ODEFunction((u, p, t) -> [u[2], u[2] - p]; mass_matrix = [1 0; 0 0])
231231
callback = PresetTimeCallback(0.5, integ -> (integ.p = -integ.p))

lib/DiffEqBase/test/dynamicquantities_ext.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ using LinearAlgebra
2525

2626
W = DiffEqBase.default_factorize(A)
2727
x = W \ b
28-
@test maximum(abs.(ustrip.(A * x .- b))) 1e-12
28+
@test maximum(abs.(ustrip.(A * x .- b))) 1.0e-12
2929

3030
x2 = similar(b)
3131
ldiv!(x2, W, b)
32-
@test maximum(abs.(ustrip.(A * x2 .- b))) 1e-12
32+
@test maximum(abs.(ustrip.(A * x2 .- b))) 1.0e-12
3333

3434
# _infer_ut fallback when all entries are zero
3535
Az = fill(0.0u"m", 2, 2)

lib/DiffEqBase/test/runtests.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ end
4848

4949
@time begin
5050
# Core tests — basic DiffEqBase functionality, no downstream solvers needed
51-
if TEST_GROUP ("QA", "Static", "Downstream", "Downstream2",
52-
"ModelingToolkit", "Sundials")
51+
if TEST_GROUP (
52+
"QA", "Static", "Downstream", "Downstream2",
53+
"ModelingToolkit", "Sundials",
54+
)
5355
@time @safetestset "Callbacks" include("callbacks.jl")
5456
@time @safetestset "Plot Vars" include("plot_vars.jl")
5557
@time @safetestset "Problem Creation Tests" include("problem_creation_tests.jl")
@@ -68,8 +70,10 @@ end
6870
end
6971

7072
# QA tests — Aqua quality checks
71-
if TEST_GROUP ("Core", "Static", "Downstream", "Downstream2",
72-
"ModelingToolkit", "Sundials") && isempty(VERSION.prerelease)
73+
if TEST_GROUP (
74+
"Core", "Static", "Downstream", "Downstream2",
75+
"ModelingToolkit", "Sundials",
76+
) && isempty(VERSION.prerelease)
7377
@time @safetestset "Aqua" include("aqua.jl")
7478
end
7579

lib/OrdinaryDiffEqBDF/test/jet.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using Test
3333
# Regular BDF solvers (ODEProblem)
3434
regular_bdf_solvers = [
3535
ABDF2(), QNDF1(), QBDF1(), QNDF2(), QBDF2(), QNDF(), QBDF(), FBDF(),
36-
MEBDF2()
36+
MEBDF2(),
3737
]
3838
# Some of these are type-stable for the initialization step, but not all
3939
stable_bdf_solvers = [QNDF(), QBDF(), FBDF(), MEBDF2()]

lib/OrdinaryDiffEqCore/src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ function _ode_init(
717717
success_iter = 0
718718
erracc = QT(1)
719719
dtacc = tType(1)
720-
reinitiailize = true
720+
reinitialize = true
721721
saveiter = 0 # Starts at 0 so first save is at 1
722722
saveiter_dense = 0
723723
fsalfirst, fsallast = _cache !== nothing ? (nothing, nothing) :
@@ -757,7 +757,7 @@ function _ode_init(
757757
vector_event_last_time,
758758
last_event_error, accept_step,
759759
isout, reeval_fsal,
760-
u_modified, reinitiailize, isdae,
760+
u_modified, reinitialize, isdae,
761761
opts, stats, initializealg, differential_vars,
762762
fsalfirst, fsallast, _rng,
763763
W, P, sqdt,

lib/OrdinaryDiffEqNonlinearSolve/test/jet.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ using JET
4141

4242
# Solvers which are not fully type-stable for initialization
4343
iip_unstable_ode_solvers = [
44-
ABDF2(), QNDF1(), QBDF1(), QNDF2(), QBDF2(), QNDF(), QBDF(), FBDF(), MEBDF2(),
44+
ABDF2(), QNDF1(), QBDF1(), QNDF2(), QBDF2(), QNDF(), QBDF(), FBDF(), MEBDF2(),
4545
Rosenbrock23(), Rosenbrock32(), Rodas4(), Rodas4P(), Rodas5(), Rodas5P(),
46-
Rosenbrock23(autodiff=ad), Rosenbrock32(autodiff=ad), Rodas4(autodiff=ad),
47-
Rodas4P(autodiff=ad), Rodas5(autodiff=ad), Rodas5P(autodiff=ad),
46+
Rosenbrock23(autodiff = ad), Rosenbrock32(autodiff = ad), Rodas4(autodiff = ad),
47+
Rodas4P(autodiff = ad), Rodas5(autodiff = ad), Rodas5P(autodiff = ad),
4848
]
4949
# Some of these are type-stable for the initialization step, but not all
5050
iip_stable_ode_solvers = [
@@ -64,10 +64,10 @@ using JET
6464

6565
# Solvers which are not fully type-stable for initialization
6666
oop_unstable_ode_solvers = [
67-
ABDF2(), QNDF1(), QBDF1(), QNDF2(), QBDF2(), QNDF(), QBDF(), FBDF(), MEBDF2(),
67+
ABDF2(), QNDF1(), QBDF1(), QNDF2(), QBDF2(), QNDF(), QBDF(), FBDF(), MEBDF2(),
6868
Rosenbrock23(), Rosenbrock32(), Rodas4(), Rodas4P(), Rodas5(), Rodas5P(),
69-
Rosenbrock23(autodiff=ad), Rosenbrock32(autodiff=ad), Rodas4(autodiff=ad),
70-
Rodas4P(autodiff=ad), Rodas5(autodiff=ad), Rodas5P(autodiff=ad),
69+
Rosenbrock23(autodiff = ad), Rosenbrock32(autodiff = ad), Rodas4(autodiff = ad),
70+
Rodas4P(autodiff = ad), Rodas5(autodiff = ad), Rodas5P(autodiff = ad),
7171
]
7272
# Some of these are type-stable for the initialization step, but not all
7373
oop_stable_ode_solvers = [
@@ -97,4 +97,3 @@ using JET
9797

9898
end
9999
end
100-

0 commit comments

Comments
 (0)