From 0f5fdadeeaf127db73458b3c045cc6501858d966 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 17 Jul 2024 13:18:07 -0500 Subject: [PATCH] Add typos CI, fix typos --- .github/workflows/ci.yml | 7 +++++++ pyproject.toml | 19 +++++++++++++++++++ test/test_distributed.py | 6 +++--- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a1dcf6f..027e6533 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,13 @@ jobs: pipx install ruff ruff check + typos: + name: Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master + pylint: name: Pylint runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index 34ae84ca..bbdbb5e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,22 @@ known-local-folder = [ "sumpy", ] lines-after-imports = 2 + +[tool.typos.default] +extend-ignore-re = [ + "(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$" +] + +[tool.typos.default.extend-words] +# short for multi-indices +mis = "mis" +# short for n-dimensional +nd = "nd" +# short for Theorem +thm = "thm" + +[tool.typos.files] +extend-exclude = [ + "contrib/*/*.ipynb", + "notes/*/*.eps", +] diff --git a/test/test_distributed.py b/test/test_distributed.py index 2e3911bb..60e94fff 100644 --- a/test/test_distributed.py +++ b/test/test_distributed.py @@ -34,7 +34,7 @@ import pyopencl as cl def set_cache_dir(mpirank): - """Make each rank use a differnt cache location to avoid conflict.""" + """Make each rank use a different cache location to avoid conflict.""" import platformdirs cache_dir = platformdirs.user_cache_dir("sumpy", "sumpy") @@ -122,11 +122,11 @@ def _test_against_single_rank( communicate_mpoles_via_allreduce=communicate_mpoles_via_allreduce) from boxtree.distributed import DistributedFMMRunner - distribued_fmm_info = DistributedFMMRunner( + distributed_fmm_info = DistributedFMMRunner( queue, global_tree_dev, traversal_builder, wrangler_factory, comm=comm) timing_data = {} - distributed_potential = distribued_fmm_info.drive_dfmm( + distributed_potential = distributed_fmm_info.drive_dfmm( [sources_weights], timing_data=timing_data) assert timing_data -- GitLab