Skip to content

Commit

Permalink
Merge pull request #493 from aurelio-labs/james/full-hybrid-support
Browse files Browse the repository at this point in the history
feat: hybrid router and async pinecone upgrades
  • Loading branch information
jamescalam authored Jan 13, 2025
2 parents 69b4932 + 6aead63 commit fbf5a64
Show file tree
Hide file tree
Showing 23 changed files with 3,140 additions and 2,957 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Docs

on:
release:
types: [released]
types: [ released ]

jobs:
build-docs:
Expand All @@ -14,44 +14,44 @@ jobs:
strategy:
matrix:
python-version:
- "3.13"
- "3.13"
env:
POETRY_VERSION: "1.8.4"
POETRY_VERSION: "2.0.1"
steps:
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install --all-extras
- name: Build docs
run: |
poetry run sphinx-build -M html docs/source docs/build
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Upload Docs
run: |
gcloud storage rsync docs/build/html gs://docs-bucket-production/semantic-router --recursive --delete-unmatched-destination-objects
# - name: Upload Docs
# id: upload-directory
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: docs/build/html
# destination: docs-bucket-production/semantic-router
# parent: false
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install --all-extras
- name: Build docs
run: |
poetry run sphinx-build -M html docs/source docs/build
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Upload Docs
run: |
gcloud storage rsync docs/build/html gs://docs-bucket-production/semantic-router --recursive --delete-unmatched-destination-objects
# - name: Upload Docs
# id: upload-directory
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: docs/build/html
# destination: docs-bucket-production/semantic-router
# parent: false
51 changes: 26 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,40 @@ name: lint

on:
push:
branches: [main]
branches: [ main ]
pull_request:


env:
POETRY_VERSION: "1.8.4"
POETRY_VERSION: "2.0.1"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.13"
- "3.13"
steps:
- uses: actions/checkout@v3
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install
- name: Analyzing the code with our lint
run: |
make lint
- uses: actions/checkout@v3
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install
- name: Analyzing the code with our lint
run: |
make lint
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- '*'

jobs:
build:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
python-version: '3.13'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.8.4
curl -sSL https://install.python-poetry.org | python - -y --version 2.0.1
- name: Publish to PyPI
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
Expand Down
89 changes: 45 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,57 @@ name: Test
on:
pull_request:


env:
POETRY_VERSION: "1.8.4"
POETRY_VERSION: "2.0.1"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- 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 }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
fail_ci_if_error: false
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- 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 }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
fail_ci_if_error: false
Loading

0 comments on commit fbf5a64

Please sign in to comment.