Skip to content

Commit

Permalink
Run spelling check via GitHub Actions (modelica#3899)
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Nov 25, 2021
1 parent 0d3caed commit 8d09081
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 16 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/checkCron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,42 @@ jobs:
- name: Check links
timeout-minutes: 3
run: python ./.CI/check_html.py checkLinks ./
spelling_checks:
timeout-minutes: 5
if: github.repository_owner == 'modelica'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Setup python environment
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python packages
run: pip install --user codespell
- name: Check for spelling errors
run: |
printf "[codespell]\nenable-colors=\n" >> .codespellrc
codespell -L mesures ./Modelica/Constants.mo
codespell -L nin,inport,fo ./Modelica/StateGraph.mo
codespell -L addd,nd,nin ./Modelica/Blocks/Continuous.mo
codespell -L utput ./Modelica/Electrical/Digital.mo
codespell -L ser ./Modelica/Electrical/Polyphase/Examples/PolyphaseRectifier.mo
codespell -L ser ./Modelica/Electrical/Polyphase/Examples/Utilities/PolyphaseRectifierData.mo
codespell -L pres ./Modelica/Fluid/Dissipation.mo
codespell -L fo,alo,als,cacl,ba,nd ./Modelica/Media/IdealGases/package.mo
codespell -L fo,alo,als,cacl,ba,nd,alow ./Modelica/Media/IdealGases/Common/SingleGasesData.mo
codespell -L alow ./Modelica/Media/IdealGases/Common/Functions.mo
codespell -L alow ./Modelica/Media/IdealGases/Common/package.mo
codespell -L dout ./Modelica/Media/Water/IF97_Utilities.mo
codespell -L archiv ./Modelica/Electrical/Polyphase/UsersGuide/References.mo
codespell -L mot ./Modelica/Electrical/Machines/Examples/ControlledDCDrives
codespell -L singal ./Modelica/Electrical/Analog/UsersGuide/References.mo
codespell -L numer ./Modelica/Math/package.mo
codespell -L inport,nd,wit ./Modelica/Mechanics/Rotational
codespell -L wit ./Modelica/Mechanics/Translational
codespell -L ist ./Modelica/Mechanics/MultiBody
codespell -L klick ./Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo
codespell -L technik ./Modelica/Magnetic/FundamentalWave/UsersGuide/References.mo
codespell --skip ./ObsoleteModelica4.mo,./Modelica/Constants.mo,./Modelica/Blocks/Continuous.mo,./Modelica/StateGraph.mo,./Modelica/Electrical/Digital.mo,./Modelica/Electrical/Polyphase/Examples/PolyphaseRectifier.mo,./Modelica/Electrical/Polyphase/Examples/Utilities/PolyphaseRectifierData.mo,./Modelica/Fluid/Dissipation.mo,./Modelica/Resources,./Modelica/Media/IdealGases/package.mo,./Modelica/Media/IdealGases/Common/SingleGasesData.mo,./Modelica/Media/IdealGases/Common/Functions.mo,./Modelica/Media/IdealGases/Common/package.mo,./Modelica/Media/Water/IF97_Utilities.mo,./Modelica/Electrical/Polyphase/UsersGuide/References.mo,./Modelica/Electrical/Machines/Examples/ControlledDCDrives,./Modelica/Electrical/Analog/UsersGuide/References.mo,./Modelica/Math/package.mo,./Modelica/Mechanics/Rotational,./Modelica/Mechanics/Translational,./Modelica/Mechanics/MultiBody,./Modelica/Magnetic/FluxTubes/UsersGuide/Contact.mo,./Modelica/Magnetic/FundamentalWave/UsersGuide/References.mo,./.CI,./.github,./.git,*.png -L nin,inport,te,sinc,vie,commutating
2 changes: 1 addition & 1 deletion Modelica/Blocks/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ whereas signalExtrema2 catches the extrema rather good due to the fact that samp
<p>The output of these blocks is updated after each period of the signal.</p>
<p>
Using a simple pulse series, these values can be calculated analytically.
Propagating these values as intitial values for the output,
Propagating these values as initial values for the output,
we can compare the numerical solution with the analytical solution:
The output is constant from the beginning.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ equation
<br>the <strong>totally ideal diode</strong> (Ideal) with all parameters to be zero,
the <strong>nearly ideal diode</strong> with <em>Ron=0.1</em> and <em>Goff=0.1</em>
and the nearly ideal but <strong>displaced diode</strong> with <em>Vknee=5</em> and <em>Ron=0.1</em> and <em>Goff=0.1</em>.
The resistance and conductance are chosen untypically high since the slopes should be seen in the graphics.
The resistance and conductance are chosen atypically high since the slopes should be seen in the graphics.
</p><p>Simulate until T=1 s.
Plot in separate windows:
Ideal.i versus Ideal.v, With_Ron_Goff.i versus With_Ron_Goff.v, With_Ron_Goff_Vknee.i versus With_Ron_Goff_Vknee.v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ equation
This example compares three lossless lines with different loads.
Inductance per meter (l=250&nbsp;nH/m) and capacitance per meter (c=100&nbsp;pF/m) are estimated for an average coaxial cable with characteristic impedance z0=&radic;(l/c)=50&nbsp;&Omega;.
The speed of the electromagnetic wave is given by c0=1/&radic;(l*c)=2*10<sup>8</sup>&nbsp;m/s. Using a cable with a length of len=1&nbsp;m, we obtain a delay td=len/c0=5&nbsp;ns.
The sources impress a single voltage pulse with height=10&nbsp;V and lenght=td/2, starting at td/2.
The sources impress a single voltage pulse with height=10&nbsp;V and length=td/2, starting at td/2.
Due to the inner resistances of the sources ri=z0 the pulse at the input of the line (<code>v1</code>) has a height of 5&nbsp;V.
Simulate for 20&nbsp;ns and compare for each of the lines: <code>v1</code>, <code>v2</code> and <code>i1</code>, <code>i2</code>.
</p>
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Sources/LightningImpulse.mo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected
parameter Modelica.Units.SI.Time T0=
if approximation==ImpulseApproximation.DoubleExp then T2*T1/(T2 - T1)*log(T2/T1)
else T1*(m*T2/T1)^(1/(m + 1))
"Intial value of time parameter";
"Initial value of time parameter";
parameter Modelica.Units.SI.Time T(final min=small,
fixed=false, start=T0) "Time when maximum occurs";
parameter Modelica.Units.SI.Time T10(final min=small,
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Digital.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
points={{-58,2},{-34,2},{-34,24.55},{-5.3,24.55}}, color={127,0,127}));
annotation (experiment(StopTime=400),
Documentation(info="<html>
<p>This example is a simple and uncomplete test of a single DLATRAM component . After simulation until 400 s plot dLATRAM.addr[1], dLATRAM.addr[2], and dLATRAM.dataOUT[1], dLATRAM.dataOut[2]. The address inputs are prescribed with all possible combinations of logic values. It can be checked in which cases of address values the output is 'X' or '0'.</p>
<p>This example is a simple and incomplete test of a single DLATRAM component . After simulation until 400 s plot dLATRAM.addr[1], dLATRAM.addr[2], and dLATRAM.dataOUT[1], dLATRAM.dataOut[2]. The address inputs are prescribed with all possible combinations of logic values. It can be checked in which cases of address values the output is 'X' or '0'.</p>
</html>"));
end RAM;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Interfaces "SpacePhasor connector and PartialMachines"

annotation (Documentation(info="<html>
<p>
This package contains partial models for quasi-static transformer and spcae phasor models.
This package contains partial models for quasi-static transformer and space phasor models.
</p>
</html>"));
end Interfaces;
4 changes: 2 additions & 2 deletions Modelica/Magnetic/FluxTubes/Shapes/Force/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package Force "Flux tubes with reluctance force generation; constant permeabilit
Please have a look at <a href=\"modelica://Modelica.Magnetic.FluxTubes.UsersGuide.ReluctanceForceCalculation\">UsersGuide.ReluctanceForceCalculation</a> for an explanation of the different flux tube categories and resulting sub-packages.
</p>
<p>
Flux tube elements with generation of a reluctance force are intended for modelling of position-dependent air gap sections and permanent magnet sections respectively of translatory actuators. By default, the position co-ordinate of the mechanical connector flange.s is identical with the dimension l of the package's flux tube elements. l is the dimension changes with armature motion. If needed, the identity l=flange.s can be replaced by an actuator-specific equation, for example, when a flux tube length increases with decreasing armature position. The position co-ordinate of an element's translatory connector flange.s in turn will be identical with the armature position x in most cases, as the examples illustrate.</p>
Flux tube elements with generation of a reluctance force are intended for modelling of position-dependent air gap sections and permanent magnet sections respectively of translatory actuators. By default, the position coordinate of the mechanical connector flange.s is identical with the dimension l of the package's flux tube elements. l is the dimension changes with armature motion. If needed, the identity l=flange.s can be replaced by an actuator-specific equation, for example, when a flux tube length increases with decreasing armature position. The position coordinate of an element's translatory connector flange.s in turn will be identical with the armature position x in most cases, as the examples illustrate.</p>
<p>
The derivative of each element's permeance with respect to armature position <code>dGmBydx</code> is calculated from the derivative of the flux tube's permeance with respect to its varying dimension dGmBydl and the derivative of this dimension with respect to armature position <code>dlBydx</code>:</p>

Expand All @@ -18,7 +18,7 @@ dG_m dG_m dl
</pre></blockquote>

<p>
The parameter <code>dlBydx</code> must be set in each flux tube element to +1 or -1 according to the definition of the armature co-ordinate and the position of the element in a device's magnetic circuit. Proper match between armature motion and resulting variation of the flux tube length assures that the element's reluctance force acts in the right direction.
The parameter <code>dlBydx</code> must be set in each flux tube element to +1 or -1 according to the definition of the armature coordinate and the position of the element in a device's magnetic circuit. Proper match between armature motion and resulting variation of the flux tube length assures that the element's reluctance force acts in the right direction.
</p>
<p>
The shapes of the flux tubes defined in this package are rather simple. Only one dimension varies with armature motion. Flux tubes with more complex variations of dimensions with armature motion can be defined by extending the base class <a href=\"modelica://Modelica.Magnetic.FluxTubes.BaseClasses.Force\">BaseClasses.Force</a>, if needed. Determination of the analytic derivative dGmBydl could become more complex for those flux tubes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The parameter <code>ratioCommonLeakage</code> has a default of 1, which is perfe
<h4>Note</h4>
<p>
For a model with <code>ratioCommonLeakage &lt; 1 - eps</code> (including individual stray inductances)
typically more states have to be inialized than
typically more states have to be initialized than
for a model with <code>ratioCommonLeakage = 1</code> (without individual stray inductances).
See: <code>initial equation</code> section of example
<a href=\"modelica://Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.InductionMachines.ComparisonPolyphase.IMC_DOL_CommonLeakage\">IMC_DOL_CommonLeakage</a>,
Expand Down
4 changes: 2 additions & 2 deletions Modelica/Math/Nonlinear.mo
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The following integrals are computed:
annotation (Dialog(group="Elliptic integral"));
input Real b3=Modelica.Constants.pi/2 "Upper limit"
annotation (Dialog(group="Elliptic integral"));
input Real k=1/sqrt(2) "Modul"
input Real k=1/sqrt(2) "Module"
annotation (Dialog(group="Elliptic integral"));

protected
Expand Down Expand Up @@ -381,7 +381,7 @@ The displacement field <code>u(c,t)</code> of a particle (where <code>c</code> i

function fun6 "y = sqrt(1/(1 - k^2*sin(u)^2))"
extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
input Real k "Modul";
input Real k "Module";
algorithm
y := sqrt(1/(1 - k^2*sin(u)^2));
end fun6;
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Units.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@ Copyright &copy; 1998-2020, Modelica Association and contributors
<li><em>May 25, 2011</em> by Stefan Wischhusen:<br>Added molar units for energy and enthalpy.</li>
<li><em>Jan. 27, 2010</em> by Christian Kral:<br>Added complex units.</li>
<li><em>Dec. 14, 2005</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>Add User&#39;s Guide and removed &quot;min&quot; values for Resistance and Conductance.</li>
<li><em>October 21, 2002</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and Christian Schweiger:<br>Added new package <strong>Conversions</strong>. Corrected typo <em>Wavelenght</em>.</li>
<li><em>October 21, 2002</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and Christian Schweiger:<br>Added new package <strong>Conversions</strong>. Corrected typo <em>Wavelength</em>.</li>
<li><em>June 6, 2000</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>Introduced the following new types<br>type Temperature = ThermodynamicTemperature;<br>types DerDensityByEnthalpy, DerDensityByPressure, DerDensityByTemperature, DerEnthalpyByPressure, DerEnergyByDensity, DerEnergyByPressure<br>Attribute &quot;final&quot; removed from min and max values in order that these values can still be changed to narrow the allowed range of values.<br>Quantity=&quot;Stress&quot; removed from type &quot;Stress&quot;, in order that a type &quot;Stress&quot; can be connected to a type &quot;Pressure&quot;.</li>
<li><em>Oct. 27, 1999</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>New types due to electrical library: Transconductance, InversePotential, Damping.</li>
<li><em>Sept. 18, 1999</em> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>Renamed from SIunit to SIunits. Subpackages expanded, i.e., the SIunits package, does no longer contain subpackages.</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ModelicaTest.Electrical;
model SingularTransfomer
model SingularTransformer
extends Modelica.Icons.Example;
parameter Real L=2 annotation (Evaluate=true);
Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage1(
Expand Down Expand Up @@ -48,10 +48,10 @@ equation
annotation (
Documentation(info="<html>
<p>
This model shows a transformer, where the transfomer has not 2 states, but only
This model shows a transformer, where the transformer has not 2 states, but only
1 state since L1=L2=M. Some tools might be not able to detect this. In this
case, translation or simulation fails with a division by zero.
</p>
</html>"),
experiment(StopTime=1.1));
end SingularTransfomer;
end SingularTransformer;
2 changes: 1 addition & 1 deletion ModelicaTest/Electrical/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Analog
Machines
PowerConverters
QuasiStatic
SingularTransfomer
SingularTransformer
MultiSensorTest

0 comments on commit 8d09081

Please sign in to comment.