Skip to content

Commit 8cbfd75

Browse files
Merge pull request #243 from ArnoStrouwen/qa
typos + Aqua ci
2 parents c85424e + 9b5cbd3 commit 8cbfd75

File tree

17 files changed

+58
-15
lines changed

17 files changed

+58
-15
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ updates:
55
directory: "/" # Location of package manifests
66
schedule:
77
interval: "weekly"
8+
ignore:
9+
- dependency-name: "crate-ci/typos"
10+
update-types: ["version-update:semver-patch"]

.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@v3
12+
- name: Check spelling
13+
uses: crate-ci/[email protected]

.typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[default.extend-words]
2+
Nd = "Nd"
3+
nin = "nin"
4+
coul = "coul"

Project.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
1212
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1313

1414
[compat]
15+
Aqua = "0.8"
1516
ChainRulesCore = "1"
17+
ControlSystemsBase = "1"
18+
DataInterpolations = "4"
1619
DiffEqBase = "6"
1720
IfElse = "0.1"
21+
LinearAlgebra = "1"
1822
ModelingToolkit = "8.67"
23+
OrdinaryDiffEq = "6"
24+
SafeTestsets = "0.1"
1925
Symbolics = "4.9, 5"
26+
Test = "1"
2027
julia = "1.6"
2128

2229
[extras]
30+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
2331
ControlSystemsBase = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
2432
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
2533
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -28,4 +36,4 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
2836
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2937

3038
[targets]
31-
test = ["LinearAlgebra", "OrdinaryDiffEq", "SafeTestsets", "Test", "ControlSystemsBase", "DataInterpolations"]
39+
test = ["Aqua", "LinearAlgebra", "OrdinaryDiffEq", "SafeTestsets", "Test", "ControlSystemsBase", "DataInterpolations"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ the documentation, which contains the unreleased features.
3232

3333
## Libraries
3434

35-
The following are the constituant libraries of the ModelingToolkit Standard Library.
35+
The following are the constituent libraries of the ModelingToolkit Standard Library.
3636

3737
- [Basic Blocks](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/blocks/)
3838
- [Mechanical Components](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/mechanical/)

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Pkg.add("ModelingToolkitStandardLibrary")
2121

2222
## Libraries
2323

24-
The following are the constituant libraries of the ModelingToolkit Standard Library.
24+
The following are the constituent libraries of the ModelingToolkit Standard Library.
2525

2626
- [Basic Blocks](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/blocks/)
2727
- [Mechanical Components](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/mechanical/)

docs/src/tutorials/input_component.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ prob = ODEProblem(sys, [], (0, time[end]))
4747
sol = solve(prob, ImplicitEuler())
4848
```
4949

50-
If we want to run a new data set, this requires building a new `LinearInterpolation` and `ODESystem` followed by running `structural_simplify`, all of which takes time. Therefore, to run serveral pieces of data it's better to re-use an `ODESystem`. The next couple methods will demonstrate how to do this.
50+
If we want to run a new data set, this requires building a new `LinearInterpolation` and `ODESystem` followed by running `structural_simplify`, all of which takes time. Therefore, to run several pieces of data it's better to re-use an `ODESystem`. The next couple methods will demonstrate how to do this.
5151

5252
## Custom Component with External Data
5353

@@ -105,7 +105,7 @@ Additional code could be added to resolve this issue, for example by using a `Re
105105

106106
## `SampledData` Component
107107

108-
To resolve the issues presented above, the `ModelingToolkitStandardLibrary.Blocks.SampledData` component can be used which allows for a resusable `ODESystem` and self contained data which ensures a solution which remains valid for it's lifetime. Now it's possible to also parallize the call to `solve()`.
108+
To resolve the issues presented above, the `ModelingToolkitStandardLibrary.Blocks.SampledData` component can be used which allows for a resusable `ODESystem` and self contained data which ensures a solution which remains valid for it's lifetime. Now it's possible to also parallelize the call to `solve()`.
109109

110110
```julia
111111
function System(; name)
@@ -146,4 +146,4 @@ sol2 = Ref{ODESolution}()
146146
end
147147
```
148148

149-
Note, in the above example, we can build the system with an empty `SampledData` component, only setting the expected data type: `@named src = SampledData(Float64)`. It's also possible to initialize the component with real sampled data: `@named src = SampledData(data, dt)`. Additionally note that before running an `ODEProblem` using the `SampledData` component, one must be careful about the parameter vector Type. The `SampledData` component contains a `buffer` parameter of type `Parameter`, therefore we must generate the problem using `tofloat=false`. This will initially give a parameter vector of type `Vector{Any}` with a mix of numbers and `Parameter` type. We can convert the vector to a uniform `Parameter` type by running `p = Parameter.(p)`. This will wrap all the single values in a `Parameter` which will be mathmatically equivalent to a `Number`.
149+
Note, in the above example, we can build the system with an empty `SampledData` component, only setting the expected data type: `@named src = SampledData(Float64)`. It's also possible to initialize the component with real sampled data: `@named src = SampledData(data, dt)`. Additionally note that before running an `ODEProblem` using the `SampledData` component, one must be careful about the parameter vector Type. The `SampledData` component contains a `buffer` parameter of type `Parameter`, therefore we must generate the problem using `tofloat=false`. This will initially give a parameter vector of type `Vector{Any}` with a mix of numbers and `Parameter` type. We can convert the vector to a uniform `Parameter` type by running `p = Parameter.(p)`. This will wrap all the single values in a `Parameter` which will be mathematically equivalent to a `Number`.

src/Blocks/analysis_points.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ eqs = [connect(P.output, C.input)
5252
connect(C.output, :plant_input, P.input)]
5353
sys = ODESystem(eqs, t, systems = [P, C], name = :feedback_system)
5454
55-
matrices_S, _ = get_sensitivity(sys, :plant_input) # Compute the matrices of a state-space representation of the (input) sensitivity funciton.
55+
matrices_S, _ = get_sensitivity(sys, :plant_input) # Compute the matrices of a state-space representation of the (input) sensitivity function.
5656
matrices_T, _ = get_comp_sensitivity(sys, :plant_input)
5757
```
5858

src/Blocks/continuous.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ To set the initial state, it's recommended to set the initial condition for `x`,
572572
573573
# Parameters:
574574
- `b`: Numerator polynomial coefficients, e.g., `2s + 3` is specified as `[2, 3]`
575-
- `a`: Denomenator polynomial coefficients, e.g., `s² + 2ωs + ω^2` is specified as `[1, 2ω, ω^2]`
575+
- `a`: Denominator polynomial coefficients, e.g., `s² + 2ωs + ω^2` is specified as `[1, 2ω, ω^2]`
576576
577577
# Connectors:
578578
- `input`

src/Electrical/Digital/logic.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@enum Logic Uninitialized=1 ForcingUnknown ForcingZero ForcingOne HighImpedence WeakUnknown WeakZero WeakOne DontCare
1+
@enum Logic Uninitialized=1 ForcingUnknown ForcingZero ForcingOne HighImpedance WeakUnknown WeakZero WeakOne DontCare
22

33
const U = Uninitialized
44
const X = ForcingUnknown
55
const F0 = ForcingZero
66
const F1 = ForcingOne
7-
const Z = HighImpedence
7+
const Z = HighImpedance
88
const W = WeakUnknown
99
const L = WeakZero
1010
const H = WeakOne

0 commit comments

Comments
 (0)