Skip to content
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

fix:pyee latest version #123

Closed
wants to merge 4 commits into from
Closed

fix:pyee latest version #123

wants to merge 4 commits into from

Conversation

JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Oct 9, 2024

Summary by CodeRabbit

  • Chores

    • Updated the import statement for the ExecutorEventEmitter class to reflect its new source.
    • Revised the version constraint for the pyee package in requirements.txt, increasing the minimum required version.
  • Tests

    • Adjusted the import path for ExecutorEventEmitter in unit tests to align with the updated module structure.

Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

Walkthrough

The changes in this pull request involve updating the import path for the ExecutorEventEmitter class from pyee to pyee.executor, affecting its usage in the MessageBusClient and related classes. Additionally, the requirements.txt file has been modified to set the minimum version of the pyee package to 12.0.0, removing the previous upper limit. The test files have also been updated to reflect the new import path while maintaining their existing structure and functionality.

Changes

File Change Summary
ovos_bus_client/client/client.py Import statement modified: from pyee import ExecutorEventEmitterfrom pyee.executor import ExecutorEventEmitter
requirements.txt Dependency version updated: pyee from pyee>=8.1.0, <9.0.0 to pyee>=12.0.0
test/unittests/test_client.py Import path updated: from pyee import ExecutorEventEmitterfrom pyee.executor import ExecutorEventEmitter

Poem

In the code where rabbits hop,
Imports now take a new stop.
Pyee's version has grown,
A brighter path is shown.
With tests that still do their dance,
We celebrate this code advance! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between dfdc584 and e6bb074.

📒 Files selected for processing (3)
  • ovos_bus_client/client/client.py (1 hunks)
  • requirements.txt (1 hunks)
  • test/unittests/test_client.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • ovos_bus_client/client/client.py
🧰 Additional context used
🔇 Additional comments (3)
requirements.txt (1)

4-4: ⚠️ Potential issue

Consider a more conservative version constraint for pyee.

The update to pyee>=12.0.0 aligns with the PR objective to use the latest version. However, this change has some implications:

  1. Removing the upper bound (<9.0.0) allows for future major versions, which might introduce breaking changes.
  2. The significant jump from 8.1.0 to 12.0.0 likely includes breaking changes that may require code adjustments.

To balance using a recent version while maintaining stability, consider:

  1. Adding an upper bound to prevent automatic updates to future major versions:
    pyee>=12.0.0,<13.0.0
    
  2. Documenting the changes required in the codebase due to this version update.
  3. Ensuring all affected parts of the codebase are updated and tested with this new version.

To help assess the impact, you can run the following command to check for pyee usage across the project:

This will help identify areas that might need updates due to the version change.

✅ Verification successful

Add an upper version bound for pyee to ensure compatibility.

The pyee package is currently used in the following files:

  • test/unittests/test_client.py
  • ovos_bus_client/client/client.py

To maintain project stability and prevent potential issues from future major releases, consider updating the version constraint in requirements.txt as follows:

pyee>=12.0.0,<13.0.0

Additionally, review and test the above files to ensure they are compatible with pyee version 12.0.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for pyee imports and usage
rg --type python 'from pyee' -A 5

Length of output: 66


Script:

#!/bin/bash
# Search for pyee imports and usage in Python files
fd --extension py --type f | xargs rg 'from pyee' -A 5

Length of output: 925

test/unittests/test_client.py (2)

Line range hint 1-24: LGTM: File updated successfully with minimal changes.

The only change in this file is the updated import statement for ExecutorEventEmitter. The rest of the file remains unchanged, which is appropriate given the nature of the update. This change successfully addresses the PR objective of updating to the latest version of pyee.


16-16: LGTM: Import statement updated correctly.

The import statement for ExecutorEventEmitter has been updated to reflect the new structure in the pyee library. This change is consistent with the PR objective to update to the latest version of pyee.

Let's verify if this change affects the rest of the file:

✅ Verification successful

Verified: ExecutorEventEmitter is correctly imported and used in test/unittests/test_client.py.

  • Import statement updated to from pyee.executor import ExecutorEventEmitter.
  • ExecutorEventEmitter used appropriately in assertions.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if ExecutorEventEmitter is used correctly throughout the file.

# Test: Search for ExecutorEventEmitter usage
rg --type python -n 'ExecutorEventEmitter' test/unittests/test_client.py

Length of output: 103


Script:

#!/bin/bash
# Description: Check if ExecutorEventEmitter is used correctly throughout the file.

# Test: Search for ExecutorEventEmitter usage with the correct file type
rg --type py -n 'ExecutorEventEmitter' test/unittests/test_client.py

Length of output: 194


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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 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.

@JarbasAl JarbasAl requested a review from mikejgray October 9, 2024 18:57
@github-actions github-actions bot added the fix label Oct 9, 2024
@github-actions github-actions bot added fix and removed fix labels Oct 9, 2024
@JarbasAl
Copy link
Member Author

JarbasAl commented Oct 9, 2024

not sure why tests are failing and no time to bug hunt, so i'll leave this on hold for now unless someone wants to take over, expected a quick fix but instead...

ovos_bus_client/client/client.py:10: in <module>
    from pyee.executor import ExecutorEventEmitter
E   ModuleNotFoundError: No module named 'pyee.executor'

JarbasAl added a commit that referenced this pull request Oct 9, 2024
last backwards compatible version

relates to #123
@JarbasAl JarbasAl mentioned this pull request Oct 9, 2024
JarbasAl added a commit that referenced this pull request Oct 15, 2024
* fix:allow newer pyee

last backwards compatible version

relates to #123

* Update requirements.txt
@JarbasAl JarbasAl marked this pull request as draft October 15, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants