Skip to content

Conversation

yarikoptic
Copy link

@yarikoptic yarikoptic commented Aug 29, 2025

More about codespell: https://github.com/codespell-project/codespell .

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.

But congrats - no typos elsewhere!?!

Summary by CodeRabbit

  • Chores

    • Added automated spelling checks via a Codespell workflow for pushes and pull requests.
    • Integrated Codespell into pre-commit to catch typos before commits.
    • Introduced centralized Codespell configuration for consistent checks across the project.
  • Documentation

    • Corrected minor typos in example notebooks to improve clarity (e.g., “corrsponding” → “corresponding”, “specificed” → “specified”).
    • No functional changes; content updates only.

…s automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

coderabbitai bot commented Aug 29, 2025

Walkthrough

Adds Codespell to the project via a new GitHub Actions workflow, a pre-commit hook, and configuration in pyproject.toml. Fixes minor typos in two example notebooks. No code logic or public API changes.

Changes

Cohort / File(s) Summary of Changes
CI: Codespell workflow
.github/workflows/codespell.yml
New GitHub Actions workflow triggering on push/PR to main; checks out repo, registers problem matcher, runs codespell action with settings from pyproject.
Pre-commit: Codespell hook
.pre-commit-config.yaml
Adds codespell repo (v2.4.1) and hook entry; no changes to existing hooks.
Configuration: Codespell settings
pyproject.toml
Adds [tool.codespell] with skip, check-hidden, ignore-regex, and placeholder for ignore-words-list; preserves existing settings; adds trailing newline.
Docs: Notebook typo fixes
notebooks/example_config.ipynb, notebooks/example_queue_type.ipynb
Corrects markdown typos only (“corrsponding”→“corresponding”, “specificed”→“specified”); no code or behavior changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant GH as GitHub
    participant WF as Workflow: Codespell
    participant CS as Codespell Action
    participant PM as Problem Matcher

    Dev->>GH: Push / Open PR (target: main)
    GH-->>WF: Trigger workflow
    rect rgba(220,235,255,0.5)
    note right of WF: Job on ubuntu-latest
    WF->>WF: actions/checkout@v4
    WF->>PM: Setup codespell-problem-matcher@v1
    WF->>CS: codespell-project/actions-codespell@v2
    CS-->>GH: Report annotations using settings from pyproject.toml
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble through commits with whiskered delight,
Catching stray letters that hop out of sight.
Pre-commit thumps, CI gives a nod—
Typos corrected, neat as a sod.
With codespell carrots in my review cart,
The docs now sparkle—hare-tuned art! 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (7)
notebooks/example_config.ipynb (2)

9-9: Nit: hyphenation for clarity.

Prefer “high-level interface”.

- ... and provides a high level interface for users ...
+ ... and provides a high-level interface for users ...

29-29: Nit: punctuation.

Add a comma after “After the initial import”.

-After the initial import the class is initialized ...
+After the initial import, the class is initialized ...
pyproject.toml (1)

119-125: Codespell config looks good; consider a few small improvements.

Optional tweaks to reduce noise and catch more issues.

 [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 = ''
+check-filenames = true
+# Also commonly skipped:
+# skip = '.git*,.ipynb_checkpoints,*-lock.json,*.lock'
+# Example domain words (uncomment if Codespell flags them):
+# ignore-words-list = 'pysqa,jobid,jovyan,flux,queuing'
notebooks/example_queue_type.ipynb (2)

29-29: Subject-verb agreement and hyphenation.

Use parallel verbs with “either … or …” and hyphenate “high-level”.

-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 ...
+The `pysqa` package primarily defines one class, the `QueueAdapter`. It can either load the configuration from a configuration directory or initialize the corresponding adapter for the specific queuing system type `queue_type` and provides a high-level interface ...

47-47: Nit: punctuation.

Add a comma after “After the initial import”.

-After the initial import the class is initialized ...
+After the initial import, the class is initialized ...
.pre-commit-config.yaml (1)

12-16: Optional: ensure pre-commit uses the same config as CI.

Passing the TOML path makes the hook behavior explicit and consistent with the GitHub Action.

.github/workflows/codespell.yml (1)

19-26: Optional: minor workflow hardening.

  • Add concurrency to cancel superseded runs.
  • Enable filename checks to catch typos in file names.
 jobs:
   codespell:
     name: Check for spelling errors
     runs-on: ubuntu-latest
+    concurrency:
+      group: ${{ github.workflow }}-${{ github.ref }}
+      cancel-in-progress: true
 
     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
+        with:
+          check_filenames: 1
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9df02c0 and 7060ee8.

📒 Files selected for processing (5)
  • .github/workflows/codespell.yml (1 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • notebooks/example_config.ipynb (2 hunks)
  • notebooks/example_queue_type.ipynb (2 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.pre-commit-config.yaml

[error] 11-11: trailing spaces

(trailing-spaces)


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

(indentation)

Comment on lines +11 to +16

- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .pre-commit-config.yaml
rev: v2.4.1
hooks:
- id: codespell
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:`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant