diff --git a/.codespell/ignore_lines.txt b/.codespell/ignore_lines.txt new file mode 100644 index 0000000..07fa7c8 --- /dev/null +++ b/.codespell/ignore_lines.txt @@ -0,0 +1,2 @@ +;; Please include filenames and explanations for each ignored line. +;; See https://docs.openverse.org/meta/codespell.html for docs. diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt new file mode 100644 index 0000000..9757d7c --- /dev/null +++ b/.codespell/ignore_words.txt @@ -0,0 +1,11 @@ +;; Please include explanations for each ignored word (lowercase). +;; See https://docs.openverse.org/meta/codespell.html for docs. + +;; abbreviation for "materials" often used in a journal title +mater + +;; alternative use of socioeconomic +socio-economic + +;; Frobenius norm used in np.linalg.norm +fro diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3070e19..9cf0556 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,3 +44,9 @@ repos: name: Prevent Commit to Main Branch args: ["--branch", "main"] stages: [pre-commit] + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2be5fe6..9b8d9a1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,8 +9,8 @@ Release Notes **Fixed:** -* Updated REAMDE instructions for pip and conda-forge install -* Updated REAMDE instructions to check for successful installation +* Updated README instructions for pip and conda-forge install +* Updated README instructions to check for successful installation 0.1.2 diff --git a/README.rst b/README.rst index fa8667d..2350f69 100644 --- a/README.rst +++ b/README.rst @@ -127,7 +127,7 @@ trying to commit again. Improvements and fixes are always appreciated. -Before contribuing, please read our `Code of Conduct `_. +Before contributing, please read our `Code of Conduct `_. Contact ------- diff --git a/doc/source/quickstart.rst b/doc/source/quickstart.rst index 0eba4eb..33dab12 100644 --- a/doc/source/quickstart.rst +++ b/doc/source/quickstart.rst @@ -1,6 +1,6 @@ .. _quick_start: -Tutorial (To be addded) +Tutorial (To be added) ################# Welcome! This will be a quick tutorial to accquaint users with `snmf`. @@ -18,5 +18,5 @@ Add extra tutorials here Bug Reports =========== -Please enjoy using our software! If you come accross any bugs in the +Please enjoy using our software! If you come across any bugs in the application, please report them to diffpy-users@googlegroups.com. diff --git a/news/codespell.rst b/news/codespell.rst new file mode 100644 index 0000000..4b4d29b --- /dev/null +++ b/news/codespell.rst @@ -0,0 +1,23 @@ +**Added:** + +* Add spelling check pre-commit via Codespell + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index 8bd07d0..86b6867 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,11 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default) [tool.setuptools.dynamic] dependencies = {file = ["requirements/pip.txt"]} +[tool.codespell] +exclude-file = ".codespell/ignore_lines.txt" +ignore-words = ".codespell/ignore_words.txt" +skip = "*.cif" + [tool.black] line-length = 115 include = '\.pyi?$' diff --git a/src/diffpy/snmf/polynomials.py b/src/diffpy/snmf/polynomials.py index 265be05..254860d 100644 --- a/src/diffpy/snmf/polynomials.py +++ b/src/diffpy/snmf/polynomials.py @@ -8,7 +8,7 @@ def rooth(linear_coefficient, constant_term): Parameters ---------- - linear_coefficient: nd array like of floats + linear_coefficient: ndarray like of floats The matrix coefficient of the linear term constant_term: 0d array like, 1d array like of floats or scalar The constant scalar term of the problem diff --git a/src/diffpy/snmf/subroutines.py b/src/diffpy/snmf/subroutines.py index e4f6a5f..ae7f7ef 100644 --- a/src/diffpy/snmf/subroutines.py +++ b/src/diffpy/snmf/subroutines.py @@ -362,7 +362,7 @@ def update_weights_matrix( The matrx containing the stretching factors of the calculated component signals. Has dimensions K x M where K is the number of component signals and M is the number of XRD/PDF patterns. - component_matrix: 2d array lik + component_matrix: 2d array like The matrix containing the unstretched calculated component signals. Has dimensions N x K where N is the length of the signals and K is the number of component signals.