Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Pinecone Local Index support and update dependencies #522

Merged
merged 15 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 11 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
25 changes: 24 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ env:
jobs:
build:
runs-on: ubuntu-latest
services:
pinecone:
image: ghcr.io/pinecone-io/pinecone-local:latest
env:
PORT: 5080
PINECONE_HOST: localhost
ports:
- "5080-6000:5080-6000"

strategy:
matrix:
python-version:
Expand All @@ -26,6 +35,12 @@ jobs:
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Wait for Pinecone service to start
run: |
echo "Waiting for Pinecone service to start..."
sleep 10 # Wait for 10 seconds to ensure the container is up

- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
Expand All @@ -34,18 +49,26 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: poetry

# only needed for local testing
# - name: Add Poetry to PATH
# run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV

- name: Install dependencies
run: |
poetry install --all-extras
- name: Install nltk
run: |
pip install nltk

- name: Download nltk data
run: |
python -m nltk.downloader punkt stopwords wordnet punkt_tab

- name: Pytest All
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_API_KEY: pclocal
PINECONE_API_BASE_URL: http://localhost:5080
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ venv/
# local env files
.env*.local
.env
my.secrets
mac.env
local.mac.env

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ test:
poetry run pytest -vv --cov=semantic_router --cov-report=term-missing --cov-report=xml --exitfirst --maxfail=1

test_functional:
poetry run pytest -vv --exitfirst --maxfail=1 tests/functional
poetry run pytest -vv -s --exitfirst --maxfail=1 tests/functional
test_unit:
poetry run pytest -vv --exitfirst --maxfail=1 tests/unit

test_integration:
poetry run pytest -vv --exitfirst --maxfail=1 tests/integration
Loading