diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt index 186fda9d..f91947db 100644 --- a/.codespell/ignore_words.txt +++ b/.codespell/ignore_words.txt @@ -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 diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst index ff9c3561..e8199ca5 100644 --- a/CODE_OF_CONDUCT.rst +++ b/CODE_OF_CONDUCT.rst @@ -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. diff --git a/environment.yml b/environment.yml deleted file mode 100644 index 3979d3cb..00000000 --- a/environment.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: diffpy.pdffit2 -channels: - - conda-forge -dependencies: - - python=3 - - pip diff --git a/news/pre-commit-codespell.rst b/news/pre-commit-codespell.rst new file mode 100644 index 00000000..7958fb2c --- /dev/null +++ b/news/pre-commit-codespell.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Fix misspelled words in source code comments. + +**Security:** + +* diff --git a/src/extensions/libpdffit2/PointsInSphere.cc b/src/extensions/libpdffit2/PointsInSphere.cc index 8e51c575..881812a0 100644 --- a/src/extensions/libpdffit2/PointsInSphere.cc +++ b/src/extensions/libpdffit2/PointsInSphere.cc @@ -14,7 +14,7 @@ * * classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin * -* Comments: sequencers for lattice points insided 3D sphere +* Comments: sequencers for lattice points inside 3D sphere * ***********************************************************************/ @@ -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; diff --git a/src/extensions/libpdffit2/fit.cc b/src/extensions/libpdffit2/fit.cc index 4426aa29..9bcda15f 100644 --- a/src/extensions/libpdffit2/fit.cc +++ b/src/extensions/libpdffit2/fit.cc @@ -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. * ***********************************************************************/ diff --git a/src/extensions/libpdffit2/metric.cc b/src/extensions/libpdffit2/metric.cc index 5f696495..5c06c4f5 100644 --- a/src/extensions/libpdffit2/metric.cc +++ b/src/extensions/libpdffit2/metric.cc @@ -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 *********************************************************/ diff --git a/src/extensions/libpdffit2/nrutil.cc b/src/extensions/libpdffit2/nrutil.cc index 34c6060c..ab466359 100644 --- a/src/extensions/libpdffit2/nrutil.cc +++ b/src/extensions/libpdffit2/nrutil.cc @@ -12,7 +12,7 @@ * ************************************************************************ * -* Utilities from numerical recipies. +* Utilities from numerical recipes. * * Comments: * diff --git a/src/extensions/libpdffit2/nrutil.h b/src/extensions/libpdffit2/nrutil.h index ee1bd4cb..fca40510 100644 --- a/src/extensions/libpdffit2/nrutil.h +++ b/src/extensions/libpdffit2/nrutil.h @@ -12,7 +12,7 @@ * ************************************************************************ * -* Utilities from numerical recipies. +* Utilities from numerical recipes. * * Comments: * diff --git a/src/extensions/libpdffit2/pdf.cc b/src/extensions/libpdffit2/pdf.cc index 0ab857b6..595fee96 100644 --- a/src/extensions/libpdffit2/pdf.cc +++ b/src/extensions/libpdffit2/pdf.cc @@ -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. * ***********************************************************************/ @@ -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, diff --git a/src/extensions/libpdffit2/pdflsmin.cc b/src/extensions/libpdffit2/pdflsmin.cc index 078d2754..74c7d075 100644 --- a/src/extensions/libpdffit2/pdflsmin.cc +++ b/src/extensions/libpdffit2/pdflsmin.cc @@ -65,7 +65,7 @@ void PdfFit::mrqmin(vector &a, vector &ia, matrix &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 diff --git a/src/extensions/libpdffit2/stru.cc b/src/extensions/libpdffit2/stru.cc index f9022f23..4f1a6a60 100644 --- a/src/extensions/libpdffit2/stru.cc +++ b/src/extensions/libpdffit2/stru.cc @@ -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; @@ -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. ********************************************************************/ diff --git a/src/extensions/pdffit2module/misc.cc b/src/extensions/pdffit2module/misc.cc index f3f22a21..6d3bf4f6 100644 --- a/src/extensions/pdffit2module/misc.cc +++ b/src/extensions/pdffit2module/misc.cc @@ -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";