Skip to content

Switch from rye to uv, Python 3.13, HA 2025.2#903

Merged
frenck merged 1 commit intomainfrom
frenck-2025-0103
Feb 20, 2025
Merged

Switch from rye to uv, Python 3.13, HA 2025.2#903
frenck merged 1 commit intomainfrom
frenck-2025-0103

Conversation

@frenck
Copy link
Copy Markdown
Owner

@frenck frenck commented Feb 20, 2025

Description

SSIA 😄

  • Moves to uv as the project management.
  • Python 3.13
  • Home Assistant 2025.2 as the minimum version

Motivation and Context

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@frenck frenck added the breaking-change A breaking change for existing users. label Feb 20, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 20, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request updates the development environment and project configuration. The changes include an upgrade of base images and Python version (to 3.13), a consistent replacement of “rye” with “uv” in dev containers, workflows, and hooks, and numerous reformatting and restructuring of JSON translation files across various languages. Additionally, the Home Assistant version requirement has been bumped, and minor code refactors—such as simplifying the event filtering in a repair method and updating import statements—have been made.

Changes

File(s) Change Summary
.devcontainer/Dockerfile, .devcontainer/devcontainer.json Update base image from Debian to Python 3.13; streamline devcontainer configuration by switching from “rye” to “uv” and adjusting feature commands.
.github/workflows/{documentation.yaml, pylint.yaml, ruff.yaml} Fix typo in documentation step; upgrade Python version (3.11 → 3.13), update lint workflows by replacing “rye” with “uv”, and adjust dependency sync commands.
.pre-commit-config.yaml Replace hook commands from “rye run” to “uv run” and apply minor formatting corrections.
.python-version Remove the file to unset a specific Python version.
custom_components/spook/integrations/spook_inverse/translations/* Reformat and restructure JSON files for multiple languages; adjust indentation and add new keys (e.g., “options”) without changing core content.
custom_components/spook/repairs.py Simplify the async_activate method by condensing the conditional check for event filtering.
custom_components/spook/services.py Update the import of TypeVar from typing_extensions to the standard typing module.
custom_components/spook/translations/* Restructure and reformat translation JSON files; update error messages and reorganize keys for improved clarity.
documentation/installation.md, hacs.json Upgrade Home Assistant version requirement from 2024.4.0 to 2025.2.0.
pyproject.toml Change Python requirement to “>=3.13”, bump Home Assistant dependency to “>=2025.2.0”, remove [tool.rye], add [tool.uv] with dev-dependencies, and adjust lint ignore rules.

Sequence Diagram(s)

sequenceDiagram
    participant Event
    participant SpookRepair
    Event->>SpookRepair: Trigger reload event with event_data
    SpookRepair->>SpookRepair: Check if inspect_on_reload equals event_data.get("domain")
    alt Domain matches
        SpookRepair->>SpookRepair: Activate repair process
    else
        SpookRepair->>SpookRepair: Ignore event
    end
Loading

Suggested labels

maintenance

Poem

Oh, what a hop it has been today,
With changes leaping in every way.
From Python upgrades to JSON art,
I nibble through code with a joyful heart.
Tools have shifted, the config’s now new—
A rabbit’s cheer for a code review! 🐇🎉


📜 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 98d9b89 and 6cbf376.

⛔ Files ignored due to path filters (3)
  • requirements-dev.lock is excluded by !**/*.lock
  • requirements.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (67)
  • .devcontainer/Dockerfile (1 hunks)
  • .devcontainer/devcontainer.json (2 hunks)
  • .github/workflows/documentation.yaml (1 hunks)
  • .github/workflows/pylint.yaml (2 hunks)
  • .github/workflows/ruff.yaml (2 hunks)
  • .pre-commit-config.yaml (2 hunks)
  • .python-version (0 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/ar.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/cs.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/da.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/de.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/el.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/es.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/fr.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/gl.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/hr.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/hu.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/id.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/it.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/nb_NO.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/nl.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/pl.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/pt.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/pt_BR.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/ru.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/sk.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/sv.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/tr.json (1 hunks)
  • custom_components/spook/integrations/spook_inverse/translations/ur.json (1 hunks)
  • custom_components/spook/repairs.py (1 hunks)
  • custom_components/spook/services.py (1 hunks)
  • custom_components/spook/translations/ar.json (1 hunks)
  • custom_components/spook/translations/bg.json (1 hunks)
  • custom_components/spook/translations/ca.json (1 hunks)
  • custom_components/spook/translations/cs.json (1 hunks)
  • custom_components/spook/translations/da.json (1 hunks)
  • custom_components/spook/translations/el.json (1 hunks)
  • custom_components/spook/translations/et.json (1 hunks)
  • custom_components/spook/translations/gl.json (1 hunks)
  • custom_components/spook/translations/he.json (1 hunks)
  • custom_components/spook/translations/hr.json (1 hunks)
  • custom_components/spook/translations/hu.json (1 hunks)
  • custom_components/spook/translations/id.json (1 hunks)
  • custom_components/spook/translations/it.json (1 hunks)
  • custom_components/spook/translations/ja.json (1 hunks)
  • custom_components/spook/translations/ka.json (1 hunks)
  • custom_components/spook/translations/ko.json (1 hunks)
  • custom_components/spook/translations/lb.json (1 hunks)
  • custom_components/spook/translations/lv.json (1 hunks)
  • custom_components/spook/translations/nb_NO.json (1 hunks)
  • custom_components/spook/translations/pl.json (1 hunks)
  • custom_components/spook/translations/pt-BR.json (1 hunks)
  • custom_components/spook/translations/pt.json (1 hunks)
  • custom_components/spook/translations/ro.json (1 hunks)
  • custom_components/spook/translations/ru.json (1 hunks)
  • custom_components/spook/translations/sk.json (1 hunks)
  • custom_components/spook/translations/sl.json (1 hunks)
  • custom_components/spook/translations/sv.json (1 hunks)
  • custom_components/spook/translations/th.json (1 hunks)
  • custom_components/spook/translations/tr.json (1 hunks)
  • custom_components/spook/translations/uk.json (1 hunks)
  • custom_components/spook/translations/ur.json (1 hunks)
  • custom_components/spook/translations/zh_Hans.json (1 hunks)
  • custom_components/spook/translations/zh_Hant.json (1 hunks)
  • documentation/installation.md (1 hunks)
  • hacs.json (1 hunks)
  • pyproject.toml (3 hunks)

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

@frenck frenck merged commit 976349e into main Feb 20, 2025
@frenck frenck deleted the frenck-2025-0103 branch February 20, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change A breaking change for existing users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant