Skip to content

Conversation

@nirtal85
Copy link
Owner

@nirtal85 nirtal85 commented Apr 6, 2025

Description

https://github.com/astral-sh/setup-uv
https://github.com/mkniewallner/migrate-to-uv

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)

Checklist:

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

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Streamlined the development workflow with an updated dependency setup and test execution process using uv.
    • Revamped the project build configuration with enhanced metadata and improved dependency grouping for a smoother installation experience, transitioning from Poetry to Hatchling.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 6, 2025

Walkthrough

This pull request updates the CI workflow and project configuration. The workflow files have been modified to replace Poetry with the uv tool for managing dependencies and executing tests. Additionally, the project’s build system has been switched from Poetry to Hatchling by updating the pyproject.toml file, which now includes new project metadata, dependency groups, and build target settings.

Changes

File(s) Summary of Changes
.github/workflows/devRun.yml Removed Poetry installation and configuration. Introduced new steps to set up uv with caching, create a virtual environment, install dependencies, and run tests using uv commands instead of Poetry.
.github/workflows/nightly.yml Removed Poetry installation and configuration. Added steps to set up uv, create a virtual environment, and synchronize dependencies using uv pip sync uv.lock. Updated the command to run tests within the context of the uv virtual environment.
pyproject.toml Transitioned from Poetry to Hatchling as the build system. Updated build-backend and requires fields. Moved dependencies to a new [project] section, added project metadata, defined dependency groups, and introduced Hatchling target sections for sdist and wheel.

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI Pipeline
    participant UV as uv Tool
    participant VENV as Virtual Environment
    participant Test as Test Runner

    CI->>UV: Set up uv with caching
    CI->>VENV: Create venv & install dependencies via uv
    VENV->>Test: Execute tests using uv venv exec command
Loading

Suggested reviewers

  • elias-shoursoh

Poem

Oh hop, hop, in the code I dance,
Switching tools with a curious stance.
uv sets the pace, venv comes to play,
Hatchling builds our project today.
With a twitch of my nose and a joyful cheer,
I celebrate changes, hopping far and near!
🐰✨


📜 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 d7979b8 and 6b59f44.

📒 Files selected for processing (1)
  • .github/workflows/nightly.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/nightly.yml (2)

46-50: Migration to uv for Dependency Management and Virtual Environment Setup
The new steps correctly replace the Poetry installation with the uv tool. Using astral-sh/setup-uv@v5 along with the enable-cache: true flag is proper, and the subsequent commands (uv venv and uv pip sync uv.lock) reflect the intended migration.


56-57: Validate Virtual Environment Activation
The tests now begin by sourcing .venv/bin/activate, which is standard if uv venv creates the virtual environment in the .venv directory. Please verify that this path remains consistent with how uv sets up the environment; if uv uses a different directory by default, this step might need adjustment.


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

@github-actions github-actions bot requested a review from elias-shoursoh April 6, 2025 09:47
@nirtal85 nirtal85 changed the title uv migrate to uv Apr 6, 2025
@nirtal85 nirtal85 merged commit 8e52c0d into main Apr 6, 2025
5 of 7 checks passed
@nirtal85 nirtal85 deleted the uv branch April 6, 2025 10:02
@coderabbitai coderabbitai bot mentioned this pull request Apr 6, 2025
Merged
6 tasks
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.

2 participants