From 2624b6a0733e9995e58150e248439ed854656577 Mon Sep 17 00:00:00 2001 From: Akash Goel Date: Sun, 6 Sep 2026 23:11:59 -0700 Subject: [PATCH 1/4] Fix typos in the documentation --- docs/background.rst | 2 +- docs/installation.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/background.rst b/docs/background.rst index 2e1deda..2f05fdf 100644 --- a/docs/background.rst +++ b/docs/background.rst @@ -65,7 +65,7 @@ Thus the procedure is as follows: 3. All polygons are gathered to form the threedimensional isosurface. It should be noted that this algorithm can be executed in a highly efficient -fashion using trivial parallellization as the result for each cube is +fashion using trivial parallelization as the result for each cube is completely independent from all the other cubes. It turns out that the generation of the scalar field, which by itself is also a highly parallellizable step, is typically the most time-consuming. diff --git a/docs/installation.rst b/docs/installation.rst index 683ef65..d24f645 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -72,5 +72,5 @@ more output:: .. note:: - If the tests are continously failing for you, you are warmly invited + If the tests are continuously failing for you, you are warmly invited to `open an issue on the Github page `_. From 47554db39c6a3a22a37c3bba8948ccff90c5cf1d Mon Sep 17 00:00:00 2001 From: Akash Goel Date: Sun, 6 Sep 2026 23:46:04 -0700 Subject: [PATCH 2/4] Add codespell to CI and fix the remaining typos --- .codespell-ignore | 6 ++++++ .codespellrc | 10 ++++++++++ .github/workflows/codespell.yml | 16 ++++++++++++++++ src/den2obj.cpp | 2 +- src/scalar_field.cpp | 10 +++++----- src/scalar_field.h | 10 +++++----- src/test/test_file_creation.h | 2 +- 7 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 .codespell-ignore create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml diff --git a/.codespell-ignore b/.codespell-ignore new file mode 100644 index 0000000..c8f58c6 --- /dev/null +++ b/.codespell-ignore @@ -0,0 +1,6 @@ +fpt +Collet +Smoot +NWO +Te +Nd diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..7382f85 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,10 @@ +[codespell] +skip = .git,build,*.svg,*.png,*.jats +# Case-sensitive, so only these exact forms are exempt. A lowercase "collet" +# or "nd" in prose is still reported as a typo. +# fpt typedef in src/den2obj_math.h:26 +# Collet Yann Collet, Zstandard author (paper/paper.bib:53) +# Smoot Michael E. Smoot, TCLAP author (paper/paper.bib:112) +# NWO Dutch Research Council (paper/paper.md:127) +# Te, Nd element symbols in src/periodic_table.cpp +ignore-words = .codespell-ignore diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..fdb622a --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,16 @@ +name: codespell + +on: + push: + branches: [ "master", "develop" ] + pull_request: + branches: [ "master", "develop" ] + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2.4.3 + with: + only_warn: 1 diff --git a/src/den2obj.cpp b/src/den2obj.cpp index fe44fa9..2ae6901 100644 --- a/src/den2obj.cpp +++ b/src/den2obj.cpp @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) { TCLAP::ValueArg arg_generator("g","dataset","Dataset name",false,"","string"); cmd.add(arg_generator); - // select algorithm for either compression or for tesselation + // select algorithm for either compression or for tessellation TCLAP::ValueArg arg_algo("a","algo","Algorithm selection",false,"","string"); cmd.add(arg_algo); diff --git a/src/scalar_field.cpp b/src/scalar_field.cpp index 6e874dd..7340104 100644 --- a/src/scalar_field.cpp +++ b/src/scalar_field.cpp @@ -273,7 +273,7 @@ void ScalarField::test_vasp5() { * * Read the scalar value from the 2nd line of the * CHGCAR file. Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -302,7 +302,7 @@ void ScalarField::read_scalar() { * is automatically constructed. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -340,7 +340,7 @@ void ScalarField::read_matrix() { * lines. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -416,7 +416,7 @@ void ScalarField::read_atom_positions() { * direction. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -460,7 +460,7 @@ void ScalarField::read_grid_dimensions() { * read_grid_dimensions() function. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. diff --git a/src/scalar_field.h b/src/scalar_field.h index 09e0791..fc8e153 100644 --- a/src/scalar_field.h +++ b/src/scalar_field.h @@ -262,7 +262,7 @@ class ScalarField{ * * Read the scalar value from the 2nd line of the * CHGCAR file. Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -278,7 +278,7 @@ class ScalarField{ * is automatically constructed. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -293,7 +293,7 @@ class ScalarField{ * direction. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -309,7 +309,7 @@ class ScalarField{ * lines. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. @@ -327,7 +327,7 @@ class ScalarField{ * read_grid_dimensions() function. * * Note that all read_* functions can - * be used seperately, although they may depend + * be used separately, although they may depend * on each other and have to be used in some * consecutive order as is done in the read() * wrapper function. diff --git a/src/test/test_file_creation.h b/src/test/test_file_creation.h index 744ab0f..30a3b51 100644 --- a/src/test/test_file_creation.h +++ b/src/test/test_file_creation.h @@ -34,7 +34,7 @@ /** * Test that verifies file creation (obj, stl and ply) * - * Because the marching cubes algorithm uses OpenMP parallellization, we need + * Because the marching cubes algorithm uses OpenMP parallelization, we need * to set the number of threads to 1 to obtain consistent results. With * higher number of cores, the results are subject to race conditions, leading * to different (although not incorrect) results. From c15b4db4e911befec28bb6b2f4f29a38821581af Mon Sep 17 00:00:00 2001 From: Akash Goel Date: Mon, 7 Sep 2026 01:28:54 -0700 Subject: [PATCH 3/4] Pass the codespell config explicitly and save the report as an artifact --- .github/workflows/codespell.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index fdb622a..94048ee 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -11,6 +11,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2.4.3 with: only_warn: 1 + config: .codespellrc + ignore_words_file: .codespell-ignore + + # Re-run for a saved report. The step above annotates the diff but its + # output only lives in the job log. + - name: Write codespell report + if: always() + run: | + pipx install codespell + codespell --config .codespellrc > codespell.txt 2>&1 || true + echo "--- findings: $(wc -l < codespell.txt)" + cat codespell.txt + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: codespell-report + path: codespell.txt From f28f429d96b3ae0097222a7ace86082578ccd208 Mon Sep 17 00:00:00 2001 From: Akash Goel Date: Mon, 7 Sep 2026 01:32:25 -0700 Subject: [PATCH 4/4] Drop the comment from the codespell workflow --- .github/workflows/codespell.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 94048ee..8c3d4bc 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -18,8 +18,6 @@ jobs: config: .codespellrc ignore_words_file: .codespell-ignore - # Re-run for a saved report. The step above annotates the diff but its - # output only lives in the job log. - name: Write codespell report if: always() run: |