Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ba768fe
Codegen updates for 2025-10 (#526)
jhamon Nov 3, 2025
57d8d34
Add Admin API Update Endpoints and Organization Resource (#527)
jhamon Nov 4, 2025
56c8f8b
Add .cursor to .gitignore
jhamon Nov 4, 2025
9f0eddb
Update protobuf to 5.29.5 to address security vulnerability (#525)
rohanshah18 Oct 31, 2025
b63a907
Dedicated Read Capacity and Metadata Schema Configuration for Serverl…
jhamon Nov 4, 2025
b3267a5
Implement `fetch_by_metadata` for Index and IndexAsyncio (#529)
jhamon Nov 4, 2025
3c166cc
Update docstrings for new method options
jhamon Nov 4, 2025
96fbe24
Add support for `match_terms` parameter in search operations (#530)
jhamon Nov 4, 2025
05b71a7
Add FilterBuilder for Metadata Filter Construction (#531)
jhamon Nov 4, 2025
23dda74
Add `create_namespace` method to Index and IndexAsyncio (#532)
jhamon Nov 4, 2025
e872037
Bump assistant plugin (#534)
jhamon Nov 4, 2025
c27d3c2
Intelligent CI Test Selection for PRs (#536)
jhamon Nov 4, 2025
d8d68bf
Expose LSN Header Information (#539)
jhamon Nov 6, 2025
f44ca91
Integration test reorg and build sharding (#540)
jhamon Nov 14, 2025
6015607
Update OpenAPI Models for Namespace (#541)
jhamon Nov 14, 2025
f9e4c64
Migrate from poetry to uv (#542)
jhamon Nov 15, 2025
b1f3151
Fix docs typo
jhamon Nov 15, 2025
7a4fa20
Expose delete organization function (#543)
jhamon Nov 15, 2025
0815012
Add filter parameter to update() method for metadata-based updates (#…
jhamon Nov 15, 2025
470f57b
Drop Python 3.9 support (#545)
jhamon Nov 16, 2025
c6392fa
Type Hints Implementation (#547)
jhamon Nov 17, 2025
324c963
Remove SDK Defaults for Namespace Parameter (#546)
jhamon Nov 17, 2025
8f9f55d
Migrate to Python 3.10+ Type Syntax (#548)
jhamon Nov 17, 2025
b21b9f9
Improve IDE Tab-Completion and Type Hinting Support (#549)
jhamon Nov 17, 2025
db0418b
Update Pinecone class docstrings (#550)
jhamon Nov 17, 2025
cec5c5a
Review and update docstrings for Admin class (#551)
jhamon Nov 17, 2025
53082f1
Update Index and IndexInterface docstrings with RST formatting and co…
jhamon Nov 17, 2025
27e751c
Optimize gRPC Response Parsing Performance (#553)
jhamon Nov 18, 2025
8fb1b4d
Adopt orjson for JSON performance optimization (#556)
jhamon Nov 18, 2025
d391c9a
Add Missing Method Documentation (#560)
jhamon Nov 18, 2025
a445f09
Preserve all headers in response info (#559)
jhamon Nov 18, 2025
47c4cfa
Update pinecone-plugin-assistant to >=3.0.1 (#561)
jhamon Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3,421 changes: 3,421 additions & 0 deletions .durations_grpc

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions .durations_rest_asyncio

Large diffs are not rendered by default.

301 changes: 301 additions & 0 deletions .durations_rest_sync

Large diffs are not rendered by default.

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
17 changes: 13 additions & 4 deletions .github/actions/index-create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ inputs:
dimension:
description: 'The dimension of the index'
required: false
default: '3'
default: ''
metric:
description: 'The metric of the index'
required: false
default: 'cosine'
vector_type:
description: 'The type of the index'
required: false
default: 'dense'
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true
Expand All @@ -36,21 +40,26 @@ outputs:
description: 'The name of the index, including randomized suffix'
value: ${{ steps.create-index.outputs.index_name }}

index_host:
description: 'The host of the index'
value: ${{ steps.create-index.outputs.index_host }}

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 }}
NAME_PREFIX: ${{ inputs.name_prefix }}
REGION: ${{ inputs.region }}
CLOUD: ${{ inputs.cloud }}
VECTOR_TYPE: ${{ inputs.vector_type }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }}
70 changes: 30 additions & 40 deletions .github/actions/index-create/create.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import re
import random
import string
from datetime import datetime
import uuid
from pinecone import Pinecone
from datetime import datetime


def read_env_var(name):
Expand All @@ -22,39 +22,9 @@ def write_gh_output(name, value):
print(f"{name}={value}", file=fh)


def generate_index_name(test_name: str) -> str:
github_actor = os.getenv("GITHUB_ACTOR", None)
user = os.getenv("USER", None)
index_owner = github_actor or user

formatted_date = datetime.now().strftime("%Y%m%d-%H%M%S%f")[:-3]

github_job = os.getenv("GITHUB_JOB", None)

if test_name.startswith("test_"):
test_name = test_name[5:]

# Remove trailing underscore, if any
if test_name.endswith("_"):
test_name = test_name[:-1]

name_parts = [index_owner, formatted_date, github_job, test_name]
index_name = "-".join([x for x in name_parts if x is not None])

# Remove invalid characters
replace_with_hyphen = re.compile(r"[\[\(_,\s]")
index_name = re.sub(replace_with_hyphen, "-", index_name)
replace_with_empty = re.compile(r"[\]\)\.]")
index_name = re.sub(replace_with_empty, "", index_name)

max_length = 45
index_name = index_name[:max_length]

# Trim final character if it is not alphanumeric
if index_name.endswith("_") or index_name.endswith("-"):
index_name = index_name[:-1]

return index_name.lower()
def generate_index_name(name_prefix: str) -> str:
name = name_prefix.lower() + "-" + str(uuid.uuid4())
return name[:45]


def get_tags():
Expand All @@ -74,15 +44,35 @@ def get_tags():

def main():
pc = Pinecone(api_key=read_env_var("PINECONE_API_KEY"))
index_name = generate_index_name(read_env_var("NAME_PREFIX") + random_string(20))
index_name = generate_index_name(read_env_var("NAME_PREFIX"))
dimension_var = read_env_var("DIMENSION")
if dimension_var is not None and dimension_var != "":
dimension = int(dimension_var)
else:
dimension = None

vector_type_var = read_env_var("VECTOR_TYPE")
if vector_type_var is not None and vector_type_var != "":
vector_type = vector_type_var
else:
vector_type = None

metric = read_env_var("METRIC")
cloud = read_env_var("CLOUD")
region = read_env_var("REGION")
tags = get_tags()

pc.create_index(
name=index_name,
metric=read_env_var("METRIC"),
dimension=int(read_env_var("DIMENSION")),
spec={"serverless": {"cloud": read_env_var("CLOUD"), "region": read_env_var("REGION")}},
tags=get_tags(),
metric=metric,
dimension=dimension,
vector_type=vector_type,
tags=tags,
spec={"serverless": {"cloud": cloud, "region": region}},
)
description = pc.describe_index(name=index_name)
write_gh_output("index_name", index_name)
write_gh_output("index_host", description.host)


if __name__ == "__main__":
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
4 changes: 2 additions & 2 deletions .github/actions/project-create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'

- name: Install deps
shell: bash
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/actions/project-delete/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'

- name: Install deps
shell: bash
Expand All @@ -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
38 changes: 35 additions & 3 deletions .github/actions/run-integration-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,29 @@ inputs:
PINECONE_ADDITIONAL_HEADERS:
description: 'Additional headers to send with the request'
required: false
default: '{"sdk-test-suite": "pinecone-python-client"}'
default: '{"sdk-test-suite": "pinecone-python-client", "x-environment": "preprod-aws-0"}'
use_grpc:
description: 'Whether to use gRPC or REST'
required: false
default: 'false'
PINECONE_CLIENT_ID:
description: 'The client ID to use for admin tests'
required: false
PINECONE_CLIENT_SECRET:
description: 'The client secret to use for admin tests'
required: false
INDEX_HOST_DENSE:
description: 'The host of the dense index for db data tests'
required: false
INDEX_HOST_SPARSE:
description: 'The host of the sparse index for db data tests'
required: false
pytest_splits:
description: 'Number of shards to split tests into (for test sharding)'
required: false
pytest_group:
description: 'Which shard to run (1-indexed, for test sharding)'
required: false

runs:
using: 'composite'
Expand All @@ -33,9 +51,23 @@ runs:
- name: Run tests
id: run-tests
shell: bash
run: poetry run pytest tests/integration/${{ inputs.test_suite }} --retries 2 --retry-delay 35 -s -vv --log-cli-level=DEBUG
run: |
PYTEST_ARGS=""
if [ -n "${{ inputs.pytest_splits }}" ] && [ -n "${{ inputs.pytest_group }}" ]; then
PYTEST_ARGS="--splits=${{ inputs.pytest_splits }} --group=${{ inputs.pytest_group }}"
fi
uv run pytest ${{ inputs.test_suite }} \
$PYTEST_ARGS \
--retries 2 \
--retry-delay 35 \
--log-cli-level=DEBUG \
--durations=25 \
-s -vv
env:
PINECONE_API_KEY: ${{ steps.decrypt-api-key.outputs.decrypted_secret }}
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
PINECONE_CLIENT_ID: ${{ inputs.PINECONE_CLIENT_ID }}
PINECONE_CLIENT_SECRET: ${{ inputs.PINECONE_CLIENT_SECRET }}
USE_GRPC: ${{ inputs.use_grpc }}
SKIP_WEIRD: 'true'
INDEX_HOST_DENSE: ${{ inputs.INDEX_HOST_DENSE }}
INDEX_HOST_SPARSE: ${{ inputs.INDEX_HOST_SPARSE }}
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 @@ -20,7 +20,11 @@ inputs:
python_version:
description: 'Python version to use'
required: true
default: '3.9'
default: '3.10'
enable_cache:
description: 'Enable caching of uv dependencies and virtual environment'
required: true
default: 'true'

runs:
using: 'composite'
Expand All @@ -30,8 +34,11 @@ runs:
with:
python-version: ${{ inputs.python_version }}

- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
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 @@ -41,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
11 changes: 6 additions & 5 deletions .github/actions/test-dependency-asyncio-rest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,33 @@ inputs:
python_version:
description: 'The version of Python to use'
required: false
default: '3.9'
default: '3.10'
aiohttp_version:
description: 'The version of aiohttp to install'
required: true

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
include_asyncio: true
python_version: ${{ inputs.python_version }}
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
Loading
Loading