Skip to content

Commit b966c7e

Browse files
Merge pull request #1303 from SciML/add-typos-spellcheck-config
Add spell checking configuration
2 parents 7bade90 + 4caae22 commit b966c7e

File tree

8 files changed

+101
-12
lines changed

8 files changed

+101
-12
lines changed

.github/workflows/SpellCheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v4
12+
- name: Check spelling
13+
uses: crate-ci/typos@v1.18.0

.typos.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[default.extend-words]
2+
# Catalyst specific
3+
systemes = "systemes"
4+
5+
# Julia-specific functions
6+
indexin = "indexin"
7+
findfirst = "findfirst"
8+
findlast = "findlast"
9+
eachindex = "eachindex"
10+
setp = "setp"
11+
getp = "getp"
12+
setu = "setu"
13+
getu = "getu"
14+
15+
# Mathematical/scientific terms
16+
jacobian = "jacobian"
17+
hessian = "hessian"
18+
eigenvalue = "eigenvalue"
19+
eigenvector = "eigenvector"
20+
discretization = "discretization"
21+
linearization = "linearization"
22+
parameterized = "parameterized"
23+
discretized = "discretized"
24+
vectorized = "vectorized"
25+
26+
# Common variable patterns in Julia/SciML
27+
ists = "ists"
28+
ispcs = "ispcs"
29+
osys = "osys"
30+
rsys = "rsys"
31+
usys = "usys"
32+
fsys = "fsys"
33+
eqs = "eqs"
34+
rhs = "rhs"
35+
lhs = "lhs"
36+
ode = "ode"
37+
pde = "pde"
38+
sde = "sde"
39+
dde = "dde"
40+
bvp = "bvp"
41+
ivp = "ivp"
42+
43+
# Common abbreviations
44+
tol = "tol"
45+
rtol = "rtol"
46+
atol = "atol"
47+
idx = "idx"
48+
jdx = "jdx"
49+
prev = "prev"
50+
curr = "curr"
51+
init = "init"
52+
tmp = "tmp"
53+
vec = "vec"
54+
arr = "arr"
55+
dt = "dt"
56+
du = "du"
57+
dx = "dx"
58+
dy = "dy"
59+
dz = "dz"
60+
61+
# Algorithm/type suffixes
62+
alg = "alg"
63+
prob = "prob"
64+
sol = "sol"
65+
cb = "cb"
66+
opts = "opts"
67+
args = "args"
68+
kwargs = "kwargs"
69+
70+
# Scientific abbreviations
71+
ND = "ND"
72+
nd = "nd"
73+
MTK = "MTK"
74+
ODE = "ODE"
75+
PDE = "PDE"
76+
SDE = "SDE"

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
pmap = [k => rand(4)]
5757
```
5858
While one can still manually scalarize a parameter array, it is recommended
59-
*not* to do this as it has signifcant performance costs with ModelingToolkit
59+
*not* to do this as it has significant performance costs with ModelingToolkit
6060
v9. Note, scalarized parameter arrays passed to the two-argument
6161
`ReactionSystem` constructor may become unscalarized.
6262
- **BREAKING:** We have introduced a restriction on bundling of reactions in the

ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ end
8181
"""
8282
assess_identifiability(rs::ReactionSystem, args...; measured_quantities = [], known_p = [], remove_conserved = true, ignore_no_measured_warn=false, kwargs...)
8383
84-
Applies StructuralIdentifiability.jl's `assess_identifiability` function to a Catalyst `ReactionSystem`. Internally it is converted ot a `ODESystem`, for which structural identifiability is computed.
84+
Applies StructuralIdentifiability.jl's `assess_identifiability` function to a Catalyst `ReactionSystem`. Internally it is converted to a `ODESystem`, for which structural identifiability is computed.
8585
8686
Arguments:
8787
- `rs::ReactionSystem`; The reaction system we wish to compute structural identifiability for.
@@ -123,7 +123,7 @@ end
123123
"""
124124
find_identifiable_functions(rs::ReactionSystem, args...; measured_quantities = [], known_p = [], remove_conserved = true, ignore_no_measured_warn=false, kwargs...)
125125
126-
Applies StructuralIdentifiability.jl's `find_identifiable_functions` function to a Catalyst `ReactionSystem`. Internally it is converted ot a `ODESystem`, for which structurally identifiable functions are computed.
126+
Applies StructuralIdentifiability.jl's `find_identifiable_functions` function to a Catalyst `ReactionSystem`. Internally it is converted to a `ODESystem`, for which structurally identifiable functions are computed.
127127
128128
Arguments:
129129
- `rs::ReactionSystem`; The reaction system we wish to compute structural identifiability for.

src/reactionsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ struct ReactionSystem{V <: NetworkProperties} <:
383383
end
384384
end
385385

386-
# Checks if a symbolic expression constains a differential with respect to a species (either directly
387-
# or somehwere within the differential expression).
386+
# Checks if a symbolic expression contains a differential with respect to a species (either directly
387+
# or somewhere within the differential expression).
388388
function is_species_diff(expr)
389389
Symbolics.is_derivative(expr) || return false
390390
return hasnode(ex -> (ex isa Symbolics.BasicSymbolic) && isspecies(ex) && !isbc(ex), expr)

src/reactionsystem_conversions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ function JumpProcesses.JumpProblem(rs::ReactionSystem, prob::SciMLBase.AbstractD
10371037
expand_catalyst_funs = true, checks = false, kwargs...)
10381038
Base.depwarn("JumpProblem(rn::ReactionSystem, prob, ...) is \
10391039
deprecated and will be removed in Catalyst 16. Use \
1040-
JumpProblem(JumpInputs(rn, ...), ...) insead.", :JumpProblem)
1040+
JumpProblem(JumpInputs(rn, ...), ...) instead.", :JumpProblem)
10411041
jsys = convert(JumpSystem, rs; name, combinatoric_ratelaws,
10421042
expand_catalyst_funs, checks)
10431043
jsys = complete(jsys)
@@ -1160,7 +1160,7 @@ symmap_to_varmap(sys, symmap) = symmap
11601160
### Other Conversion-related Functions ###
11611161

11621162
# the following function is adapted from SymbolicUtils.jl v.19
1163-
# later on (Spetember 2023) modified by Torkel and Shashi (now assumes input not on polynomial form, which is handled elsewhere, previous version failed in these cases anyway).
1163+
# later on (September 2023) modified by Torkel and Shashi (now assumes input not on polynomial form, which is handled elsewhere, previous version failed in these cases anyway).
11641164
# Copyright (c) 2020: Shashi Gowda, Yingbo Ma, Mason Protter, Julia Computing.
11651165
# MIT license
11661166
"""

src/reactionsystem_serialisation/serialise_fields.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ end
539539

540540
# Creates an annotation for the system's systems.
541541
function get_systems_annotation(rn::ReactionSystem)
542-
return "Subystems:"
542+
return "Subsystems:"
543543
end
544544

545545
# Combines the 3 systems-related functions in a constant tuple.

test/network_analysis/conservation_laws.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ end
337337

338338
# Goes through a chain of updating of conservation law constants/species, checking that
339339
# the values of relevant quantities are correct after each step.
340-
# Generally, if `Γ` has not been explicitly updated, it will be updated to acomodate new species
340+
# Generally, if `Γ` has not been explicitly updated, it will be updated to accommodate new species
341341
# values. If it has been explicitly updated, the corresponding eliminated quantity will have its
342-
# value updated to acomodate new Γ/species values (however, we have to manually designate this by setting it to `nothing`).
342+
# value updated to accommodate new Γ/species values (however, we have to manually designate this by setting it to `nothing`).
343343
# Also checks that quantities are correctly updated in integrators and solutions derived from problems.
344344
let
345345
# Prepares the problem inputs and computes the conservation equation.
@@ -399,7 +399,7 @@ let
399399
# - The conservation law constant will be kept fixed, and secondary updates are made to the
400400
# eliminated species.
401401
# Assumes that X3 is the eliminated species. In most updates, designate its as `nothing` (to
402-
# ensure that its value is updated to acommodate the new conservation law).
402+
# ensure that its value is updated to accommodate the new conservation law).
403403
# The random Γ is ensured to be large enough not to generate negative values in the eliminated species.
404404
for _ in 1:3
405405
# Updates Γ, checks the values of all species and Γ, then resets `prob_old`.
@@ -509,7 +509,7 @@ let
509509
u0 = [:X1 => 1.0, :X2 => 2.0, :X3 => 3.0]
510510
ps = [:k1 => 0.1, :k2 => 0.2, :k3 => 0.3, :k4 => 0.4]
511511

512-
# Checks that the warning si given and can be supressed for the variosu cases.
512+
# Checks that the warning si given and can be suppressed for the variosu cases.
513513
@test_nowarn convert(NonlinearSystem, rn; remove_conserved = true, conseqs_remake_warn = false)
514514
@test_logs (:warn, r"Note, when constructing*") convert(NonlinearSystem, rn; remove_conserved = true, conseqs_remake_warn = true)
515515
@test_nowarn NonlinearProblem(rn, u0, ps; remove_conserved = true, conseqs_remake_warn = false)

0 commit comments

Comments
 (0)