Skip to content

Conversation

@CoMPaTech
Copy link
Member

@CoMPaTech CoMPaTech commented Jan 25, 2025

Fix language breaks + (temporarily?) revert uv to ensure things build properly

@CoMPaTech CoMPaTech added bug Something isn't working downstreaming Things that are changed on HA-core side and to be applied to -beta labels Jan 25, 2025
@CoMPaTech CoMPaTech self-assigned this Jan 25, 2025
@CoMPaTech CoMPaTech requested a review from a team as a code owner January 25, 2025 18:42
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2025

Walkthrough

This pull request introduces updates to the project configuration and testing script. The changes include bumping the project version from 0.55.3 to 0.55.4, updating the Python version requirement from 3.12 to 3.13, and modifying linting configurations in the pyproject.toml file. The scripts/core-testing.sh script has been updated to use the standard pip command for package installations instead of uv, and it now includes the mock-open package in its pip packages list, expanding the testing environment's dependencies.

Changes

File Change Summary
pyproject.toml - Version updated to 0.55.4
- Python version requirement changed to >=3.13
- Removed linting rules: PT004, ISC001
- Added linting rules: TC001, TC002, TC003
scripts/core-testing.sh - Replaced uv pip install with pip install
- Added mock-open to pip packages
- Minor text formatting in echo statements

Possibly related PRs

  • Re-add pylint #726: This PR re-adds pylint configuration in pyproject.toml, which is directly related to the changes made in the main PR regarding modifications to pylint settings.
  • Python 3.13 #781: This PR updates the Python version requirement in pyproject.toml from >=3.12 to >=3.13, which aligns with the changes made in the main PR.

Suggested labels

dependencies, enhancement

Suggested reviewers

  • bouwew

Poem

🐰 A rabbit's tale of code so bright,
Versions bump and linters take flight,
Mock-open joins the testing crew,
Python leaps to version new,
Configuration dancing with delight! 🚀


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ffe4c7 and ec9680f.

📒 Files selected for processing (1)
  • scripts/core-testing.sh (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/core-testing.sh

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 or @coderabbitai title 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

@CoMPaTech
Copy link
Member Author

@coderabbitai full review and summary please

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2025

@CoMPaTech I have a few concerns about the changes:

  1. The Python version requirement has been updated to >=3.13, but Python 3.13 is not yet released (expected mid-2024). This might prevent users from installing the package. Should this be kept at >=3.12?

  2. The switch from uv to pip in core-testing.sh - was this intentional? uv is generally faster and more modern.

  3. The PR title mentions a markdown fix, but I don't see any markdown-related changes in the diff. Could you clarify what markdown issue was fixed?

Also, I notice you've added 'mock-open' to pip_packages - is this for improving test coverage?

🔗 Analysis chain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for markdown file changes
git diff HEAD~1 -- '*.md'

# Look for Python version requirements in other files
rg "python.*3\.1[23]" -g '!pyproject.toml'

# Check for any documentation about Python versions or tooling
fd README.md | xargs cat

# Look for any related configuration files
fd "requirements.*|setup.*|\.toml$|\.ini$" --type f | xargs cat

# Check commit message for more context
git log -1 --pretty=format:"%B"

Length of output: 36068

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@CoMPaTech
Copy link
Member Author

@coderabbitai you're not making sense, I reverted those changes and yes removing uv apparently fixes the issue

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2025

Tip

For best results, initiate chat on the files or code changes.

@CoMPaTech I see the changes more clearly now. The main changes are the removal of uv in favor of pip (which you confirmed fixes an issue) and some updates to the linting configuration. I'll be more precise in my reviews going forward.

(_/)
(•.•)
(> <) noted!

🔗 Analysis chain

@CoMPaTech I apologize for the confusion in my previous review. I see you've reverted the Python version requirement change, and you're right that removing uv was intentional to fix an issue. Thank you for the clarification.

(_/)<
(•.•)
(> <) oops, my bad!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check current state of Python version requirement and other changes
echo "=== pyproject.toml ==="
git diff origin/main -- pyproject.toml

echo -e "\n=== core-testing.sh ==="
git diff origin/main -- scripts/core-testing.sh

Length of output: 3483


✏️ Learnings added
Learnt from: CoMPaTech
URL: https://github.com/plugwise/plugwise-beta/pull/815

Timestamp: 2025-01-25T20:42:24.587Z
Learning: The linting rules in plugwise-beta have been updated to use TC001/TC002/TC003 instead of TCH001/TCH002/TCH003 for type-checking related rules.

Learnt from: CoMPaTech
URL: https://github.com/plugwise/plugwise-beta/pull/815

Timestamp: 2025-01-25T20:42:24.587Z
Learning: In the plugwise-beta project, `uv` package manager was removed from core-testing.sh in favor of pip due to issues it was causing.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Copy link
Contributor

@bouwew bouwew left a comment

Choose a reason for hiding this comment

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

LGTM!

@CoMPaTech
Copy link
Member Author

Let's see how much we progress now on PRs, adding issue for (re)tracking uv

@CoMPaTech CoMPaTech merged commit 1ea31b5 into main Jan 26, 2025
9 checks passed
@CoMPaTech CoMPaTech deleted the smallfixes branch January 26, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working downstreaming Things that are changed on HA-core side and to be applied to -beta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants