SciML / ModelingToolkit.jl

An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
https://mtk.sciml.ai/dev/
Other
1.43k stars 209 forks source link

typos #2201

Closed spaette closed 1 year ago

spaette commented 1 year ago

I presume these would be the correct replacement strings.

Please infom if any of the grepped for strings are not factually typos.

Connect Dependency Whenever accept argument committing cumulative continuous convert columns deleted dependency derivatives destination determinant disturbance eliminate failed integers matching namespace namespaced namespace permutation preserving representing simplicity simplified substitution variables variable

$ grep -nr Connnect ModelingToolkit.jl
ModelingToolkit.jl/test/runtests.jl:34:@safetestset "Stream Connnect Test" include("stream_connectors.jl")
$ grep -nr Depdendency ModelingToolkit.jl
ModelingToolkit.jl/test/runtests.jl:37:@safetestset "Depdendency Graph Test" include("dep_graphs.jl")
$ grep -nr Whenver ModelingToolkit.jl
ModelingToolkit.jl/src/systems/model_parsing.jl:269:    # Whenver it is a kwargs list, include it.
$ grep -nr accecpt ModelingToolkit.jl  
ModelingToolkit.jl/src/structural_transformation/partial_state_selection.jl:212:            # only accecpt small intergers to avoid overflow
$ grep -nr arument ModelingToolkit.jl
ModelingToolkit.jl/docs/src/basics/FAQ.md:123:This function provides 0 for the default values, which is a safe assumption for dummy derivatives of most models.  However, the 2nd arument allows for a different default value or values to be used if needed.
$ grep -nr commiting ModelingToolkit.jl
ModelingToolkit.jl/CONTRIBUTING.md:2:  - Please run `using JuliaFormatter, ModelingToolkit; format(joinpath(dirname(pathof(ModelingToolkit)), ".."))` before commiting.
$ grep -nr comulative ModelingToolkit.jl
ModelingToolkit.jl/src/systems/diffeqs/odesystem.jl:490:the comulative `x + y` and `x^2` would be added to `sys`.
$ grep -nr continous ModelingToolkit.jl
ModelingToolkit.jl/test/clock.jl:57:     D(x) ~ Shift(x, 0, dt) + 1 # this should never meet with continous variables
$ grep -nr "converte " ModelingToolkit.jl
ModelingToolkit.jl/src/systems/diffeqs/sdesystem.jl:223:Choose correction_factor=-1//2 (1//2) to converte Ito -> Stratonovich (Stratonovich->Ito).
$ grep -nr coulmns ModelingToolkit.jl
ModelingToolkit.jl/src/structural_transformation/bareiss.jl:187:swap_strategy is an optional argument that determines how the swapping of rows and coulmns is performed.
$ grep -nr delted ModelingToolkit.jl
ModelingToolkit.jl/src/bipartite_graph.jl:688:        # edge, also skip it, since it got delted in the contraction.
$ grep -nr depency ModelingToolkit.jl
ModelingToolkit.jl/src/ModelingToolkit.jl:109:# this has to be included early to deal with depency issues
$ grep -nr derivaitves ModelingToolkit.jl
ModelingToolkit.jl/src/systems/alias_elimination.jl:203:# derivaitves is nonlinear, then all of them are not linear variables.
$ grep -nr desination ModelingToolkit.jl
ModelingToolkit.jl/src/bipartite_graph.jl:621:    Matched edges pass from destination to source [source to desination], all other edges
$ grep -nr determinent ModelingToolkit.jl
ModelingToolkit.jl/test/structural_transformation/bareiss.jl:21:        # matrix determinent pairs
ModelingToolkit.jl/test/structural_transformation/bareiss.jl:24:            # test that the determinent was correctly computed
$ grep -nr distrubance ModelingToolkit.jl
ModelingToolkit.jl/src/inputoutput.jl:180:If `disturbance_inputs` is an array of variables, the generated dynamics function will preserve any state and dynamics associated with distrubance inputs, but the distrubance inputs themselves will not be included as inputs to the generated function. The use case for this is to generate dynamics for state observers that estimate the influence of unmeasured disturbances, and thus require state variables for the disturbance model, but without disturbance inputs since the disturbances are not available for measurement.
$ grep -nr elimate ModelingToolkit.jl
ModelingToolkit.jl/src/systems/sparsematrixclil.jl:173:        # elimate `v`
$ grep -nr failled ModelingToolkit.jl
ModelingToolkit.jl/src/structural_transformation/symbolics_tearing.jl:106:                error("tearing failled because the system is singular")
$ grep -nr intergers ModelingToolkit.jl
ModelingToolkit.jl/src/structural_transformation/partial_state_selection.jl:212:            # only accecpt small intergers to avoid overflow
$ grep -nr maching ModelingToolkit.jl
ModelingToolkit.jl/src/bipartite_graph.jl:635:Note that a maching `M` on `B` in the above sense is equivalent to determining
$ grep -nr "namepsace " ModelingToolkit.jl
ModelingToolkit.jl/src/inputoutput.jl:121:        startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namepsace to nu
ModelingToolkit.jl/src/inputoutput.jl:130:    startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namepsace to nu
$ grep -nr "namepsaced " ModelingToolkit.jl
ModelingToolkit.jl/src/inputoutput.jl:115:Example: `sys.u ~ sys.inner.u` will bind `sys.inner.u`, but `sys.u` remains an unbound, external signal. The namepsaced signal `sys.inner.u` lives in a namspace internal to `sys`.
$ grep -nr namspace ModelingToolkit.jl
ModelingToolkit.jl/src/inputoutput.jl:115:Example: `sys.u ~ sys.inner.u` will bind `sys.inner.u`, but `sys.u` remains an unbound, external signal. The namepsaced signal `sys.inner.u` lives in a namspace internal to `sys`.
$ grep -nr permuation ModelingToolkit.jl
ModelingToolkit.jl/src/systems/diffeqs/modelingtoolkitize.jl:40:                error("Non-permuation mass matrix is not supported.")
$ grep -nr perserving ModelingToolkit.jl
ModelingToolkit.jl/src/systems/alias_elimination.jl:276:    # Bareiss'ed coefficients as Gaussian elimination is nullspace perserving
$ grep -nr representating ModelingToolkit.jl
ModelingToolkit.jl/src/systems/jumps/jumpsystem.jl:3:# modifies the expression representating an affect function to
$ grep -nr simplicitly ModelingToolkit.jl
ModelingToolkit.jl/src/structural_transformation/bareiss.jl:37:        # For simplicitly, let i denote the smaller of the two columns
ModelingToolkit.jl/src/structural_transformation/bareiss.jl:75:        # For simplicitly, let i denote the smaller of the two rows
$ grep -nr simplifed ModelingToolkit.jl
ModelingToolkit.jl/src/structural_transformation/symbolics_tearing.jl:197:            @warn "The equation $eq is not consistent. It simplifed to 0 == $rhs."
$ grep -nr substition ModelingToolkit.jl
ModelingToolkit.jl/src/systems/jumps/jumpsystem.jl:394:    # handling parameter substition and empty param vecs
$ grep -nr varibales ModelingToolkit.jl
ModelingToolkit.jl/src/variables.jl:36:# Before the solvability check, we already have handled IO varibales, so
$ grep -nr varible ModelingToolkit.jl
ModelingToolkit.jl/src/systems/diffeqs/sdesystem.jl:325:    # register new varible θ corresponding to 1D correction process θ(t)
ModelingToolkit.jl/test/lowering_solving.jl:20:# test equation/varible ordering
$ 
ChrisRackauckas commented 1 year ago

those do look like typos, thanks for doing this analysis.

spaette commented 1 year ago

@ChrisRackauckas

cf: CONTRIBUTING.md

I don't presently have the formatter on my machine.

So I place this shell script here which is authorised for use and/or modification by the repo Members.

$ cat typos.sh
sed -i "s/Connnect/Connect/g" ModelingToolkit.jl/test/runtests.jl
sed -i "s/Depdendency/Dependency/g" ModelingToolkit.jl/test/runtests.jl
sed -i "s/Whenver/Whenever/g" ModelingToolkit.jl/src/systems/model_parsing.jl
sed -i "s/accecpt/accept/g" ModelingToolkit.jl/src/structural_transformation/partial_state_selection.jl
sed -i "s/arument/argument/g" ModelingToolkit.jl/docs/src/basics/FAQ.md
sed -i "s/commiting/committing/g" ModelingToolkit.jl/CONTRIBUTING.md
sed -i "s/comulative/cumulative/g" ModelingToolkit.jl/src/systems/diffeqs/odesystem.jl
sed -i "s/continous/continuous/g" ModelingToolkit.jl/test/clock.jl
sed -i "s/converte /convert /g" ModelingToolkit.jl/src/systems/diffeqs/sdesystem.jl
sed -i "s/coulmns/columns/g" ModelingToolkit.jl/src/structural_transformation/bareiss.jl
sed -i "s/delted/deleted/g" ModelingToolkit.jl/src/bipartite_graph.jl
sed -i "s/depency/dependency/g" ModelingToolkit.jl/src/ModelingToolkit.jl
sed -i "s/derivaitves/derivatives/g" ModelingToolkit.jl/src/systems/alias_elimination.jl
sed -i "s/desination/destination/g" ModelingToolkit.jl/src/bipartite_graph.jl
sed -i "s/determinent/determinant/g" ModelingToolkit.jl/test/structural_transformation/bareiss.jl
sed -i "s/distrubance/disturbance/g" ModelingToolkit.jl/src/inputoutput.jl
sed -i "s/elimate/eliminate/g" ModelingToolkit.jl/src/systems/sparsematrixclil.jl
sed -i "s/failled/failed/g" ModelingToolkit.jl/src/structural_transformation/symbolics_tearing.jl
sed -i "s/intergers/integers/g" ModelingToolkit.jl/src/structural_transformation/partial_state_selection.jl
sed -i "s/maching/matching/g" ModelingToolkit.jl/src/bipartite_graph.jl
sed -i "s/namepsace /namespace /g" ModelingToolkit.jl/src/inputoutput.jl
sed -i "s/namepsaced /namespaced /g" ModelingToolkit.jl/src/inputoutput.jl
sed -i "s/namspace/namespace/g" ModelingToolkit.jl/src/inputoutput.jl
sed -i "s/permuation/permutation/g" ModelingToolkit.jl/src/systems/diffeqs/modelingtoolkitize.jl
sed -i "s/perserving/preserving/g" ModelingToolkit.jl/src/systems/alias_elimination.jl
sed -i "s/representating/representing/g" ModelingToolkit.jl/src/systems/jumps/jumpsystem.jl
sed -i "s/simplicitly/simplicity/g" ModelingToolkit.jl/src/structural_transformation/bareiss.jl
sed -i "s/simplifed/simplified/g" ModelingToolkit.jl/src/structural_transformation/symbolics_tearing.jl
sed -i "s/substition/substitution/g" ModelingToolkit.jl/src/systems/jumps/jumpsystem.jl
sed -i "s/varibales/variables/g" ModelingToolkit.jl/src/variables.jl
sed -i "s/varible/variable/g" ModelingToolkit.jl/src/systems/diffeqs/sdesystem.jl
sed -i "s/varible/variable/g" ModelingToolkit.jl/test/lowering_solving.jl
$
spaette commented 1 year ago

@ChrisRackauckas

The content of CONTRIBUTING.md regarding use of the formatter might be elaborated upon.

A PR has been opened for this ticket today.

ChrisRackauckas commented 1 year ago

Thanks!

spaette commented 1 year ago

@ChrisRackauckas

cf: CONTRIBUTING.md

The relevance of running the command before committing on this PR was not apparent.

using JuliaFormatter, ModelingToolkit; format(joinpath(dirname(pathof(ModelingToolkit)), ".."))

ChrisRackauckas commented 1 year ago

Yes, it's in https://github.com/SciML/SciMLStyle#juliaformatter and https://github.com/SciML/ColPrac. We should probably reference both in a contributing file.