Skip to content

Commit

Permalink
Add a spell check in CI (#227)
Browse files Browse the repository at this point in the history
* Add a spell check in CI

* fix alignment in .typos.toml

* fix indent  for spell check

* fix detected typos

* exclude the word PNG

* use png instead of PNG in Doxyfile.in

---------

Co-authored-by: Yuuichi Asahi <[email protected]>
  • Loading branch information
yasahi-hpc and Yuuichi Asahi authored Feb 18, 2025
1 parent 6af9e1e commit 14a90b6
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 18 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
extensions: 'hpp,cpp'
clangFormatVersion: 17

# run typos for spell check
spell_check:
name: spell check with typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]
with:
files: ./cmake/ ./CMakeLists.txt ./docs/ ./README.md ./common/ ./fft/ ./examples/ ./install_test/
config: ./.typos.toml

# check if Docker images should be recreated
check_docker_files:
uses: ./.github/workflows/__check_docker_files.yaml
Expand Down
10 changes: 10 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception

[default.extend-words]
# Don't correct these word (parts)
iy = "iy"
ND = "ND"
SAV = "SAV"
arange = "arange"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ cmake --build build -j 8
```
This way, all the functionalities are executed on A100 GPUs. For installation, details are provided in the [documentation](https://kokkosfft.readthedocs.io/en/latest/intro/building.html#install-kokkosfft-as-a-library).

## LICENCE
## LICENSE

[![License](https://img.shields.io/badge/License-Apache--2.0_WITH_LLVM--exception-blue)](https://spdx.org/licenses/LLVM-exception.html)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Expand Down
2 changes: 1 addition & 1 deletion common/unit_test/Test_Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void test_are_pointers_aliasing() {
using View2 = Kokkos::View<ValueType2*, execution_space>;

const int n1 = 10;
// sizeof ValeuType2 is larger or equal to ValueType1
// sizeof ValueType2 is larger or equal to ValueType1
const int n2 = sizeof(ValueType1) == sizeof(ValueType2) ? n1 : n1 / 2 + 1;
View1 view1("view1", n1);
View2 view2("view2", n1);
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10

# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# generated for formulas are transparent pngs. Transparent pngs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#
# Note that when changing this option you need to delete any form_*.png files in
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following listing shows good and bad examples of Real FFTs.

.. note::

Input and ouptut views must have the same precision (either ``float`` or ``double``).
Input and output views must have the same precision (either ``float`` or ``double``).

Supported data types
--------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/09_derivative/09_derivative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void initialize(RealView1DType& x, RealView1DType& y, ComplexView2DType& ikx,
//
// \param x [in]: 1D grid in x direction
// \param y [in]: 1D grid in y direction
// \param dudxy [out]: 3D fiels of the analytical derivative values
// \param dudxy [out]: 3D field of the analytical derivative value
template <typename RealView1DType, typename RealView3DType>
void analytical_solution(RealView1DType& x, RealView1DType& y,
RealView3DType& dudxy) {
Expand Down
26 changes: 13 additions & 13 deletions fft/unit_test/Test_Transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void test_fft1_shape(T atol = 1.0e-12) {

std::vector<int> shapes = {n / 2, n, n * 2};
for (auto&& shape : shapes) {
// Real to comple
// Real to complex
ComplexView1DType outr("outr", shape / 2 + 1),
outr_b("outr_b", shape / 2 + 1), outr_o("outr_o", shape / 2 + 1),
outr_f("outr_f", shape / 2 + 1);
Expand Down Expand Up @@ -3206,10 +3206,10 @@ void test_fftn_3dfft_5dview(T atol = 1.e-12) {
std::shuffle(std::begin(tmp_axes), std::end(tmp_axes), rng);

// pickup 3 elements only
axes_type trimed_axes;
axes_type trimmed_axes;
std::copy(std::begin(tmp_axes) + DIM - 3, std::end(tmp_axes),
std::begin(trimed_axes));
list_of_tested_axes.push_back(trimed_axes);
std::begin(trimmed_axes));
list_of_tested_axes.push_back(trimmed_axes);
}

for (auto& tested_axes : list_of_tested_axes) {
Expand Down Expand Up @@ -3282,10 +3282,10 @@ void test_fftn_3dfft_6dview(T atol = 1.e-12) {
std::shuffle(std::begin(tmp_axes), std::end(tmp_axes), rng);

// pickup 3 elements only
axes_type trimed_axes;
axes_type trimmed_axes;
std::copy(std::begin(tmp_axes) + DIM - 3, std::end(tmp_axes),
std::begin(trimed_axes));
list_of_tested_axes.push_back(trimed_axes);
std::begin(trimmed_axes));
list_of_tested_axes.push_back(trimmed_axes);
}

for (auto& tested_axes : list_of_tested_axes) {
Expand Down Expand Up @@ -3358,10 +3358,10 @@ void test_fftn_3dfft_7dview(T atol = 1.e-12) {
std::shuffle(std::begin(tmp_axes), std::end(tmp_axes), rng);

// pickup 3 elements only
axes_type trimed_axes;
axes_type trimmed_axes;
std::copy(std::begin(tmp_axes) + DIM - 3, std::end(tmp_axes),
std::begin(trimed_axes));
list_of_tested_axes.push_back(trimed_axes);
std::begin(trimmed_axes));
list_of_tested_axes.push_back(trimmed_axes);
}

for (auto& tested_axes : list_of_tested_axes) {
Expand Down Expand Up @@ -3434,10 +3434,10 @@ void test_fftn_3dfft_8dview(T atol = 1.e-12) {
std::shuffle(std::begin(tmp_axes), std::end(tmp_axes), rng);

// pickup 3 elements only
axes_type trimed_axes;
axes_type trimmed_axes;
std::copy(std::begin(tmp_axes) + DIM - 3, std::end(tmp_axes),
std::begin(trimed_axes));
list_of_tested_axes.push_back(trimed_axes);
std::begin(trimmed_axes));
list_of_tested_axes.push_back(trimmed_axes);
}

for (auto& tested_axes : list_of_tested_axes) {
Expand Down

0 comments on commit 14a90b6

Please sign in to comment.