-
Notifications
You must be signed in to change notification settings - Fork 484
Add codespell support (config, workflow to detect/not fix) and make it fix some typos #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…os automagically
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w -w -i 3 -C 4 ./app/modules/intelligence/prompts/system_prompt_setup.py",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
…os automagically
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
WalkthroughThis update introduces automated spell-checking using Codespell via a new configuration file, GitHub Actions workflow, and pre-commit hook. Numerous minor spelling corrections are made throughout code comments, documentation, prompts, and variable names. Several Jenkins and deployment scripts are updated to fix a recurring typo in an environment variable name. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Pre-commit Hook
participant GitHub Actions
participant Codespell
Developer->>Pre-commit Hook: Commit code
Pre-commit Hook->>Codespell: Run spell check locally
Pre-commit Hook-->>Developer: Report spelling errors (if any)
Developer->>GitHub Actions: Push/PR to main branch
GitHub Actions->>Codespell: Run Codespell workflow
Codespell-->>GitHub Actions: Annotate and report spelling errors
GitHub Actions-->>Developer: Display results in PR/checks
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.pre-commit-config.yaml (2)
28-28: Remove trailing whitespace. YAMLlint flags trailing spaces on this blank line; please delete them to avoid lint failures.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 28-28: trailing spaces
(trailing-spaces)
30-30: Fix codespell config comment. The comment states “Configuration for codespell is in .pre-commit-config.yaml” but actual settings live in.codespellrc. Update the comment to reference the correct file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
.codespellrc(1 hunks).github/workflows/codespell.yml(1 hunks).pre-commit-config.yaml(1 hunks)Jenkinsfile(1 hunks)README.md(1 hunks)app/modules/intelligence/agents/chat_agents/langchain_agent.py(1 hunks)app/modules/intelligence/agents/chat_agents/supervisor_agent.py(1 hunks)app/modules/intelligence/agents/chat_agents/system_agents/unit_test_agent.py(1 hunks)app/modules/intelligence/agents/chat_agents/tool_helpers.py(1 hunks)app/modules/intelligence/prompts/classification_prompts.py(1 hunks)app/modules/intelligence/prompts/system_prompt_setup.py(1 hunks)app/modules/intelligence/tools/code_query_tools/get_node_neighbours_from_node_id_tool.py(1 hunks)app/modules/intelligence/tools/web_tools/web_search_tool.py(1 hunks)app/modules/utils/logger.py(1 hunks)deployment/prod/celery/Jenkinsfile_CELERY_Prod(1 hunks)deployment/prod/convo-server/Jenkinsfile_Convo_Prod(1 hunks)deployment/prod/mom-api/Jenkinsfile_API_Prod(1 hunks)deployment/stage/celery/Jenkinsfile_CELERY(1 hunks)deployment/stage/mom-api/Jenkinsfile_API(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.pre-commit-config.yaml
[error] 28-28: trailing spaces
(trailing-spaces)
🔇 Additional comments (18)
app/modules/utils/logger.py (1)
8-8: Spelling correction is accurate and improves clarity.The comment has been corrected from "propogation" to "propagation", which accurately describes preventing propagation to the root logger. No further action needed.
app/modules/intelligence/tools/code_query_tools/get_node_neighbours_from_node_id_tool.py (1)
64-64: Fix spacing in docstring for readability.The phrase "at least one node ID" is now correctly spelled and spaced, improving clarity in the method documentation.
app/modules/intelligence/prompts/classification_prompts.py (1)
513-513: Correct example prompt spelling.Updated "accomodate" to "accommodate" in the example query, ensuring the prompt is free of spelling errors.
app/modules/intelligence/agents/chat_agents/tool_helpers.py (1)
123-123: Standardize success message spelling.Changed "successfull" to "successful" for consistency in tool response messages.
Jenkinsfile (1)
28-28: Correct environment variable name.Fixed typo from
ENVIORNMENTtoENVIRONMENT, ensuring branch-based environment selection works as intended.deployment/stage/celery/Jenkinsfile_CELERY (1)
25-27: Corrected typo in environment variable assignment
The change fromENVIORNMENTtoENVIRONMENTfor theorigin/mainbranch is accurate and ensures consistency across your pipelines.README.md (1)
341-343: Fix typo in API key documentation
The correction from "adn" to "and" in the "Create Conversations" step improves readability and clarity.app/modules/intelligence/tools/web_tools/web_search_tool.py (1)
21-24: Fix typo in Pydantic model field description
The description string forsuccessis now correctly spelled as "successful." This is a straightforward documentation update.deployment/prod/mom-api/Jenkinsfile_API_Prod (1)
25-27: Corrected typo in environment variable assignment
UpdatingENVIORNMENTtoENVIRONMENTin theorigin/mainbranch condition aligns this file with the fix in other pipelines.app/modules/intelligence/prompts/system_prompt_setup.py (1)
38-41: Fix "Always" spelling in system prompt guideline
The typo "Aways" has been corrected to "Always," improving the clarity of the instruction.deployment/prod/convo-server/Jenkinsfile_Convo_Prod (1)
28-28: Good fix correcting the environment variable name.Fixed the typo in the environment variable name from
ENVIORNMENTtoENVIRONMENT. This is crucial as environment variables are case-sensitive and must be spelled correctly for proper functionality.app/modules/intelligence/agents/chat_agents/langchain_agent.py (1)
92-92: Good spelling correction in documentation.Fixed the typo from "seperated" to "separated" in the citation formatting instructions, improving readability and correctness.
app/modules/intelligence/agents/chat_agents/supervisor_agent.py (1)
23-24: Fixed variable name spelling.Corrected the variable name from
chuncktochunkin the async generator. This is an important fix as incorrect variable names would cause runtime errors.deployment/stage/mom-api/Jenkinsfile_API (1)
24-24: Good fix correcting the environment variable name.Fixed the typo in the environment variable name from
ENVIORNMENTtoENVIRONMENT. This correction ensures consistent environment variable naming across the codebase and proper functionality.app/modules/intelligence/agents/chat_agents/system_agents/unit_test_agent.py (1)
86-86: Typo fix approved in prompt string. The correction from “inport” to “import” in theqna_task_promptimproves clarity. Consider wrapping the tool nameget_code_from_probable_node_namein backticks for consistency and readability.deployment/prod/celery/Jenkinsfile_CELERY_Prod (1)
26-26:✅ Verification successful
Ensure consistent environment variable naming across all pipelines. The fix from
ENVIORNMENTtoENVIRONMENTis correct. Please verify that no remaining typos exist in other Jenkinsfiles to keep deployments uniform.
🏁 Script executed:
#!/bin/bash # Verify no occurrences of the misspelled ENVIORNMENT remain in Jenkinsfiles rg -n "ENVIORNMENT" -g "deployment/**/Jenkinsfile_*"Length of output: 52
ENVIRONMENT variable name is now consistent in all Jenkinsfiles
Ranrg -n "ENVIORNMENT" -g "deployment/**/Jenkinsfile_*"and found no remaining typos. All pipelines uniformly useENVIRONMENT..codespellrc (1)
1-5: Codespell configuration is correctly defined. Theskippatterns,check-hidden, andignore-regexsettings align with the intended behavior for repository-wide spell checking..github/workflows/codespell.yml (1)
1-26: CI workflow for Codespell is well set up. The triggers, permissions, and steps correctly integratecodespellwith the.codespellrcconfiguration.



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.
Note that your Jenkins might start "more correctly" after this fix ? ;)
Summary by CodeRabbit
Chores
Bug Fixes