Skip to content
Snippets Groups Projects
Commit 200e5439 authored by theanupllm's avatar theanupllm
Browse files

chore: Update GitHub Actions workflow for Python testing

- Uncomment and enable multiple Python versions (3.10, 3.11, 3.12, 3.13)
- Enable Poetry caching in GitHub Actions
- Remove local path addition comment
- Simplify workflow configuration
parent 98a5ff41
No related branches found
No related tags found
No related merge requests found
...@@ -22,19 +22,19 @@ jobs: ...@@ -22,19 +22,19 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: python-version:
# - "3.10" - "3.10"
# - "3.11" - "3.11"
# - "3.12" - "3.12"
- "3.13" - "3.13"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# - name: Cache Poetry - name: Cache Poetry
# uses: actions/cache@v4 uses: actions/cache@v4
# with: with:
# path: ~/.poetry path: ~/.poetry
# key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
# restore-keys: | restore-keys: |
# ${{ runner.os }}-poetry- ${{ runner.os }}-poetry-
- name: Wait for Pinecone service to start - name: Wait for Pinecone service to start
run: | run: |
...@@ -48,10 +48,11 @@ jobs: ...@@ -48,10 +48,11 @@ jobs:
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
# cache: poetry cache: poetry
- name: Add Poetry to PATH # only needed for local testing
run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV # - name: Add Poetry to PATH
# run: echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies - name: Install dependencies
run: | run: |
......
...@@ -20,7 +20,6 @@ from semantic_router.encoders import ( ...@@ -20,7 +20,6 @@ from semantic_router.encoders import (
from semantic_router.index.base import BaseIndex from semantic_router.index.base import BaseIndex
from semantic_router.index.local import LocalIndex from semantic_router.index.local import LocalIndex
from semantic_router.index.pinecone import PineconeIndex from semantic_router.index.pinecone import PineconeIndex
from semantic_router.index.pinecone_local import PineconeLocalIndex
from semantic_router.index.qdrant import QdrantIndex from semantic_router.index.qdrant import QdrantIndex
from semantic_router.llms import BaseLLM, OpenAILLM from semantic_router.llms import BaseLLM, OpenAILLM
from semantic_router.route import Route from semantic_router.route import Route
...@@ -397,9 +396,7 @@ class BaseRouter(BaseModel): ...@@ -397,9 +396,7 @@ class BaseRouter(BaseModel):
dims = len(self.encoder(["test"])[0]) dims = len(self.encoder(["test"])[0])
self.index.dimensions = dims self.index.dimensions = dims
# now init index # now init index
if isinstance(self.index, PineconeIndex) or isinstance( if isinstance(self.index, PineconeIndex):
self.index, PineconeLocalIndex
):
self.index.index = self.index._init_index(force_create=True) self.index.index = self.index._init_index(force_create=True)
# run auto sync if active # run auto sync if active
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment