-
-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/sambanovacloud_integration
- Loading branch information
Showing
35 changed files
with
5,565 additions
and
6,431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,29 +21,13 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev,anthropic | ||
|
||
- name: Add poetry to PATH | ||
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | ||
|
||
- uses: jakebailey/pyright-action@v2 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
version: 1.1.373 | ||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install ${{ matrix.python-version }} | ||
- name: Install the project | ||
run: uv sync --all-extras | ||
- name: Run pyright | ||
run: uv run pyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,21 +21,17 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | ||
|
||
- name: Get release version | ||
run: echo "RELEASE_VERSION=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV | ||
|
||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install 3.10 | ||
- name: Install the project | ||
run: uv sync --all-extras | ||
- name: Build the project | ||
run: uv build | ||
- name: Build and publish Python package | ||
run: poetry publish --build | ||
run: uv publish | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,40 +15,34 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache Poetry virtualenv | ||
uses: actions/cache@v2 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev,anthropic | ||
|
||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install ${{ matrix.python-version }} | ||
- name: Install the project | ||
run: uv sync --all-extras | ||
- name: Run tests | ||
if: matrix.python-version != '3.11' | ||
run: poetry run pytest tests/ -k 'not llm and not openai and not gemini and not anthropic and not cohere and not vertexai' && poetry run pytest tests/llm/test_cohere | ||
run: uv run pytest tests/ -k 'not llm and not openai and not gemini and not anthropic and not cohere and not vertexai' | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
|
||
- name: Run Gemini Tests | ||
if: matrix.python-version == '3.11' | ||
run: uv run pytest tests/llm/test_gemini | ||
env: | ||
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | ||
|
||
- name: Generate coverage report | ||
if: matrix.python-version == '3.11' | ||
run: | | ||
poetry run coverage run -m pytest tests/ -k "not docs and not anthropic and not gemini and not cohere and not vertexai and not fireworks" | ||
poetry run coverage report | ||
poetry run coverage html | ||
uv run coverage run -m pytest tests/ -k "not docs and not anthropic and not gemini and not cohere and not vertexai and not fireworks" | ||
uv run coverage report | ||
uv run coverage html | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.