fix: use test.pypi as extra index, not primary

UV was configured with test.pypi as primary index and PyPI as extra index.
This caused failures because packages like hf-transfer don't exist on test.pypi.

Changed to use PyPI as primary (default) and test.pypi as extra index.
UV will now find common packages on PyPI and only look for RC versions on test.pypi.
This commit is contained in:
Ashwin Bharambe 2025-10-31 07:29:20 -07:00
parent 275e0b9191
commit 8ebb9195a4
3 changed files with 6 additions and 15 deletions

View file

@ -55,11 +55,9 @@ jobs:
- name: Export UV environment variables
run: |
if [ -n "${{ steps.client-config-precommit.outputs.uv-index-url }}" ]; then
echo "UV_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-index-url }}" >> $GITHUB_ENV
if [ -n "${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" ]; then
echo "UV_EXTRA_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" >> $GITHUB_ENV
echo "UV_INDEX_STRATEGY=unsafe-best-match" >> $GITHUB_ENV
echo "Setting UV_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-index-url }}"
echo "Setting UV_EXTRA_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-extra-index-url }}"
echo "Setting UV_INDEX_STRATEGY to unsafe-best-match"
fi
@ -139,9 +137,8 @@ jobs:
- name: Sync dev dependencies for mypy
env:
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-index-url && 'unsafe-best-match' || '' }}
UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-extra-index-url && 'unsafe-best-match' || '' }}
run: |
# Check if type_checking group exists, otherwise just use dev
if grep -q "type.checking" pyproject.toml; then