diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000000..ed4fe17798 --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -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 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000000..9d492974fa --- /dev/null +++ b/.typos.toml @@ -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" diff --git a/HISTORY.md b/HISTORY.md index 96ee424681..cb9a7e64f4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl b/ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl index b9189b68fc..1c3ef4ab05 100644 --- a/ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl +++ b/ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl @@ -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. @@ -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. diff --git a/src/reactionsystem.jl b/src/reactionsystem.jl index e35f308b4f..6bd02f54c1 100644 --- a/src/reactionsystem.jl +++ b/src/reactionsystem.jl @@ -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) diff --git a/src/reactionsystem_conversions.jl b/src/reactionsystem_conversions.jl index d4a69bd7f1..f55a6770d9 100644 --- a/src/reactionsystem_conversions.jl +++ b/src/reactionsystem_conversions.jl @@ -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) @@ -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 """ diff --git a/src/reactionsystem_serialisation/serialise_fields.jl b/src/reactionsystem_serialisation/serialise_fields.jl index 133c770877..26d39b88ff 100644 --- a/src/reactionsystem_serialisation/serialise_fields.jl +++ b/src/reactionsystem_serialisation/serialise_fields.jl @@ -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. diff --git a/test/network_analysis/conservation_laws.jl b/test/network_analysis/conservation_laws.jl index 0078ddf3d4..b277a50c89 100644 --- a/test/network_analysis/conservation_laws.jl +++ b/test/network_analysis/conservation_laws.jl @@ -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. @@ -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`. @@ -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)