From 0065fa969ffeca35b934cc5826891052ad559c59 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Aug 2025 15:38:09 -0400 Subject: [PATCH 1/4] Add github action to codespell main on push and PRs --- .github/workflows/codespell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..b231667 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From e2da6064d64285f5370015dd510c3d7538bf8c14 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Aug 2025 15:38:09 -0400 Subject: [PATCH 2/4] Add rudimentary codespell config --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c16447..a2bfd88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,4 +116,10 @@ path = "pysqa/_version.py" [tool.coverage.run] omit = ["pysqa/_version.py", "tests/*"] -command_line = "-m unittest discover tests" \ No newline at end of file +command_line = "-m unittest discover tests" +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*' +check-hidden = true +ignore-regex = '^\s*"image/\S+": ".*' +# ignore-words-list = '' From f913faa546f938d9011b1640b01b366dfa1ce75c Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Aug 2025 15:39:48 -0400 Subject: [PATCH 3/4] Add pre-commit definition for codespell --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f7f1ca..562a1da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,3 +8,9 @@ repos: files: ^pysqa/ - id: ruff-format name: ruff format + + - repo: https://github.com/codespell-project/codespell + # Configuration for codespell is in .pre-commit-config.yaml + rev: v2.4.1 + hooks: + - id: codespell From 7060ee8d6483c0db0f376de360c2492e139c0f4e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Aug 2025 15:39:48 -0400 Subject: [PATCH 4/4] [DATALAD RUNCMD] chore: run codespell throughout fixing few left typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- notebooks/example_config.ipynb | 4 ++-- notebooks/example_queue_type.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/example_config.ipynb b/notebooks/example_config.ipynb index 9430c6a..c63bb46 100644 --- a/notebooks/example_config.ipynb +++ b/notebooks/example_config.ipynb @@ -6,7 +6,7 @@ "metadata": {}, "source": [ "# Python Interface Config\n", - "The `pysqa` package primarily defines one class, that is the `QueueAdapter`. It loads the configuration from a configuration directory, initializes the corrsponding adapter for the specific queuing system and provides a high level interface for users to interact with the queuing system. The `QueueAdapter` can be imported using:" + "The `pysqa` package primarily defines one class, that is the `QueueAdapter`. It loads the configuration from a configuration directory, initializes the corresponding adapter for the specific queuing system and provides a high level interface for users to interact with the queuing system. The `QueueAdapter` can be imported using:" ] }, { @@ -26,7 +26,7 @@ "cell_type": "markdown", "id": "7e3cf646-d4e7-4b1e-ab47-f07342d7a5a2", "metadata": {}, - "source": "After the initial import the class is initialized using the configuration directory specificed by the `directory` parameter which defaults to `\"~/.queues\"`. In this example we load the configuration from the `test` directory: " + "source": "After the initial import the class is initialized using the configuration directory specified by the `directory` parameter which defaults to `\"~/.queues\"`. In this example we load the configuration from the `test` directory: " }, { "cell_type": "code", diff --git a/notebooks/example_queue_type.ipynb b/notebooks/example_queue_type.ipynb index b4884ba..bff0a89 100644 --- a/notebooks/example_queue_type.ipynb +++ b/notebooks/example_queue_type.ipynb @@ -26,7 +26,7 @@ "cell_type": "markdown", "source": [ "# Dynamic Python Interface\n", - "The `pysqa` package primarily defines one class, that is the `QueueAdapter`. It can either load the configuration from a configuration directory, or initializes the corrsponding adapter for the specific queuing system type `queue_type` and provides a high level interface for users to interact with the queuing system. The `QueueAdapter` can be imported using:" + "The `pysqa` package primarily defines one class, that is the `QueueAdapter`. It can either load the configuration from a configuration directory, or initializes the corresponding adapter for the specific queuing system type `queue_type` and provides a high level interface for users to interact with the queuing system. The `QueueAdapter` can be imported using:" ], "metadata": {} }, @@ -44,7 +44,7 @@ { "id": "7e3cf646-d4e7-4b1e-ab47-f07342d7a5a2", "cell_type": "markdown", - "source": "After the initial import the class is initialized using the queuing system type specificed by the `queue_type` parameter. In this example we load the `flux` as queuing system interface: ", + "source": "After the initial import the class is initialized using the queuing system type specified by the `queue_type` parameter. In this example we load the `flux` as queuing system interface: ", "metadata": {} }, {