Skip to content

Conversation

JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Mar 26, 2025

Summary by CodeRabbit

  • New Features

    • Introduced an automated translation sync process to keep language packs current.
    • Expanded and refined vocabulary entries for improved language interactions in English and Catalan.
  • Chores

    • Updated build, testing, and publishing workflows to use Python 3.11 for enhanced reliability.
    • Adjusted branch references in the publishing process for streamlined operations.
  • Refactor

    • Optimized translation processing to ensure robust sampling and deduplication.

some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
Copy link
Contributor

coderabbitai bot commented Mar 26, 2025

Warning

Rate limit exceeded

@JarbasAl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ddd1919 and 23d86dd.

📒 Files selected for processing (8)
  • ovos_commonqa/locale/ca-es/QuestionWord.voc (1 hunks)
  • ovos_commonqa/locale/es-es/Play.voc (1 hunks)
  • ovos_commonqa/locale/eu/QuestionWord.voc (1 hunks)
  • ovos_commonqa/locale/fr-fr/QuestionWord.voc (0 hunks)
  • ovos_commonqa/locale/nl-nl/QuestionWord.voc (1 hunks)
  • ovos_commonqa/locale/pt-pt/Play.voc (1 hunks)
  • ovos_commonqa/locale/pt-pt/QuestionWord.voc (1 hunks)
  • translations/ca-es/vocabs.json (1 hunks)

Walkthrough

This pull request updates several GitHub Actions workflows to use Python 3.11 instead of 3.8 and reduces the tested Python version matrix. It also revises the branch used for publishing from “dev” to “master” and introduces a new translations job in the release workflow with an updated dependency. Additionally, a legacy workflow file is deleted. Alongside these changes, vocabulary files for Catalan and English are expanded and modified, and the translation synchronization script is enhanced for template expansion, deduplication, and improved file path handling.

Changes

Files Change Summary
.github/workflows/build_tests.yml, .github/workflows/license_tests.yml Update Python version from 3.8 to 3.11 in the setup steps.
.github/workflows/install_tests.yml Update the Python version matrix from [3.7, 3.8, 3.9, "3.10"] to ["3.10", "3.11"].
.github/workflows/publish_stable.yml Change branch checkout from dev to master and update Python version from 3.8 to 3.11.
.github/workflows/release_workflow.yml Add a new translations job (checkout, install, sync translations, and commit), remove the pull-request merge condition, and set publish_alpha to depend on the translations job; update Python version in jobs.
.github/workflows/sync_tx.yml File deleted – previously handled translation syncing triggered by a bot.
ovos_commonqa/locale/ca-es/QuestionWord.voc,
translations/ca-es/vocabs.json
Modify Catalan vocabulary by changing "explica'm sobre" to "explica'm" and adding several new question phrases.
ovos_commonqa/locale/en-us/QuestionWord.voc,
translations/en-us/vocabs.json
Update English vocabulary by adding new question-related entries and removing duplicate ones (notably "which" and "whose").
scripts/sync_translations.py Enhance translation synchronization by replacing basic filtering with template expansion, deduplication, and improved file path construction with directory creation.

Sequence Diagram(s)

sequenceDiagram
    participant R as Repository
    participant RW as Release Workflow
    participant T as Translations Job
    participant PA as Publish Alpha Job
    
    R->>RW: Trigger release workflow
    RW->>T: Start translations job (checkout, setup Python 3.11, install dependencies)
    T->>R: Sync translations and commit changes to dev branch
    T-->>RW: Translations job complete
    RW->>PA: Start publish_alpha job (dependency on translations fulfilled)
    PA->>R: Execute publishing process (e.g., publish to PyPI)
Loading

Poem

I hopped through lines of YAML and code,
Upgrading Python to a newer mode.
New jobs sprang to life in our CI show,
With synced translations making it glow.
Vocabs grew rich in both tongue and tone,
A rabbit’s cheer for changes fully grown! 🐇🎉


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
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

🧹 Nitpick comments (1)
scripts/sync_translations.py (1)

1-3: TODO comment in script header is outdated.

The TODO comment "this script should run in every PR originated from @gitlocalize-app" followed by "TODO - before PR merge" appears to be outdated since you've now automated this in the workflow.

Consider updating the script header to reflect the current usage:

-"""this script should run in every PR originated from @gitlocalize-app
-TODO - before PR merge
+"""Script to synchronize translations from the translations directory to the locale directory.
+Used in the GitHub Actions workflow to ensure translations are up-to-date before release.
 """
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2ae663 and ddd1919.

📒 Files selected for processing (11)
  • .github/workflows/build_tests.yml (1 hunks)
  • .github/workflows/install_tests.yml (1 hunks)
  • .github/workflows/license_tests.yml (1 hunks)
  • .github/workflows/publish_stable.yml (1 hunks)
  • .github/workflows/release_workflow.yml (2 hunks)
  • .github/workflows/sync_tx.yml (0 hunks)
  • ovos_commonqa/locale/ca-es/QuestionWord.voc (1 hunks)
  • ovos_commonqa/locale/en-us/QuestionWord.voc (1 hunks)
  • scripts/sync_translations.py (5 hunks)
  • translations/ca-es/vocabs.json (1 hunks)
  • translations/en-us/vocabs.json (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/sync_tx.yml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/publish_stable.yml

27-27: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/release_workflow.yml

15-15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


20-20: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (28)
.github/workflows/license_tests.yml (1)

19-19: Python version updated to 3.11

The change from Python 3.8 to 3.11 aligns with the modernization effort across all workflow files in this PR. This ensures that the license tests run on a more recent Python version.

.github/workflows/build_tests.yml (1)

16-16: Python version updated to 3.11

The change from Python 3.8 to 3.11 is consistent with the updates made in other workflow files. This standardization helps maintain consistency across CI/CD processes.

ovos_commonqa/locale/en-us/QuestionWord.voc (2)

1-8: Enhanced question vocabulary

The additions to the vocabulary file expand the system's ability to recognize various question forms and informational requests. These new entries will help improve intent recognition for information-seeking queries.

Also applies to: 10-12, 14-14


18-18: Confirmed entry: "where"

The entry "where" is marked as a change, but based on the surrounding context it appears to have been in the original file as well. This might just be a formatting change or reordering in the file.

.github/workflows/publish_stable.yml (2)

24-24: Branch reference changed from dev to master

The checkout reference has been updated from 'dev' to 'master', which aligns with the branch specified for publishing in line 12. This ensures consistency in the workflow.


29-29: Python version updated to 3.11

The Python version has been updated from 3.8 to 3.11, consistent with the similar changes in other workflow files in this PR.

.github/workflows/install_tests.yml (1)

14-14: Python version matrix reduced to newer versions.

The matrix has been updated to only include Python 3.10 and 3.11, removing support for older Python versions. This change aligns with the direction of using more recent Python versions across workflows.

translations/en-us/vocabs.json (3)

8-10: Added basic question words.

The addition of "which", "whose", and "where" completes the set of common question words, improving the vocabulary coverage.


13-19: Enhanced search-related question phrases.

Added phrases related to information retrieval like "search for", "information about", etc. These additions will help in recognizing more natural language patterns for queries.


20-24: Added common question prefixes.

The new entries like "explain", "can you", "can it", etc., cover common conversational question patterns, making the intent recognition more robust.

translations/ca-es/vocabs.json (2)

9-9: Simplified Catalan explanation phrase.

Changed from "explica'm sobre" to just "explica'm", which is more natural in Catalan and aligns with common usage patterns.


12-23: Expanded Catalan question vocabulary.

Added numerous question forms and informational phrases in Catalan, significantly enhancing the natural language understanding capabilities for Catalan speakers.

.github/workflows/release_workflow.yml (3)

11-37: Added new translations synchronization job.

This new job ensures translations are properly synced before the release process, which improves the consistency of multilingual support.

Outdated GitHub Actions versions detected:

  • actions/checkout@v2 (line 15)
  • actions/setup-python@v1 (line 20)

Please consider updating to the latest versions for improved reliability and security:

-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v4
🧰 Tools
🪛 actionlint (1.7.4)

15-15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


20-20: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


39-39: Made publish_alpha dependent on translations job.

Good workflow sequencing - ensuring translations are synchronized before publishing the alpha version.


78-78: Updated Python version to 3.11.

Consistent with the overall change to use Python 3.11 throughout the workflows.

scripts/sync_translations.py (6)

8-9: Added utility imports for enhanced text processing.

The imports from ovos_utils provide template expansion and list manipulation functions that will improve the translation processing capabilities.


26-27: Improved sample processing for intents.

Enhanced the sample processing to:

  1. Expand templates using expand_template
  2. Flatten nested lists resulting from expansion
  3. Remove duplicates with deduplicate_list
  4. Properly handle "[UNUSED]" markers

This significantly improves the quality and consistency of the processed translation data.


28-32: Added proper path handling for intents files.

This improvement correctly handles file paths that start with "/" by ensuring the appropriate path construction and creates any necessary parent directories with os.makedirs().


41-47: Applied the same processing improvements to dialogs.

Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to dialog files ensures uniform processing across all translation types.


56-62: Applied the same processing improvements to vocabulary files.

Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to vocabulary files ensures uniform processing across all translation types.


71-77: Applied the same processing improvements to regex files.

Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to regex files ensures uniform processing across all translation types.

ovos_commonqa/locale/ca-es/QuestionWord.voc (7)

1-1: Great addition of new question phrase!

Adding "busca informació" (search information) enhances the vocabulary for question detection in Catalan.


3-4: Good expansion of question phrases!

The additions of "com funciona" (how it works) and "d'on ve" (where it comes from) are valuable for capturing more question patterns in Catalan.


6-6: Simplified phrase makes sense.

Changing from "explica'm sobre" to just "explica'm" streamlines the phrase while maintaining its functionality as a question indicator.


7-9: Great location-related question phrases!

The additions of "on es troba" (where it is located), "on puc trobar" (where can I find), and "per on passa" (where does it pass through) provide important variations for location-based questions.


16-16: Good data-inquiry phrase addition!

"quines dades tenim" (what data do we have) is a useful addition for data-related inquiries.


18-22: Excellent expansion of 'què' variants!

The additions of multiple "què" variants ("què diu", "què en sabem", "què hi ha sobre", "què opina", "què és") significantly enhance the ability to recognize different types of "what" questions in Catalan.


24-25: Good structural additions!

The "pregunta" entry has been retained, and the addition of "sobre" (about) as a separate entry provides flexibility in question pattern matching.

@@ -21,12 +21,12 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: dev
ref: master
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v1
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

Update actions/setup-python to a newer version

The current runner actions/setup-python@v1 is flagged as too old by the static analysis tools. Consider upgrading to a more recent version (e.g., v4) to ensure continued compatibility with GitHub Actions.

-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/setup-python@v1
uses: actions/setup-python@v4
🧰 Tools
🪛 actionlint (1.7.4)

27-27: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

@JarbasAl JarbasAl merged commit 339ed0d into dev Mar 26, 2025
3 of 4 checks passed
JarbasAl added a commit that referenced this pull request Mar 26, 2025
* Merge pull request #36 from daniferlop/dev

Galician translation

* Intents (#37)

* fix: improve matching based on gathered open data

some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught

* fix: improve matching based on gathered open data

some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught

* fix: improve matching based on gathered open data

some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught

* Increment Version to 1.1.1a1

* Update Changelog

* Fix/galician (#39)

* fix: galician

* fix: galician

* Increment Version to 1.1.1a2

* Update Changelog

---------

Co-authored-by: daniferlop <[email protected]>
Co-authored-by: JarbasAI <[email protected]>
Co-authored-by: JarbasAl <[email protected]>
@coderabbitai coderabbitai bot mentioned this pull request Mar 27, 2025
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