forked from instructor-ai/instructor
-
Notifications
You must be signed in to change notification settings - Fork 0
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' of https://github.com/parea-ai/instructor
# Conflicts: # instructor/patch.py # tests/test_patch.py
- Loading branch information
Showing
263 changed files
with
10,644 additions
and
3,366 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
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 |
---|---|---|
|
@@ -3,11 +3,11 @@ name: Weekly Tests | |
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday | ||
- cron: "0 0 * * 0" # Runs at 00:00 UTC every Sunday | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
paths-ignore: | ||
- '**' # Ignore all paths to ensure it only triggers on schedule | ||
- "**" # Ignore all paths to ensure it only triggers on schedule | ||
|
||
jobs: | ||
weekly-tests: | ||
|
@@ -20,15 +20,15 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
cache: 'poetry' | ||
cache: "poetry" | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev | ||
run: poetry install --with dev,anthropic | ||
|
||
- name: Run all tests | ||
run: poetry run pytest tests/ | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Pyright | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
WORKING_DIRECTORY: "." | ||
PYRIGHT_OUTPUT_FILENAME: "pyright.log" | ||
|
||
jobs: | ||
Pyright: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
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: Run Static Type Checking with Pyright | ||
run: | | ||
set -e -o pipefail | ||
poetry run pyright > ${{ env.WORKING_DIRECTORY }}/${{ env.PYRIGHT_OUTPUT_FILENAME }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pyright-log | ||
path: ${{ env.WORKING_DIRECTORY }}/${{ env.PYRIGHT_OUTPUT_FILENAME }} |
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 |
---|---|---|
|
@@ -3,19 +3,19 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.11'] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
@@ -33,24 +33,21 @@ jobs: | |
uses: snok/[email protected] | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev | ||
run: poetry install --with dev,anthropic | ||
|
||
- name: Run tests | ||
run: poetry run pytest tests/ -k "not openai" | ||
if: matrix.python-version != '3.11' | ||
run: poetry run pytest tests/ -k "not openai and not anthropic and not evals and not docs" | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
|
||
- name: Generate coverage report | ||
if: matrix.python-version == '3.11' | ||
run: | | ||
poetry run coverage run -m pytest tests/ -k "not openai" | ||
poetry run coverage run -m pytest tests/ -k "not docs" | ||
poetry run coverage report | ||
poetry run coverage html | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
- name: Coveralls GitHub Action | ||
if: matrix.python-version == '3.11' | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
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
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.