Skip to content

Commit 9541d39

Browse files
authored
Merge pull request #4 from python-hydro/codespell
add codespell action
2 parents 56ed664 + 8956e5a commit 9541d39

15 files changed

Lines changed: 81 additions & 23 deletions

File tree

.codespell-ignore-words

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
blocs
2+
bloc
3+
inout
4+
als
5+
truns
6+
pres
7+
dum
8+
fom
9+
fromm
10+
thi
11+
nd
12+
ue
13+
bion
14+
aas
15+
checkin
16+
indx
17+
ans
18+
precesses
19+
fpr
20+
bu
21+
delt

.codespellrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
skip = .git,*.bib,*.ps,*.pdf
3+
ignore-words = .codespell-ignore-words
4+
5+

.github/workflows/codespell.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: codespell
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
codespell:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version: '3.14'
22+
23+
- name: Install codespell
24+
run: pip install codespell jupyter nbconvert
25+
26+
- name: Preprocess notebooks
27+
run: for i in $(find . -name "*.ipynb"); do jupyter nbconvert --clear-output --inplace $i; done
28+
29+
- name: Run codespell
30+
run: |
31+
codespell content
32+

advection/advection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
5656
self.xmin = xmin
5757
self.xmax = xmax
5858

59-
# python is zero-based. Make easy intergers to know where the
59+
# python is zero-based. Make easy integers to know where the
6060
# real data lives
6161
self.ilo = ng
6262
self.ihi = ng+nx-1
@@ -182,7 +182,7 @@ def states(self, dt):
182182

183183

184184
# loop over all the interfaces. Here, i refers to the left
185-
# interface of the zone. Note that thre are 1 more interfaces
185+
# interface of the zone. Note that there are 1 more interfaces
186186
# than zones
187187
al = g.scratch_array()
188188
ar = g.scratch_array()

advection/fdadvect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
2424
self.ng = ng
2525
self.nx = nx
2626

27-
# python is zero-based. Make easy intergers to know where the
27+
# python is zero-based. Make easy integers to know where the
2828
# real data lives
2929
self.ilo = ng
3030
self.ihi = ng+nx-1

advection/fv_mol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0):
1010
self.ng = ng
1111
self.nx = nx
1212

13-
# python is zero-based. Make easy intergers to know where the
13+
# python is zero-based. Make easy integers to know where the
1414
# real data lives
1515
self.ilo = ng
1616
self.ihi = ng+nx-1

basic_numerics/FFT/fft_simple_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def plot_FFT(xx, xmax, f, outfile):
8282
fk_r = fk.real
8383
fk_i = fk.imag
8484

85-
# the fftfreq returns the postive and negative (and 0) frequencies
85+
# the fftfreq returns the positive and negative (and 0) frequencies
8686
# the newer versions of numpy (>=1.8) have an rfftfreq() function
8787
# that really does what we want -- we'll use that here.
8888
k = np.fft.rfftfreq(npts)

burgers/burgers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0, bc="outflow"):
2929

3030
self.bc=bc
3131

32-
# python is zero-based. Make easy intergers to know where the
32+
# python is zero-based. Make easy integers to know where the
3333
# real data lives
3434
self.ilo = ng
3535
self.ihi = ng+nx-1

compressible/MOL/Fortran/riemann.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
! Fry: Fryxell et al. 2000, ApJS, 131, 273.
3434
!
3535
! Toro: Toro 1999, ``Riemann Solvers and Numerical Methods for Fluid
36-
! Dynamcs: A Practical Introduction, 2nd Ed.'', Springer-Verlag
36+
! Dynamics: A Practical Introduction, 2nd Ed.'', Springer-Verlag
3737
!
3838

3939
module riemann_module
@@ -139,7 +139,7 @@ subroutine riemann(gamma, &
139139

140140

141141
! begin the secant iteration -- see CG Eq. 17 for details. We will
142-
! continue to interate for convergence until the error falls below
142+
! continue to iterate for convergence until the error falls below
143143
! tol (in which case, things are good), or we hit nriem iterations
144144
! (in which case we have a problem, and we spit out an error).
145145
has_converged = .false.
@@ -222,7 +222,7 @@ subroutine riemann(gamma, &
222222

223223
ustar_sgn = sign(1.d0, ustar)
224224

225-
! decide which state is located at the zone iterface based on
225+
! decide which state is located at the zone interface based on
226226
! the values of the wave speeds. This is just saying that if
227227
! ustar > 0, then the state is U_L. if ustar < 0, then the
228228
! state on the axis is U_R.

compressible/MOL/python/euler_mol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, nx, ng, xmin=0.0, xmax=1.0, bcs="outflow"):
2424

2525
self.bcs = bcs
2626

27-
# python is zero-based. Make easy intergers to know where the
27+
# python is zero-based. Make easy integers to know where the
2828
# real data lives
2929
self.ilo = ng
3030
self.ihi = ng+nx-1

0 commit comments

Comments
 (0)