Skip to content

CI: Use uv exclusively#606

Merged
kennethreitz merged 2 commits intomainfrom
ci-use-uv-only
Mar 25, 2026
Merged

CI: Use uv exclusively#606
kennethreitz merged 2 commits intomainfrom
ci-use-uv-only

Conversation

@amotl
Copy link
Collaborator

@amotl amotl commented Mar 25, 2026

About

That's just maintenance. In this case, streamline the CI configuration for improved ergonomics and future proofing, see GH-605.

Details

  • activate-environment: true of newer astral-sh/setup-uv@v7 is the killer feature here, which wasn't available before.
  • Configuring cache-dependency-glob: pyproject.toml isn't needed, because the recipe already employs an excellent default configuration that includes this and other project metadata files.
  • The adjustments in test_cli were needed because of a different PyPy version installed by setup-uv. This will yield a report to Astral maintainers, unrelated to this patch.

@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ce140d2a-0113-4e81-a0e4-d6a9b98da5fe

📥 Commits

Reviewing files that changed from the base of the PR and between 36bac2e and b300e05.

⛔ Files ignored due to path filters (2)
  • .github/workflows/docs.yaml is excluded by !**/*.yaml
  • .github/workflows/test.yaml is excluded by !**/*.yaml
📒 Files selected for processing (1)
  • tests/test_cli.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_cli.py

Walkthrough

The test_cli_version test was modified to validate only the final line of stdout output instead of the entire output, allowing additional leading content while ensuring version information is correctly displayed.

Changes

Cohort / File(s) Summary
Test Enhancement
tests/test_cli.py
Modified test_cli_version to parse stdout into non-empty trimmed lines and assert that the last line matches the version, replacing strict entire-output matching to permit extra leading content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A humble test did change its way,
To check the version come what may,
Not rigid now, but smart and keen,
The final line is what we glean,
More flexible, our version's seen!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'CI: Use uv exclusively' directly describes the main objective of switching CI to use uv exclusively with setup-uv@v7, which aligns with the primary changes described in the PR objectives.
Description check ✅ Passed The description clearly relates to the changeset by explaining the maintenance work to streamline CI configuration, the switch to setup-uv@v7, and the necessary adjustments to test_cli due to PyPy version differences.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-use-uv-only

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@amotl amotl changed the title CI: Improve configuration, exclusively using astral-sh/setup-uv@v7 CI: Use astral-sh/setup-uv@v7 exclusively Mar 25, 2026
@amotl amotl changed the title CI: Use astral-sh/setup-uv@v7 exclusively CI: Use uv exclusively Mar 25, 2026
coderabbitai[bot]

This comment was marked as resolved.

`activate-environment: true` is the killer feature of
newer `astral-sh/setup-uv@v7` that significantly improves usability.
@amotl amotl changed the title CI: Use uv exclusively CI: Use uv exclusively and accomodate PyPy Mar 25, 2026
@amotl amotl changed the title CI: Use uv exclusively and accomodate PyPy CI: Use uv exclusively and accommodate PyPy Mar 25, 2026
@amotl amotl changed the title CI: Use uv exclusively and accommodate PyPy CI: Use uv exclusively Mar 25, 2026
@amotl amotl requested a review from kennethreitz March 25, 2026 23:09
@amotl amotl marked this pull request as ready for review March 25, 2026 23:09
@kennethreitz
Copy link
Owner

looks good!

@kennethreitz kennethreitz merged commit c1d789f into main Mar 25, 2026
9 checks passed
@kennethreitz kennethreitz deleted the ci-use-uv-only branch March 25, 2026 23:48
Comment on lines +64 to +68
# TODO: Accommodate PyPy as installed by `uv`, it emits spurious output on stdout before the version number.
# AssertionError: assert '(_common_types_metatype, 9088, 128, 128)\n(cython_function_or_method, 157568, 128, 128)\n3.6.0' == '3.6.0'
lines = [line.strip() for line in stdout.splitlines() if line.strip()]
assert lines, "Expected version output on stdout"
assert lines[-1] == __version__
Copy link
Collaborator Author

@amotl amotl Mar 26, 2026

Choose a reason for hiding this comment

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

PyPy as installed by GHA's actions/setup-python doesn't do that.

/cc @charliermarsh

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