Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +11 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix YAML trailing whitespace and indentation; codespell hook may be ignored.

Remove trailing spaces (Line 11) and indent the hook list under hooks:; also fix the incorrect comment.

-      - id: ruff-format
-        name: ruff format
-  
+      - id: ruff-format
+        name: ruff format
+
   - repo: https://github.com/codespell-project/codespell
-    # Configuration for codespell is in .pre-commit-config.yaml
+    # Configuration for codespell is in pyproject.toml
     rev: v2.4.1
     hooks:
-    - id: codespell
+      - id: codespell
+        args: ["--toml", "pyproject.toml"]

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 11-11: trailing spaces

(trailing-spaces)


[warning] 16-16: wrong indentation: expected 6 but found 4

(indentation)

🤖 Prompt for AI Agents
In .pre-commit-config.yaml around lines 11 to 16, remove the trailing whitespace
on line 11, fix the comment (remove or replace the misleading "Configuration for
codespell is in .pre-commit-config.yaml") and properly indent the hook list
under `hooks:` so the `- id: codespell` line is nested beneath `hooks:`
(consistent YAML indentation), ensuring the `repo:` and `rev:` keys remain at
the same level as `hooks:`.

4 changes: 2 additions & 2 deletions notebooks/example_config.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
]
},
{
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions notebooks/example_queue_type.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {}
},
Expand All @@ -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": {}
},
{
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,10 @@ path = "pysqa/_version.py"

[tool.coverage.run]
omit = ["pysqa/_version.py", "tests/*"]
command_line = "-m unittest discover tests"
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 = ''