Skip to content

skpkg: pre-commit codespell fixes #135

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

Merged
merged 7 commits into from
Jun 11, 2025
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
18 changes: 14 additions & 4 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
;; abbreviation for "materials" often used in a journal title
mater

;; alternative use of socioeconomic
socio-economic

;; Frobenius norm used in np.linalg.norm
fro

;; class name within distutils module
ccompiler

;; dum as a C variable
dum

;; gaus used for gaussian
gaus

;; structure file format
discus
DISCUS

;; Periodic table elements
Te
Nd

;; Ois
Ois
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

Expand Down
6 changes: 0 additions & 6 deletions environment.yml

This file was deleted.

23 changes: 23 additions & 0 deletions news/pre-commit-codespell.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Fix misspelled words in source code comments.

**Security:**

* <news item>
4 changes: 2 additions & 2 deletions src/extensions/libpdffit2/PointsInSphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin
*
* Comments: sequencers for lattice points insided 3D sphere
* Comments: sequencers for lattice points inside 3D sphere
*
***********************************************************************/

Expand Down Expand Up @@ -117,7 +117,7 @@ void PointsInSphere::rewind()
mHalfSpan = Rmax*latpar.ar;
hi_m = int(ceil(mHalfSpan));
m = -hi_m;
// make indices n, o invalid, reset the neares point
// make indices n, o invalid, reset the nearest point
n = hi_n = 0;
o = hi_o = outside_o = 0;
n0plane = o0plane = o0line = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/libpdffit2/fit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Mixed definitions of several DataSet, Fit and PdfFit methods
*
* Comments: Up to date with 1.3.10 Fortran version.
* What a spagetti.
* What a spaghetti.
*
***********************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion src/extensions/libpdffit2/metric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void Phase::dtensor(double vec[3], double win[3], double dten[3][3],
}

/********************************************************
Calulates the SCALARPRODUCT of two vectors
Calculates the SCALARPRODUCT of two vectors
1/D**2 = H(I)*K(J)*RTEN(I,J)
uses the phase's metric
*********************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/libpdffit2/nrutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
************************************************************************
*
* Utilities from numerical recipies.
* Utilities from numerical recipes.
*
* Comments:
*
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/libpdffit2/nrutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
************************************************************************
*
* Utilities from numerical recipies.
* Utilities from numerical recipes.
*
* Comments:
*
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/libpdffit2/pdf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Mixed methods for PDF calculation from PdfFit, DataSet and Phase
*
* Comments: Up to date with 1.3.10 Fortran version.
* What a spagetti.
* What a spaghetti.
*
***********************************************************************/

Expand Down Expand Up @@ -1387,7 +1387,7 @@ bool isRegular(Iterator first, Iterator last)

/* Wed Oct 12 2005 - CLF
* Using read_data_arrays adds functionality
* to pdffit2, allowing one to read data that is alread stored as arrays.
* to pdffit2, allowing one to read data that is already stored as arrays.
*/
void DataSet::read_data_arrays(int _iset, char tp, double _qmax, double _qdamp,
int length, double * r_data, double * Gr_data,
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/libpdffit2/pdflsmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void PdfFit::mrqmin(vector<double> &a, vector<int> &ia, matrix<double> &covar,
// Levenberg-Marquardt method, attempting to reduce the value Chi2 of a fit
// between a set of data points x[1..ndata], y[1..ndata] with individual
// standard deviations sig[1..ndata], and a nonlinear function dependent on ma
// coeffcients a[1..ma]. The input array ia[1..ma] indicates by nonzero
// coefficients a[1..ma]. The input array ia[1..ma] indicates by nonzero
// entries those components of a that should be fitted for, and by zero entries
// those components that should be held fixed at their input values. The
// program re- turns current best-fit values for the parameters a[1..ma], and
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/libpdffit2/stru.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ string lstrip(const string &line)
return naked;
}

// substitute all occurences of literal pattern with new string
// substitute all occurrences of literal pattern with new string
void substitute(string& s, const string& pat, const string& sub)
{
string::size_type p;
Expand Down Expand Up @@ -230,7 +230,7 @@ void Phase::read_struct_stream(int _iphase, istream& fstruct)
/******************************************************************
This subroutine reads the header of a structure file
Wed Oct 12 2005 - CLF
Changed ifstream to istream to accomodate stringstreams
Changed ifstream to istream to accommodate stringstreams
as well.
********************************************************************/

Expand Down
4 changes: 2 additions & 2 deletions src/extensions/pdffit2module/misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1381,8 +1381,8 @@ char pypdffit2_bond_length_types__doc__[] =
"\n"
"Return a dictionary of distance data containing:\n"
"\n"
"dij : list of bond lenghts within given bounds\n"
"ddij : list of bond legnth standard deviations\n"
"dij : list of bond lengths within given bounds\n"
"ddij : list of bond length standard deviations\n"
"ij0 : list of tupled pairs of indices starting at 0\n"
"ij1 : list of tupled pairs of indices starting at 1";
char pypdffit2_bond_length_types__name__[] = "bond_length_types";
Expand Down