Skip to content

Commit cb0a9fc

Browse files
authored
add codespell CI (AMReX-Astro#1176)
1 parent 5cd303a commit cb0a9fc

File tree

34 files changed

+112
-51
lines changed

34 files changed

+112
-51
lines changed

.codespell-ignore-words

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
blocs
2+
bloc
3+
inout
4+
pres
5+
bion
6+
tye
7+
delt
8+
thi
9+
daa
10+
numer
11+
clen
12+
coul
13+
dum
14+
crate
15+
vie

.codespellrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
skip = .git,*.ipynb,*.bib,*.ps,*~
3+
ignore-words = .codespell-ignore-words
4+
5+

.github/workflows/codespell.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: codespell
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
- main
8+
pull_request:
9+
branches:
10+
- development
11+
12+
jobs:
13+
codespell:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.10'
25+
26+
- name: Cache pip
27+
uses: actions/cache@v3
28+
with:
29+
# this path is specific to Ubuntu
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
32+
restore-keys: |
33+
${{ runner.os }}-pip-
34+
35+
- name: Install dependencies
36+
run: pip install codespell
37+
38+
- name: Run codespell
39+
run: |
40+
codespell
41+

CHANGES.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
# 22.11
6868

69-
* use of the auxillary state to define composition is now enabled
69+
* use of the auxiliary state to define composition is now enabled
7070
via USE_AUX_THERMO and the preprocessor variable AUX_THERMO
7171
(#1003)
7272

@@ -175,7 +175,7 @@
175175
breakout reactions (#751)
176176

177177
* Some fixes to the NSE bailout in aprox19 (#739, #753, #755) and
178-
the relaxation check on the NSE critera (#754)
178+
the relaxation check on the NSE criteria (#754)
179179

180180
* Added a new unit test for single-zone SDC (burn_cell_sdc) (#744)
181181

@@ -560,7 +560,7 @@
560560
corresponding inverse from the work of Deboer et al. 2017
561561
(https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.89.035007).
562562
To use the new rate, user must set `use_c12ag_deboer17` to `true`.
563-
This rate is only useable in the `aprox13`, `aprox19`, `aprox21`,
563+
This rate is only usable in the `aprox13`, `aprox19`, `aprox21`,
564564
and `iso7` reaction rate networks. Closes issue #44.
565565

566566
* a routine util/cj_detonation was added to compute the
@@ -582,7 +582,7 @@
582582

583583
* we now disable some composition derivatives in the EOS
584584
by default, for performance and memory reasons. They can
585-
be reenabled by defining the preprocessor variable
585+
be re-enabled by defining the preprocessor variable
586586
EXTRA_THERMO (PR #59)
587587

588588
# 17.10

EOS/helmholtz/actual_eos.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ void apply_coulomb_corrections (T& state)
677677

678678
// uniform background corrections only
679679
// from yakovlev & shalybkov 1989
680-
// lami is the average ion seperation
680+
// lami is the average ion separation
681681
// plasg is the plasma coupling parameter
682682

683683
Real ytot1 = 1.0e0_rt / state.abar;

integration/VODE/actual_integrator.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void actual_integrator (burn_t& state, Real dt)
7676
// this in case we failed in our burn here because we entered NSE
7777

7878
#ifdef AUX_THERMO
79-
// need to sync the auxilary data up with the new mass fractions
79+
// need to sync the auxiliary data up with the new mass fractions
8080
set_aux_comp_from_X(state);
8181
#endif
8282

integration/VODE/vode_type.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef ArrayUtil::MathArray2D<1, VODE_NEQS, 1, VODE_NEQS> RArray2D;
1717

1818
const amrex::Real UROUND = std::numeric_limits<amrex::Real>::epsilon();
1919

20-
// CCMXJ = Threshhold on DRC for updating the Jacobian
20+
// CCMXJ = Threshold on DRC for updating the Jacobian
2121
const amrex::Real CCMXJ = 0.2e0_rt;
2222

2323
const amrex::Real HMIN = 0.0_rt;

integration/integrator_rhs_strang.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void rhs (const Real time, burn_t& state, T& int_state, RArray1D& ydot, [[maybe_
3636
// network
3737

3838
// Fix the state as necessary -- this ensures that the mass
39-
// fractions that enter are valud (and optionally normalized)
39+
// fractions that enter are valid (and optionally normalized)
4040

4141
clean_state(int_state);
4242

integration/nse_update_strang.H

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void nse_burn(burn_t& state, const Real dt) {
5252

5353
// call the NSE table using the * state to get the t^{n+1}
5454
// source estimates. The thermodynamnics here is specified
55-
// in terms of the auxillary composition, Ye, abar, and B/A
55+
// in terms of the auxiliary composition, Ye, abar, and B/A
5656

5757
nse_interp(T_in, state.rho, state.aux[iye],
5858
abar_out, dq_out, dyedt, X);
@@ -61,7 +61,7 @@ void nse_burn(burn_t& state, const Real dt) {
6161

6262
state.aux[iye] += dt * dyedt;
6363

64-
// now get the composition from the table using the upated Ye
64+
// now get the composition from the table using the updated Ye
6565

6666
nse_interp(T_in, state.rho, state.aux[iye],
6767
abar_out, dq_out, dyedt, X);

interfaces/burn_type.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef amrex::Array1D<Real, 1, neqs> YdotNetArray1D;
3737

3838
#if defined(SDC_EVOLVE_ENERGY)
3939

40-
// these indicies represent the order that the conserved state comes
40+
// these indices represent the order that the conserved state comes
4141
// into the ODE integration from the hydro code.
4242
//
4343
// they also represent the order of the advective sources

networks/aprox19/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ from Stan:
2323
> Probably all the code needs for hydrodynamics and energy generation
2424
> is abar and Ye (given rho and T) so to follow explosions you can use
2525
> the smaller table. It also gives crude measures of nucleosyntheis in
26-
> n+p+helium, si-ca, fe group. Probaly good enough for NSE
26+
> n+p+helium, si-ca, fe group. Probably good enough for NSE
2727
>
2828
> If you are following bufk nucleosynthesis you can use the larger table
2929
> which gives 125 isotopes packaged into 19 (CASTRO used to use the 19
@@ -48,7 +48,7 @@ The mapping of the nuclei from the large network to the 19 we carry is:
4848
* 13: 44Ti
4949
* 14: 48Cr
5050
* 15: 52Fe
51-
* 16: all oher iron group except 56Ni
51+
* 16: all other iron group except 56Ni
5252
* 17: 56Ni
5353
* 18: neutrons
5454
* 19: protons
@@ -158,4 +158,4 @@ similar rate for beta decay and positron capture
158158
159159
So if electron capture dominates wrate is positive
160160
161-
The inference is that it is a positive term that is subtracted from Ye
161+
The inference is that it is a positive term that is subtracted from Ye

networks/general_null/breakout.net

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# name short-name aion zion
55
X X 1.0 1.0
66

7-
# auxillary variables
7+
# auxiliary variables
88
__aux_Ye
99
__aux_invmu

networks/general_null/gammalaw_aux.net

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# name short-name aion zion
55
X X 1.0 1.0
66

7-
# auxillary variables
7+
# auxiliary variables
88
__aux_Ye

networks/general_null/network_param_file.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""core functions for deailing with a network file"""
1+
"""core functions for dealing with a network file"""
22

33
import sys
44

@@ -17,13 +17,13 @@ def __str__(self):
1717

1818

1919
class AuxVar:
20-
"""convenience class for an auxilliary variable"""
20+
"""convenience class for an auxiliary variable"""
2121
def __init__(self):
2222
self.name = ""
2323
self.preprocessor = None
2424

2525
def __str__(self):
26-
return f"auxillary variable {self.name}"
26+
return f"auxiliary variable {self.name}"
2727

2828

2929
class UnusedVar:
@@ -151,15 +151,15 @@ def parse_network_object(fields, defines):
151151
ret = AuxVar()
152152
ret.name = fields[0][6:]
153153
# we can put a preprocessor variable after the aux name to
154-
# require that it be set in order to define the auxillary
154+
# require that it be set in order to define the auxiliary
155155
# variable
156156
try:
157157
ret.preprocessor = fields[1]
158158
except IndexError:
159159
ret.preprocessor = None
160160

161161
# we can put a preprocessor variable after the aux name to
162-
# require that it be set in order to define the auxillary
162+
# require that it be set in order to define the auxiliary
163163
# variable
164164
try:
165165
ret.preprocessor = fields[1]
@@ -173,7 +173,7 @@ def parse_network_object(fields, defines):
173173
ret = UnusedVar()
174174

175175
# we can put a preprocessor variable after the aux name to
176-
# require that it be set in order to define the auxillary
176+
# require that it be set in order to define the auxiliary
177177
# variable
178178
try:
179179
ret.preprocessor = fields[1]

networks/rprox/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ essentially the network described in Appendix C of Wallace & Woosley,
55
ApJS 45, 389 (1981) but with updated reaction rates from ReacLib.
66

77
The default setup is for burning in a neutron star atmosphere. If you
8-
want a setup at lower density, you need to change the Lweak paramter
8+
want a setup at lower density, you need to change the Lweak parameter
99
in actual_rhs.f90.
1010

1111
This network was used in:

neutrinos/sneut5.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void sneut5(const Real temp, const Real den,
285285
// theta is sin**2(theta_weinberg) = 0.2319 plus/minus 0.00005 (1996)
286286
// xnufam is the number of neutrino flavors = 3.02 plus/minus 0.005 (1998)
287287
// change theta and xnufam if need be, and the changes will automatically
288-
// propagate through the routine. cv and ca are the vektor and axial currents.
288+
// propagate through the routine. cv and ca are the vector and axial currents.
289289

290290
constexpr Real theta = 0.2319e0_rt;
291291
constexpr Real xnufam = 3.0e0_rt;

nse_solver/nse_check.H

+4-4
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ void nse_union(const int nuc_ind_a, const int nuc_ind_b, amrex::Array1D<int, 1,
653653
AMREX_GPU_HOST_DEVICE AMREX_INLINE
654654
int get_pair_rate_index(const int& rate_index){
655655

656-
// This funciton finds the pair rate index given a rate.
656+
// This function finds the pair rate index given a rate.
657657
// For example given forward rate index, return reverse rate index, vice versa
658658

659659
int pair_rate_index = -1;
@@ -949,7 +949,7 @@ void nse_grouping(amrex::Array1D<int, 1, NumSpec>& group_ind, const burn_t& stat
949949
merge_indices(2) = -1;
950950
fastest_t = std::numeric_limits<amrex::Real>::max();
951951

952-
// Find the fastest time scale of the avaliable reaction
952+
// Find the fastest time scale of the available reaction
953953

954954
for (int n = 1; n <= Rates::NumRates; ++n){
955955

@@ -1002,7 +1002,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) {
10021002
}
10031003

10041004
// We can do a further approximation where we use the NSE mass fractions
1005-
// instead of the current mass fractions. This makes the check soley dependent on
1005+
// instead of the current mass fractions. This makes the check solely dependent on
10061006
// the thermodynamic condition.
10071007
// Note we only do this after the first check, which should tell us whether
10081008
// our current mass fractions are in the ballpark of NSE mass fractions.
@@ -1067,7 +1067,7 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) {
10671067
ydot(NumSpec + 1) = enuc - sneut;
10681068

10691069
// Now we look through the network and see if there are fast reaction cycles
1070-
// Need to separate forward and reverse rate and detemine each step is fast enough.
1070+
// Need to separate forward and reverse rate and determine each step is fast enough.
10711071
// use vectors for now
10721072

10731073
bool found_fast_reaction_cycle = false;

screening/screen.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ void chabrier1998 (const plasma_state_t& state,
890890
}
891891

892892
// Now we add quantum correction terms discussed in Alastuey 1978.
893-
// Notice in Alastuey 1978, they have a differnt classical term,
893+
// Notice in Alastuey 1978, they have a different classical term,
894894
// which is implemented in the strong screening limit of our screen5 routine.
895895

896896
// See Wallace1982, Eq. A13

sphinx_docs/source/integrators.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ This involves an EOS call and is the default behavior of the integration.
303303

304304
If desired, the EOS call can be skipped and the temperature kept
305305
frozen over the entire time interval of the integration. This is done
306-
bu setting ``integrator.call_eos_in_rhs = 0``.
306+
by setting ``integrator.call_eos_in_rhs = 0``.
307307

308308
Note also that for the Jacobian, we need the specific heat, :math:`c_v`, since we
309309
usually calculate derivatives with respect to temperature (as this is the form

unit_test/burn_cell_primordial_chem/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
because our equations are very stiff (stiffness ratios are as high as 1e31)
1616
because y/ydot (natural timescale for a species abundance to vary) can be
1717
very different (by factors ~ 1e30) for different species.
18-
However, state.rho still conatins the density in g/cm^3, and state.e
18+
However, state.rho still contains the density in g/cm^3, and state.e
1919
still contains the specific internal energy in erg/g/K.
2020

2121
# continuous integration

unit_test/burn_cell_sdc/parse_integration_failure.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040

4141
import sys
4242

43+
4344
def doit(string):
4445
"""break down the SDC VODE integration failure message"""
4546

46-
# figure out if it is the VODE failre or burn_t that was provided
47+
# figure out if it is the VODE failure or burn_t that was provided
4748

4849
is_vode = False
4950
rhoe = None

unit_test/test_ase/make_table/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NSE check tables
22

3-
This test is used to have a table that has a variety of differen rho,
3+
This test is used to have a table that has a variety of different rho,
44
T, and Y_e, to test the valitidy of the function `in_nse`.
55

66
We solve for the NSE state for variety of different conditions, and update

unit_test/test_conductivity/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void main_main ()
112112
// time = starting time in the simulation
113113
Real time = 0.0;
114114

115-
// How Boxes are distrubuted among MPI processes
115+
// How Boxes are distributed among MPI processes
116116
DistributionMapping dm(ba);
117117

118118
// we allocate our main multifabs

unit_test/test_eos/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void main_main ()
104104
// time = starting time in the simulation
105105
Real time = 0.0;
106106

107-
// How Boxes are distrubuted among MPI processes
107+
// How Boxes are distributed among MPI processes
108108
DistributionMapping dm(ba);
109109

110110
// we allocate our main multifabs

unit_test/test_jac/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void main_main ()
112112
// time = starting time in the simulation
113113
Real time = 0.0;
114114

115-
// How Boxes are distrubuted among MPI processes
115+
// How Boxes are distributed among MPI processes
116116
DistributionMapping dm(ba);
117117

118118
// we allocate our main multifabs

unit_test/test_react/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void main_main ()
118118
// time = starting time in the simulation
119119
Real time = 0.0;
120120

121-
// How Boxes are distrubuted among MPI processes
121+
// How Boxes are distributed among MPI processes
122122
DistributionMapping dm(ba);
123123

124124
// we allocate our main multifabs
@@ -165,7 +165,7 @@ void main_main ()
165165
amrex::max(xn[n], 1.e-10_rt);
166166
}
167167

168-
// initialize the auxillary state (in particular, for NSE)
168+
// initialize the auxiliary state (in particular, for NSE)
169169
#ifdef AUX_THERMO
170170
eos_t eos_state;
171171
for (int n = 0; n < NumSpec; n++) {

0 commit comments

Comments
 (0)