fix(code-style): use uv sync if lock file is present#1088
Conversation
| if [ -f "uv.lock" ]; then | ||
| uv sync | ||
| else | ||
| uv pip install . | ||
| fi |
There was a problem hiding this comment.
@jorgepiloto I was wondering if we could extend this to _doc-build-linux, _doc-build-windows, build-wheelhouse, check-vulnerabilities, and tests-pytest. Those are the actions I have noted where something similar to this might be needed (I am not sure if I am missing some others).
Or we could address those in a separate PR if that is what you prefer.
| elif [[ "${BUILD_BACKEND}" == 'uv' ]]; then | ||
| uv pip install ."${extra_targets}" | ||
| if [ -f "uv.lock" ]; then | ||
| uv sync --extra "${extra_targets}" |
There was a problem hiding this comment.
| uv sync --extra "${extra_targets}" | |
| uv sync --extra "${extra_targets}" --frozen |
If we're using the lock file we need to not regenerate it when we sync
There was a problem hiding this comment.
Yeah and we might not want to use dev dependencies so I'd add --no-dev too
| elif [[ "${BUILD_BACKEND}" == 'uv' ]]; then | ||
| uv pip install . | ||
| if [ -f "uv.lock" ]; then | ||
| uv sync |
There was a problem hiding this comment.
| uv sync | |
| uv sync --frozen |
| run: | | ||
| ${ACTIVATE_VENV} | ||
| if [[ "${USE_UV}" == 'true' ]]; then | ||
| uv pip install -U pip |
There was a problem hiding this comment.
We need to not do this with uv.
|
Bringing back some activity on this PR :) I think we have multiple things to discuss before adding lock files:
|
Fix #926 by using
uv pip installoruv syncdepending on whether auv.lockfile is present.