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
1 change: 1 addition & 0 deletions .github/workflows/alpha-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
jobs:
testing:
uses: './.github/workflows/testing.yaml'
secrets: inherit

pypi:
uses: './.github/workflows/publish-to-pypi.yaml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
run-tests:
uses: './.github/workflows/testing.yaml'
secrets: inherit

pypi-nightly:
needs: run-tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-spruce-dev-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
run-tests:
uses: './.github/workflows/testing.yaml'
secrets: inherit

pypi-spruce-nightly:
needs: run-tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
run-tests:
uses: './.github/workflows/testing.yaml'
secrets: inherit

build-docs:
name: Build docs with pdoc
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-spruce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
testing:
uses: './.github/workflows/testing.yaml'
secrets: inherit

version-and-release-spruce:
timeout-minutes: 30
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:
jobs:
testing:
uses: './.github/workflows/testing.yaml'
secrets: inherit

pypi:
uses: './.github/workflows/publish-to-pypi.yaml'
Expand Down
50 changes: 45 additions & 5 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:

jobs:
units-no-grpc:
name: Run tests (REST)
name: Unit tests (REST)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -32,15 +32,55 @@ jobs:
# so we don't add new regressions.
poetry run mypy pinecone --exclude pinecone/core --exclude pinecone/grpc

integration-rest:
name: Integration tests (REST)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.11]
pineconeEnv: ['prod', 'staging']
max-parallel: 1
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Run integration tests (REST, prod)
if: matrix.pineconeEnv == 'prod'
run: poetry run pytest tests/integration -s -v
env:
PINECONE_CONTROLLER_HOST: 'https://api.pinecone.io'
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
TEST_CAPACITY_MODE_1: ${{ secrets.TEST_CAPACITY_MODE_1 }}
TEST_CAPACITY_MODE_2: ${{ secrets.TEST_CAPACITY_MODE_2 }}
GITHUB_BUILD_NUMBER: "${{ github.run_number }}-p-${{ matrix.python-version}}"

- name: Run integration tests (REST, staging)
if: matrix.pineconeEnv == 'staging'
run: poetry run pytest tests/integration -s -v
env:
PINECONE_CONTROLLER_HOST: 'https://api-staging.pinecone.io'
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY_STAGING }}
TEST_CAPACITY_MODE_1: ${{ secrets.TEST_CAPACITY_MODE_1 }}
TEST_CAPACITY_MODE_2: ${{ secrets.TEST_CAPACITY_MODE_2 }}
GITHUB_BUILD_NUMBER: "${{ github.run_number }}-s-${{ matrix.python-version}}"

units-grpc:
name: Run tests (GRPC)
name: Unit tests (GRPC)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -71,7 +111,7 @@ jobs:
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
4 changes: 3 additions & 1 deletion pinecone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
from .config import *
from .exceptions import *
from .control.pinecone import Pinecone
from .data.index import *
from .data.index import *
from .models import *
from .core.client.models import *
6 changes: 6 additions & 0 deletions pinecone/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
import logging
import os

from .config import ConfigBuilder, Config
from .pinecone_config import PineconeConfig

if (os.getenv('PINECONE_DEBUG') != None):
logging.basicConfig(level=logging.DEBUG)
8 changes: 0 additions & 8 deletions pinecone/config/logging.py

This file was deleted.

3 changes: 1 addition & 2 deletions pinecone/control/index_host_store.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Dict
from pinecone.config import Config
from pinecone.core.client.api.index_operations_api import IndexOperationsApi

from pinecone.core.client.api.manage_pod_indexes_api import ManagePodIndexesApi as IndexOperationsApi

class SingletonMeta(type):
_instances: Dict[str, str] = {}
Expand Down
7 changes: 0 additions & 7 deletions pinecone/control/models/collection_description.py

This file was deleted.

13 changes: 0 additions & 13 deletions pinecone/control/models/index_description.py

This file was deleted.

Loading