Skip to content

Conversation

@yarikoptic
Copy link

@yarikoptic yarikoptic commented May 22, 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.

Note that your Jenkins might start "more correctly" after this fix ? ;)

Summary by CodeRabbit

  • Chores

    • Added automated spell checking with Codespell via GitHub Actions and pre-commit hooks.
    • Introduced configuration files for Codespell to manage spell check behavior.
  • Bug Fixes

    • Corrected multiple typographical errors in documentation, user-facing prompts, and code comments.
    • Fixed environment variable name typos in deployment pipeline scripts to ensure proper environment detection.

…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 ^^^
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 22, 2025

Walkthrough

This 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

File(s) Change Summary
.codespellrc, .github/workflows/codespell.yml, .pre-commit-config.yaml Added Codespell configuration, GitHub Actions workflow, and pre-commit hook for automated spell checks.
Jenkinsfile, deployment/prod/convo-server/Jenkinsfile_Convo_Prod Fixed typo in environment variable assignment (ENVIORNMENTENVIRONMENT) for branch checks.
deployment/prod/celery/Jenkinsfile_CELERY_Prod, deployment/prod/mom-api/Jenkinsfile_API_Prod, deployment/stage/celery/Jenkinsfile_CELERY, deployment/stage/mom-api/Jenkinsfile_API Corrected ENVIORNMENT to ENVIRONMENT in environment variable assignments for various branches.
README.md Fixed a typographical error ("adn" → "and") in documentation.
app/modules/intelligence/agents/chat_agents/langchain_agent.py Corrected "seperated" to "separated" in a task description string.
app/modules/intelligence/agents/chat_agents/supervisor_agent.py Renamed loop variable from chunck to chunk in an async generator.
app/modules/intelligence/agents/chat_agents/system_agents/unit_test_agent.py Fixed "inport" to "import" in a prompt string.
app/modules/intelligence/agents/chat_agents/tool_helpers.py Corrected "successfull" to "successful" in a return string.
app/modules/intelligence/prompts/classification_prompts.py Fixed "accomodate" to "accommodate" in an example query.
app/modules/intelligence/prompts/system_prompt_setup.py Corrected "Aways" to "Always" in a system prompt.
app/modules/intelligence/tools/code_query_tools/get_node_neighbours_from_node_id_tool.py Fixed "atleast" to "at least" in a docstring.
app/modules/intelligence/tools/web_tools/web_search_tool.py Corrected "sucessful" to "successful" in a Pydantic model field description.
app/modules/utils/logger.py Fixed "propogation" to "propagation" in a comment.

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
Loading

Poem

🐇
With every hop and every spell,
The rabbit checks and checks so well!
No "adn" or "seperated" here—
Only perfect words appear.
In scripts and prompts, the typos flee,
For Codespell brings consistency!
📝✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit 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.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit 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 Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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

Documentation and Community

  • 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.

@sonarqubecloud
Copy link

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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3240fa5 and 06fcd5a.

📒 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 ENVIORNMENT to ENVIRONMENT, ensuring branch-based environment selection works as intended.

deployment/stage/celery/Jenkinsfile_CELERY (1)

25-27: Corrected typo in environment variable assignment
The change from ENVIORNMENT to ENVIRONMENT for the origin/main branch 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 for success is 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
Updating ENVIORNMENT to ENVIRONMENT in the origin/main branch 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 ENVIORNMENT to ENVIRONMENT. 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 chunck to chunk in 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 ENVIORNMENT to ENVIRONMENT. 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 the qna_task_prompt improves clarity. Consider wrapping the tool name get_code_from_probable_node_name in 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 ENVIORNMENT to ENVIRONMENT is 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
Ran rg -n "ENVIORNMENT" -g "deployment/**/Jenkinsfile_*" and found no remaining typos. All pipelines uniformly use ENVIRONMENT.

.codespellrc (1)

1-5: Codespell configuration is correctly defined. The skip patterns, check-hidden, and ignore-regex settings 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 integrate codespell with the .codespellrc configuration.

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