Skip to content

Conversation

@XuehaiPan
Copy link
Collaborator

@XuehaiPan XuehaiPan commented Oct 13, 2025

Add dictionary en-GB_to_en-US to codespell.

Summary by CodeRabbit

  • Documentation

    • Standardized US spelling across docs and examples (e.g., behavior/acknowledgment), with minor header and whitespace cleanups.
    • Clarified phrasing in example/model docs; added a spelling wordlist file.
  • Style

    • Polished user-facing warning/error messages to use consistent US spelling.
  • Chores

    • Added a pre-commit hook to keep the spelling wordlist sorted (case-insensitive).
    • Extended spell-check configuration to include US/GB normalization and an ignore list.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Adds a case-insensitive file-contents sorter pre-commit hook targeting docs/spelling_wordlist.txt; introduces a spelling wordlist and codespell configuration; standardizes spelling in multiple docs and example files; updates minor strings/docstrings in BitNet examples; fixes a typo in tilelang overrides docstring.

Changes

Cohort / File(s) Summary
Pre-commit & Codespell config
\.pre-commit-config.yaml, pyproject.toml
Adds file-contents-sorter hook (case-insensitive) on docs/spelling_wordlist.txt. Extends [tool.codespell] with builtin="clear,rare,en-GB_to_en-US" and ignore-words="docs/spelling_wordlist.txt".
Docs spelling and headings
README.md, docs/compiler_internals/inject_fence_proxy.md, examples/deepseek_mla/amd/README.md, examples/gdn/README.md
Standardizes UK→US spellings (Acknowledg(e)ment(s), behaviour→behavior) and minor whitespace adjustments; no logic changes.
Spelling wordlist
docs/spelling_wordlist.txt
Adds new wordlist file with eight terms, one per line.
BitNet examples text updates
examples/bitnet-1.58b/modeling_bitnet.py, examples/bitnet-1.58b/tokenization_bitnet.py
Updates docstrings/messages: labelled→labeled; behaviour→behavior; no functional changes.
TileLang docstring typo
tilelang/language/overrides/__init__.py
Corrects docstring spelling: behaviour→behavior; no code changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Git as Git
  participant PC as pre-commit
  participant Hooks as Hook Runner
  participant Sorter as file-contents-sorter
  participant Repo as Repo Files

  Dev->>Git: git commit
  Git->>PC: Invoke pre-commit
  PC->>Hooks: Run configured hooks
  Hooks->>Sorter: Execute on docs/spelling_wordlist.txt
  Sorter->>Repo: Sort contents (ignore case)
  Note over Sorter,Repo: Only targets docs/spelling_wordlist.txt
  Hooks-->>PC: Hook results
  PC-->>Git: Pass/fail
  Git-->>Dev: Commit proceeds or is blocked
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • LeiWang1999

Poem

A nibble, a nib, a hop through text,
I tidy letters—UK to US next.
Hooks that sort, a gentle breeze,
Wordlists lined in A to Zs.
With whiskers twitching, I commit—
Behavior spelled, and that is it. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately reflects the primary change of adding a preference for American English spelling in linting configuration, it is concise, clear, and directly related to the contents of the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d89ba5b and d8ff6e9.

📒 Files selected for processing (10)
  • .pre-commit-config.yaml (1 hunks)
  • README.md (1 hunks)
  • docs/compiler_internals/inject_fence_proxy.md (1 hunks)
  • docs/spelling_wordlist.txt (1 hunks)
  • examples/bitnet-1.58b/modeling_bitnet.py (1 hunks)
  • examples/bitnet-1.58b/tokenization_bitnet.py (2 hunks)
  • examples/deepseek_mla/amd/README.md (2 hunks)
  • examples/gdn/README.md (1 hunks)
  • pyproject.toml (1 hunks)
  • tilelang/language/overrides/__init__.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test-metal
🔇 Additional comments (11)
examples/gdn/README.md (1)

13-15: Section title now matches US spelling.

The header uses “Acknowledgments,” aligning with the American-English pass across docs.

examples/bitnet-1.58b/modeling_bitnet.py (1)

1721-1727: Docstring wording synchronized with US spelling.

“Labeled span” reads consistently with the rest of the repo’s guidance.

docs/compiler_internals/inject_fence_proxy.md (1)

7-8: Terminology matches the new spelling rules.

Switching to “undefined behavior” keeps this doc in step with the codespell dictionary.

README.md (1)

245-247: Top-level README header updated to US spelling.

The rename to “Acknowledgments” keeps the branding consistent.

tilelang/language/overrides/__init__.py (1)

4-5: Docstring now reflects American English.

Small wording tweak, no code impact—looks good.

docs/spelling_wordlist.txt (1)

2-8: LGTM!

The remaining entries appear to be legitimate technical terms, acronyms, or identifiers that should be excluded from spell-checking (e.g., "hsa" for HSA architecture, "LOD" for Level of Detail, "NotIn" as a code identifier).

examples/deepseek_mla/amd/README.md (1)

50-52: LGTM!

The change from "Acknowledgement" to "Acknowledgment" correctly standardizes to American English spelling.

.pre-commit-config.yaml (1)

31-33: LGTM!

The file-contents-sorter hook with --ignore-case correctly ensures the spelling wordlist remains consistently sorted.

examples/bitnet-1.58b/tokenization_bitnet.py (2)

173-177: LGTM!

Correctly updates "behaviour" to "behavior" (American English) in the legacy mode warning message.


218-218: LGTM!

Correctly updates "behaviour" to "behavior" (American English) in the error message.

pyproject.toml (1)

84-85: LGTM!

The codespell configuration correctly enables British-to-American English conversion via the en-GB_to_en-US builtin dictionary and references the ignore-words file.

@@ -0,0 +1,8 @@
cancelled
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the inclusion of "cancelled" in the ignore list.

The PR aims to standardize on American English spelling, yet "cancelled" (British spelling) is added to the ignore list instead of being changed to "canceled" (American spelling). Please verify whether "cancelled" appears in contexts that cannot be changed (e.g., external dependencies, quoted text, API names).


🏁 Script executed:

#!/bin/bash
# Description: Verify usage of "cancelled" and "canceled" in the codebase.
# Expected: Understand why "cancelled" is in the ignore list.

echo "=== Searching for 'cancelled' (British spelling) ==="
rg -n -C3 --type-add 'code:*.{py,md,rst,txt,yaml,toml}' --type code 'cancelled'

echo -e "\n=== Searching for 'canceled' (American spelling) ==="
rg -n -C3 --type-add 'code:*.{py,md,rst,txt,yaml,toml}' --type code 'canceled'

Length of output: 244


Replace ‘cancelled’ with American ‘canceled’ in docs/spelling_wordlist.txt to align with the project’s American English standard.

🤖 Prompt for AI Agents
In docs/spelling_wordlist.txt around lines 1 to 1, the word "cancelled" uses
British spelling; replace it with the American spelling "canceled" (single L)
and save the file so the project’s American English spelling standard is
enforced.

@LeiWang1999 LeiWang1999 merged commit d684094 into tile-ai:main Oct 14, 2025
7 of 8 checks passed
@XuehaiPan XuehaiPan deleted the american-english branch October 16, 2025 16:02
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.

2 participants