Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/build-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_grpc: 'true'
include_dev: 'true'
Expand All @@ -19,4 +19,4 @@ runs:
- name: Build html documentation
shell: bash
run: |
poetry run sphinx-build -b html docs docsbuild
uv run sphinx-build -b html docs docsbuild
6 changes: 3 additions & 3 deletions .github/actions/cleanup-all/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Cleanup all
shell: bash
run: poetry run python3 ./.github/actions/cleanup-all/cleanup-test-projects.py
run: uv run python3 ./.github/actions/cleanup-all/cleanup-test-projects.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/index-create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ outputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv

- name: Create index
id: create-index
shell: bash
run: poetry run python3 ./.github/actions/index-create/create.py
run: uv run python3 ./.github/actions/index-create/create.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/index-delete/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv

- name: Delete index
shell: bash
run: poetry run python3 ./.github/actions/index-delete/delete.py
run: uv run python3 ./.github/actions/index-delete/delete.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/project-create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
- name: Create project
id: create-project
shell: bash
run: poetry run python3 ./.github/actions/project-create/script.py
run: uv run python3 ./.github/actions/project-create/script.py
env:
API_VERSION: ${{ inputs.api_version }}
PINECONE_SERVICE_ACCOUNT_CLIENT_ID: ${{ inputs.PINECONE_SERVICE_ACCOUNT_CLIENT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/project-delete/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
- name: Delete project
id: delete-project
shell: bash
run: poetry run python3 ./.github/actions/project-delete/delete-project.py
run: uv run python3 ./.github/actions/project-delete/delete-project.py
env:
API_VERSION: ${{ inputs.api_version }}
PINECONE_SERVICE_ACCOUNT_CLIENT_ID: ${{ inputs.PINECONE_SERVICE_ACCOUNT_CLIENT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/run-integration-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ runs:
if [ -n "${{ inputs.pytest_splits }}" ] && [ -n "${{ inputs.pytest_group }}" ]; then
PYTEST_ARGS="--splits=${{ inputs.pytest_splits }} --group=${{ inputs.pytest_group }}"
fi
poetry run pytest ${{ inputs.test_suite }} \
uv run pytest ${{ inputs.test_suite }} \
$PYTEST_ARGS \
--retries 2 \
--retry-delay 35 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Setup Poetry'
description: 'Installs Poetry and dependencies'
name: 'Setup uv'
description: 'Installs uv and dependencies'
inputs:
include_grpc:
description: 'Install gRPC dependencies'
Expand All @@ -22,7 +22,7 @@ inputs:
required: true
default: '3.10'
enable_cache:
description: 'Enable caching of Poetry dependencies and virtual environment'
description: 'Enable caching of uv dependencies and virtual environment'
required: true
default: 'true'

Expand All @@ -34,23 +34,11 @@ runs:
with:
python-version: ${{ inputs.python_version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Get Poetry cache directory
if: ${{ inputs.enable_cache == 'true' }}
id: poetry-cache
shell: bash
run: |
echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache Poetry dependencies
if: ${{ inputs.enable_cache == 'true' }}
uses: actions/cache@v4
id: restore-cache-poetry
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
path: ${{ steps.poetry-cache.outputs.dir }}
key: poetry-${{ runner.os }}-${{ inputs.python_version }}-${{ hashFiles('poetry.lock') }}-grpc-${{ inputs.include_grpc }}-asyncio-${{ inputs.include_asyncio }}-dev-${{ inputs.include_dev }}-types-${{ inputs.include_types }}
save-cache: ${{ inputs.enable_cache }}
cache-suffix: "-grpc-${{ inputs.include_grpc }}-asyncio-${{ inputs.include_asyncio }}-dev-${{ inputs.include_dev }}-types-${{ inputs.include_types }}"

- name: Install dependencies
shell: bash
Expand All @@ -60,9 +48,9 @@ runs:
INCLUDE_TYPES: ${{ inputs.include_types }}
INCLUDE_ASYNCIO: ${{ inputs.include_asyncio }}
run: |
GRPC_FLAG=$( [ "$INCLUDE_GRPC" = "true" ] && echo "--extras grpc" || echo "" )
ASYNCIO_FLAG=$( [ "$INCLUDE_ASYNCIO" = "true" ] && echo "--extras asyncio" || echo "" )
DEV_FLAG=$( [ "$INCLUDE_DEV" = "false" ] && echo "--without dev" || echo "" )
TYPING_FLAG=$( [ "$INCLUDE_TYPES" = "true" ] && echo "--with types" || echo "" )
GRPC_FLAG=$( [ "$INCLUDE_GRPC" = "true" ] && echo "--extra grpc" || echo "" )
ASYNCIO_FLAG=$( [ "$INCLUDE_ASYNCIO" = "true" ] && echo "--extra asyncio" || echo "" )
DEV_FLAG=$( [ "$INCLUDE_DEV" = "true" ] && echo "--extra dev" || echo "" )
TYPING_FLAG=$( [ "$INCLUDE_TYPES" = "true" ] && echo "--extra types" || echo "" )
echo "Installing dependencies with flags: $DEV_FLAG $TYPING_FLAG $GRPC_FLAG $ASYNCIO_FLAG"
poetry install $DEV_FLAG $TYPING_FLAG $GRPC_FLAG $ASYNCIO_FLAG
uv sync $DEV_FLAG $TYPING_FLAG $GRPC_FLAG $ASYNCIO_FLAG
8 changes: 4 additions & 4 deletions .github/actions/test-dependency-asyncio-rest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_grpc: false
include_types: false
Expand All @@ -33,15 +33,15 @@ runs:
enable_cache: 'false'

- name: 'Install aiohttp ${{ inputs.aiohttp_version }}'
run: 'poetry add aiohttp==${{ inputs.aiohttp_version }}'
run: 'uv pip install --reinstall-package aiohttp aiohttp==${{ inputs.aiohttp_version }}'
shell: bash

- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/asyncio-rest -s -v
command: uv run pytest tests/dependency/asyncio-rest -s -v
env:
PINECONE_API_KEY: '${{ inputs.PINECONE_API_KEY }}'
PINECONE_ADDITIONAL_HEADERS: '${{ inputs.PINECONE_ADDITIONAL_HEADERS }}'
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/test-dependency-grpc/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_grpc: true
include_types: false
python_version: ${{ inputs.python_version }}
enable_cache: 'false'

- name: Install grpcio ${{ inputs.grpcio_version }}
run: poetry add grpcio==${{ inputs.grpcio_version }}
run: uv pip install --reinstall-package grpcio grpcio==${{ inputs.grpcio_version }}
shell: bash

- name: Install lz4 ${{ inputs.lz4_version }}
run: poetry add lz4==${{ inputs.lz4_version }}
run: uv pip install --reinstall-package lz4 lz4==${{ inputs.lz4_version }}
shell: bash

- name: Install protobuf ${{ inputs.protobuf_version }}
run: poetry add protobuf==${{ inputs.protobuf_version }}
run: uv pip install --reinstall-package protobuf protobuf==${{ inputs.protobuf_version }}
shell: bash

- name: Install googleapis-common-protos ${{ inputs.googleapis_common_protos_version }}
run: poetry add googleapis-common-protos==${{ inputs.googleapis_common_protos_version }}
run: uv pip install --reinstall-package googleapis-common-protos googleapis-common-protos==${{ inputs.googleapis_common_protos_version }}
shell: bash

- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/grpc -s -v
command: uv run pytest tests/dependency/grpc -s -v
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/test-dependency-rest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ inputs:
runs:
using: 'composite'
steps:
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_grpc: false
include_types: false
python_version: ${{ inputs.python_version }}
enable_cache: 'false'

- name: 'Install urllib3 ${{ matrix.urllib3-version }}'
run: 'poetry add urllib3==${{ matrix.urllib3-version }}'
- name: 'Install urllib3 ${{ inputs.urllib3_version }}'
run: 'uv pip install --reinstall-package urllib3 urllib3==${{ inputs.urllib3_version }}'
shell: bash

- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/rest -s -v
command: uv run pytest tests/dependency/rest -s -v
env:
PINECONE_API_KEY: '${{ inputs.PINECONE_API_KEY }}'
PINECONE_ADDITIONAL_HEADERS: '${{ inputs.PINECONE_ADDITIONAL_HEADERS }}'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ jobs:
python-version: ['3.10', '3.13']
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
python_version: ${{ matrix.python-version }}
- name: Package
run: poetry build
run: uv build

build-docs:
name: Build docs with pdoc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr-dep-change.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- 'pyproject.toml'
- 'poetry.lock'
- 'uv.lock'
workflow_dispatch: {}

permissions: {}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry
- uses: ./.github/actions/setup-uv
with:
python_version: '3.10'
- uses: ./.github/actions/project-delete
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
index_host_sparse: ${{ steps.create-index-sparse.outputs.index_host }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry
- uses: ./.github/actions/setup-uv
with:
python_version: '3.10'
- uses: ./.github/actions/project-create
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
exit 1
fi

- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
python_version: 3.12

Expand All @@ -81,9 +81,9 @@ jobs:
git config --global user.name "Pinecone CI"
git config --global user.email "[email protected]"

- name: Poetry bump pyproject toml version
- name: Bump pyproject.toml version
run: |
poetry version ${{ steps.bump.outputs.version }}
python -c "import re; content = open('pyproject.toml').read(); content = re.sub(r'version = \"[^\"]+\"', 'version = \"${{ steps.bump.outputs.version }}\"', content); open('pyproject.toml', 'w').write(content)"

- name: Build Python client
run: make package
Expand All @@ -105,13 +105,13 @@ jobs:
if: ${{ inputs.isPrerelease == false }}
run: |
# Add the original pinecone client version file to git
# Even though Poetry is now the preferred means of working
# Even though uv is now the preferred means of working
# with this project, since this __version__ file has been the
# one source of truth for our release process. We need to maintain
# both files for the time being, and they should always contain the
# identical package version
git add pinecone/__version__
# Add also the pyproject.toml, which is Poetry's source of truth, so
# Add also the pyproject.toml, which is uv's source of truth, so
# that we maintain the exact same version across the two files
git add pyproject.toml
git commit -m "[skip ci] Bump version to ${{ steps.bump.outputs.VERSION_TAG }}"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/testing-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
total_shards: [10]
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_asyncio: false
include_grpc: false
Expand Down Expand Up @@ -60,8 +60,8 @@ jobs:
total_shards: [8]
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_asyncio: true
include_grpc: false
Expand All @@ -87,8 +87,8 @@ jobs:
python_version: ${{ fromJson(inputs.python_versions_json) }}
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
- name: Setup uv
uses: ./.github/actions/setup-uv
with:
include_asyncio: false
include_grpc: true
Expand Down
Loading
Loading