Skip to content

Update CI workflow to use setup-uv for Python setup#35

Merged
ternaus merged 1 commit into
albumentations-team:mainfrom
Borda:update/ci
Jan 14, 2026
Merged

Update CI workflow to use setup-uv for Python setup#35
ternaus merged 1 commit into
albumentations-team:mainfrom
Borda:update/ci

Conversation

@Borda

@Borda Borda commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the CI workflow to use the astral-sh/setup-uv action for setting up Python environments and installing dependencies, streamlining the process and removing redundant steps.

CI workflow improvements:

  • Replaced the actions/setup-python action with astral-sh/setup-uv to set up Python and manage environments more efficiently (.github/workflows/ci.yml).
  • Simplified dependency installation by removing manual upgrades and using uv pip install -r requirements-dev.txt directly (.github/workflows/ci.yml).

cc: @ternaus

Summary by Sourcery

Update the CI workflow to use uv for Python setup and dependency installation.

CI:

  • Switch CI Python setup from actions/setup-python to astral-sh/setup-uv with environment activation.
  • Simplify CI dependency installation to a single uv pip install of development requirements.

Copilot AI review requested due to automatic review settings January 14, 2026 09:41
@sourcery-ai

sourcery-ai Bot commented Jan 14, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the CI workflow to use astral-sh/setup-uv for Python setup and dependency installation, simplifying steps and relying on uv-managed environments.

File-Level Changes

Change Details Files
Switch CI Python setup from actions/setup-python plus manual uv installation to astral-sh/setup-uv with environment activation and simplified dependency installation.
  • Replace actions/setup-python with astral-sh/setup-uv to install uv and configure the requested Python version from the matrix.
  • Enable automatic environment activation via the setup-uv action instead of relying on system Python.
  • Remove manual uv installation and --system flag usage in favor of a direct uv pip install of development requirements.
  • Rename and simplify the dependency installation step to a single uv pip install -r requirements-dev.txt command.
  • Tidy the pre-commit step by using a single-line run: pre-commit run --all-files.
.github/workflows/ci.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider pinning an explicit uv-version in astral-sh/setup-uv@v5 to avoid unexpected CI breakages from future uv releases.
  • Now that uv manages the environment and you’ve dropped --system, double-check that any tools invoked later in the workflow (like pre-commit) are expected to come from the activated uv environment and not from a system/global install; if not, you may want to make that assumption explicit in the workflow name or comments.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider pinning an explicit `uv-version` in `astral-sh/setup-uv@v5` to avoid unexpected CI breakages from future uv releases.
- Now that `uv` manages the environment and you’ve dropped `--system`, double-check that any tools invoked later in the workflow (like `pre-commit`) are expected to come from the activated uv environment and not from a system/global install; if not, you may want to make that assumption explicit in the workflow name or comments.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the CI workflow by replacing the traditional Python setup process with the astral-sh/setup-uv action, streamlining dependency installation and reducing workflow complexity.

Changes:

  • Replaced actions/setup-python@v5 with astral-sh/setup-uv@v5 for Python environment setup
  • Removed manual pip install --upgrade uv step by using the dedicated setup-uv action
  • Simplified dependency installation command by removing the --system flag and using virtual environment management
  • Cleaned up workflow syntax by converting multi-line run commands to single-line commands where appropriate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ternaus ternaus merged commit 66c55b4 into albumentations-team:main Jan 14, 2026
7 of 8 checks passed
@ternaus

ternaus commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Thanks! This is a good. Faster CI is always a bliss.

@Borda Borda deleted the update/ci branch January 14, 2026 12:21
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.

3 participants