Repository navigation
Use setup-uv defaults for Python and the venv - #211
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
LGTM. Reviewed the publish, build, and SBOM workflow changes; no concrete regressions found. The temporary setup-uv-defaults branch is a short-lived integration dependency, as noted in the PR.
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 2
Made with ❤️ by Ultralytics Actions
Since review 1, the diff shown is unchanged. I found a missed release-blocking mismatch: the workflow still references setup-uv@main, so it does not use the activation defaults this change depends on. This reverses the prior LGTM based on the action’s documented opt-in activation behavior.
💬 Posted 1 inline comment
⚠️ HIGH.github/workflows/publish.yml:33This install now relies on an activated venv, but the workflow still usessetup-uv@main; the PR description says the new activation defaults are onsetup-uv-defaults. On@main, activation is opt-in, so without--systemthis install has no target environment and fails. The SBOM step also relies onVIRTUAL_ENVbeing set. Pin the action to the defaults branch or explicitly enable activation before removing--system. (github.com)
| python-version: "3.x" | ||
| - uses: ultralytics/actions/setup-uv@main | ||
| - run: uv pip install --system --no-cache ultralytics-actions | ||
| - run: uv pip install --no-cache ultralytics-actions |
There was a problem hiding this comment.
ultralytics/actions#915 merged at 17:18 UTC (da5463a, released as 0.4.0), so setup-uv@main now carries the new defaults and this CI run exercises them. The validation commit pointing at @setup-uv-defaults was already reverted, and the PR description is updated to match.
| python-version: "3.x" | ||
| - uses: ultralytics/actions/setup-uv@main | ||
| - run: uv pip install --system --no-cache ultralytics-actions | ||
| - run: uv pip install --no-cache ultralytics-actions |
There was a problem hiding this comment.
ultralytics/actions#915 merged at 17:18 UTC (da5463a, released as 0.4.0), so setup-uv@main now carries the new defaults and this CI run exercises them. The validation commit pointing at @setup-uv-defaults was already reverted, and the PR description is updated to match.
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 3
Made with ❤️ by Ultralytics Actions
Since review 2, the setup-uv defaults concern is resolved by the action update described in the PR discussion. This diff removes the separate Python and hand-made venv setup, uses the activated environment for installs and SBOM scanning, and switches the build to uv build. No remaining concrete regressions found; LGTM.
|
🎉 This PR has been merged—thank you, @glenn-jocher!
Using |
Replaces
actions/setup-pythonwithultralytics/actions/setup-uv. By default, that action now activates a venv on the newest Python preinstalled on the runner, with no Python download. Packages install into that venv, so--systemis dropped. Jobs that pin a Python version keep the pin onsetup-uv, which uses the preinstalled copy when the runner has one.uv build, which produced the same wheel contents, METADATA and sdist file list aspython -m buildin a local comparison. The SBOM scans the activated venv instead of a separatesbom-envand is named after the repository (SYFT_SOURCE_NAME) rather than the venv's runner temp path. The same SBOM job, run from the actions branch against a temporary draft release, produced a valid SPDX 2.3 document matching the last release's SBOM package for package.CI first ran against the
setup-uv-defaultsbranch of ultralytics/actions#915. #915 is now merged (da5463a, released as 0.4.0), sosetup-uvis back on@main, which carries the new defaults.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
The publish workflow now uses
setup-uv’s activated Python environment for dependency installation, package builds, and SBOM generation.📊 Key Changes
actions/setup-python; installs no longer use--system.python -m buildwithuv build.sbom-env; the SBOM scan uses the activated environment and names its source after the repository.🎯 Purpose & Impact
uv buildoutput matches the previous build’s wheel contents, metadata, and sdist file list. The SBOM source name is now the repository rather than the runner’s temporary venv path.