Skip to content
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

typos CI #549

Merged
merged 1 commit into from
Dec 4, 2023
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@v3
- name: Check spelling
uses: crate-ci/[email protected]
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[default.extend-words]
ND = "ND"
4 changes: 2 additions & 2 deletions src/debug.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ODEProblem{iip,SciMLBase.FullSpecialize}(f,u0,tspan,p)
where `iip` is either true or false depending on the in-placeness of the definition of `f` (i.e. for ODEs
if `f` has 3 arguments `(u,p,t)` then it's false, otherwise `f(du,u,p,t)` is true).

For more information on the control of specailization options, please see the documentation at:
For more information on the control of specialization options, please see the documentation at:

https://docs.sciml.ai/SciMLBase/stable/interfaces/Problems/#Specialization-Choices

Expand All @@ -53,7 +53,7 @@ be `ODEProblem(f,u0,tspan,p)` in order to use parameters.

2. Using the wrong function signature. For example, with `ODEProblem`s the function signature is always
`f(du,u,p,t)` for the in-place form or `f(u,p,t)` for the out-of-place form. Note that the `p` argument
will always be in the function signature reguardless of if the problem is defined with parameters!
will always be in the function signature regardless of if the problem is defined with parameters!
"""

function __init__()
Expand Down
2 changes: 1 addition & 1 deletion src/integrator_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ function Base.setindex!(A::DEIntegrator, val, sym)
if !isnothing(i)
A.u[i] = val
return A
elseif sym isa Symbol # Hanldes input like :X.
elseif sym isa Symbol # Handles input like :X.
s_f = Symbol.(getproperty.(states(A.f.sys), :f))
if count(isequal(Symbol(sym)), s_f) == 1
i = findfirst(isequal(sym), s_f)
Expand Down
2 changes: 1 addition & 1 deletion src/problems/bvp_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function BVProblem(f::AbstractBVPFunction, u0, tspan, p = NullParameters(); kwar
return BVProblem{isinplace(f)}(f, u0, tspan, p; kwargs...)
end

# This is mostly a fake stuct and isn't used anywhere
# This is mostly a fake struct and isn't used anywhere
# But we need it for function calls like TwoPointBVProblem{iip}(...) = ...
struct TwoPointBVPFunction{iip} end

Expand Down
2 changes: 1 addition & 1 deletion src/problems/problem_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function ___internal_setindex!(prob::AbstractSciMLProblem, val, sym)
if !isnothing(i)
prob.u0[i] = val
return prob
elseif sym isa Symbol # Hanldes input like :X.
elseif sym isa Symbol # Handles input like :X.
s_f = Symbol.(getproperty.(states(prob.f.sys), :f))
if count(isequal(Symbol(sym)), s_f) == 1
i = findfirst(isequal(sym), s_f)
Expand Down
2 changes: 1 addition & 1 deletion src/problems/problem_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ be `ODEProblem(f,u0,tspan,p)` in order to use parameters.

2. Using the wrong function signature. For example, with `ODEProblem`s the function signature is always
`f(du,u,p,t)` for the in-place form or `f(u,p,t)` for the out-of-place form. Note that the `p` argument
will always be in the function signature reguardless of if the problem is defined with parameters!
will always be in the function signature regardless of if the problem is defined with parameters!
"""

struct NullParameterIndexError <: Exception end
Expand Down
2 changes: 1 addition & 1 deletion src/retcodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
const symfalse = Symbol("false")

function Base.convert(::Type{ReturnCode.T}, retcode::Symbol)
@warn "Backwards compatability support of the new return codes to Symbols will be deprecated with the Julia v1.9 release. Please see https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#retcodes for more information"
@warn "Backwards compatibility support of the new return codes to Symbols will be deprecated with the Julia v1.9 release. Please see https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#retcodes for more information"

Check warning on line 354 in src/retcodes.jl

View check run for this annotation

Codecov / codecov/patch

src/retcodes.jl#L354

Added line #L354 was not covered by tests

if retcode == :Default || retcode == :DEFAULT
ReturnCode.Default
Expand Down
12 changes: 6 additions & 6 deletions src/scimlfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ but also includes the limitations:
`DiffEqBase.wrap_iip` on `f` before calling
`ODEFunction{true,FunctionWrapperSpecialize}(f)`. This is a fundamental
limitation of the approach as the types of `(u,p,t)` are required in the
construction process and not accessible in the `AbstactSciMLFunction` constructors.
construction process and not accessible in the `AbstractSciMLFunction` constructors.

## Example

Expand Down Expand Up @@ -2032,7 +2032,7 @@ OptimizationFunction{iip}(f, adtype::AbstractADType = NoAD();

- `f(u,p,args...)`: the function to optimize. `u` are the optimization variables and `p` are parameters used in definition of
the objective, even if no such parameters are used in the objective it should be an argument in the function. This can also take
any additonal arguments that are relevant to the objective function, for example minibatches used in machine learning,
any additional arguments that are relevant to the objective function, for example minibatches used in machine learning,
take a look at the minibatching tutorial [here](https://docs.sciml.ai/Optimization/stable/tutorials/minibatch/). This should return
a scalar, the loss value, as the first return output and if any additional outputs are returned, they will be passed to the `callback`
function described in [Callback Functions](@ref).
Expand Down Expand Up @@ -2223,7 +2223,7 @@ the usage of `f` and `bc`. These include:
as the prototype and integrators will specialize on this structure where possible. Non-structured
sparsity patterns should use a `SparseMatrixCSC` with a correct sparsity pattern for the Jacobian.
The default is `nothing`, which means a dense Jacobian.
- `bcjac_prototype`: a prototype matrix maching the type that matches the Jacobian. For example,
- `bcjac_prototype`: a prototype matrix matching the type that matches the Jacobian. For example,
if the Jacobian is tridiagonal, then an appropriately sized `Tridiagonal` matrix can be used
as the prototype and integrators will specialize on this structure where possible. Non-structured
sparsity patterns should use a `SparseMatrixCSC` with a correct sparsity pattern for the Jacobian.
Expand Down Expand Up @@ -4150,9 +4150,9 @@ function IntegralFunction(f)
IntegralFunction{false}(f, nothing)
end
function IntegralFunction(f, integrand_prototype)
calcuated_iip = isinplace(f, 3, "integral", true)
if !calcuated_iip
throw(IntegrandMismatchFunctionError(calcuated_iip, true))
calculated_iip = isinplace(f, 3, "integral", true)
if !calculated_iip
throw(IntegrandMismatchFunctionError(calculated_iip, true))
end
IntegralFunction{true}(f, integrand_prototype)
end
Expand Down
37 changes: 37 additions & 0 deletions tester.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
push:
branches:
- master
paths-ignore:
- 'docs/**'

```@eval
using TOML
using Markdown
version = TOML.parse(read("../../Project.toml", String))["version"]
name = TOML.parse(read("../../Project.toml", String))["name"]
link_manifest = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
"/assets/Manifest.toml"
link_project = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
"/assets/Project.toml"
Markdown.parse("""You can also download the
[manifest]($link_manifest)
file and the
[project]($link_project)
file.
""")
```

warnonly = [:docs_block, :missing_docs, :cross_references, :linkcheck],

Improve docstrings
Such that `makedocs` `warnonly = [:docs_block, :missing_docs, :cross_references, :linkcheck]` can be removed.

Documenter 1.0 upgrade.
Also adds formatter workflow in anticipation of formatter being fixed.
Formatting has thus not yet been applied.
Loading