Skip to content

Add spell checking configuration #1303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 29, 2025
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
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.18.0
76 changes: 76 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[default.extend-words]
# Catalyst specific
systemes = "systemes"

# Julia-specific functions
indexin = "indexin"
findfirst = "findfirst"
findlast = "findlast"
eachindex = "eachindex"
setp = "setp"
getp = "getp"
setu = "setu"
getu = "getu"

# Mathematical/scientific terms
jacobian = "jacobian"
hessian = "hessian"
eigenvalue = "eigenvalue"
eigenvector = "eigenvector"
discretization = "discretization"
linearization = "linearization"
parameterized = "parameterized"
discretized = "discretized"
vectorized = "vectorized"

# Common variable patterns in Julia/SciML
ists = "ists"
ispcs = "ispcs"
osys = "osys"
rsys = "rsys"
usys = "usys"
fsys = "fsys"
eqs = "eqs"
rhs = "rhs"
lhs = "lhs"
ode = "ode"
pde = "pde"
sde = "sde"
dde = "dde"
bvp = "bvp"
ivp = "ivp"

# Common abbreviations
tol = "tol"
rtol = "rtol"
atol = "atol"
idx = "idx"
jdx = "jdx"
prev = "prev"
curr = "curr"
init = "init"
tmp = "tmp"
vec = "vec"
arr = "arr"
dt = "dt"
du = "du"
dx = "dx"
dy = "dy"
dz = "dz"

# Algorithm/type suffixes
alg = "alg"
prob = "prob"
sol = "sol"
cb = "cb"
opts = "opts"
args = "args"
kwargs = "kwargs"

# Scientific abbreviations
ND = "ND"
nd = "nd"
MTK = "MTK"
ODE = "ODE"
PDE = "PDE"
SDE = "SDE"
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
pmap = [k => rand(4)]
```
While one can still manually scalarize a parameter array, it is recommended
*not* to do this as it has signifcant performance costs with ModelingToolkit
*not* to do this as it has significant performance costs with ModelingToolkit
v9. Note, scalarized parameter arrays passed to the two-argument
`ReactionSystem` constructor may become unscalarized.
- **BREAKING:** We have introduced a restriction on bundling of reactions in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ end
"""
assess_identifiability(rs::ReactionSystem, args...; measured_quantities = [], known_p = [], remove_conserved = true, ignore_no_measured_warn=false, kwargs...)

Applies StructuralIdentifiability.jl's `assess_identifiability` function to a Catalyst `ReactionSystem`. Internally it is converted ot a `ODESystem`, for which structural identifiability is computed.
Applies StructuralIdentifiability.jl's `assess_identifiability` function to a Catalyst `ReactionSystem`. Internally it is converted to a `ODESystem`, for which structural identifiability is computed.

Arguments:
- `rs::ReactionSystem`; The reaction system we wish to compute structural identifiability for.
Expand Down Expand Up @@ -123,7 +123,7 @@ end
"""
find_identifiable_functions(rs::ReactionSystem, args...; measured_quantities = [], known_p = [], remove_conserved = true, ignore_no_measured_warn=false, kwargs...)

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.
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.

Arguments:
- `rs::ReactionSystem`; The reaction system we wish to compute structural identifiability for.
Expand Down
4 changes: 2 additions & 2 deletions src/reactionsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ struct ReactionSystem{V <: NetworkProperties} <:
end
end

# Checks if a symbolic expression constains a differential with respect to a species (either directly
# or somehwere within the differential expression).
# Checks if a symbolic expression contains a differential with respect to a species (either directly
# or somewhere within the differential expression).
function is_species_diff(expr)
Symbolics.is_derivative(expr) || return false
return hasnode(ex -> (ex isa Symbolics.BasicSymbolic) && isspecies(ex) && !isbc(ex), expr)
Expand Down
4 changes: 2 additions & 2 deletions src/reactionsystem_conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ function JumpProcesses.JumpProblem(rs::ReactionSystem, prob::SciMLBase.AbstractD
expand_catalyst_funs = true, checks = false, kwargs...)
Base.depwarn("JumpProblem(rn::ReactionSystem, prob, ...) is \
deprecated and will be removed in Catalyst 16. Use \
JumpProblem(JumpInputs(rn, ...), ...) insead.", :JumpProblem)
JumpProblem(JumpInputs(rn, ...), ...) instead.", :JumpProblem)
jsys = convert(JumpSystem, rs; name, combinatoric_ratelaws,
expand_catalyst_funs, checks)
jsys = complete(jsys)
Expand Down Expand Up @@ -1160,7 +1160,7 @@ symmap_to_varmap(sys, symmap) = symmap
### Other Conversion-related Functions ###

# the following function is adapted from SymbolicUtils.jl v.19
# 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).
# 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).
# Copyright (c) 2020: Shashi Gowda, Yingbo Ma, Mason Protter, Julia Computing.
# MIT license
"""
Expand Down
2 changes: 1 addition & 1 deletion src/reactionsystem_serialisation/serialise_fields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ end

# Creates an annotation for the system's systems.
function get_systems_annotation(rn::ReactionSystem)
return "Subystems:"
return "Subsystems:"
end

# Combines the 3 systems-related functions in a constant tuple.
Expand Down
8 changes: 4 additions & 4 deletions test/network_analysis/conservation_laws.jl
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ end

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

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