-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Python: .Net Ollama (Merge main) (#7231)"
This reverts commit 2def240.
- Loading branch information
1 parent
2def240
commit 86f8d09
Showing
221 changed files
with
4,039 additions
and
10,996 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
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,55 @@ | ||
# | ||
# This workflow will run all python samples tests. | ||
# | ||
|
||
name: Python Samples Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 1 * * 0" # Run at 1AM UTC daily on Sunday | ||
|
||
jobs: | ||
python-samples-tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 1 | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
service: ['AzureOpenAI'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
- name: Run samples Tests | ||
id: run_tests | ||
shell: bash | ||
env: # Set Azure credentials secret as an input | ||
GLOBAL_LLM_SERVICE: ${{ matrix.service }} | ||
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME }} | ||
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT_NAME }} | ||
AZURE_OPENAI_TEXT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_TEXT_DEPLOYMENT_NAME }} | ||
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }} | ||
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} | ||
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | ||
BING_API_KEY: ${{ secrets.BING_API_KEY }} | ||
OPENAI_CHAT_MODEL_ID: ${{ vars.OPENAI_CHAT_MODEL_ID }} | ||
OPENAI_TEXT_MODEL_ID: ${{ vars.OPENAI_TEXT_MODEL_ID }} | ||
OPENAI_EMBEDDING_MODEL_ID: ${{ vars.OPENAI_EMBEDDING_MODEL_ID }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PINECONE_API_KEY: ${{ secrets.PINECONE__APIKEY }} | ||
POSTGRES_CONNECTION_STRING: ${{secrets.POSTGRES__CONNECTIONSTR}} | ||
AZURE_AI_SEARCH_API_KEY: ${{secrets.AZURE_AI_SEARCH_API_KEY}} | ||
AZURE_AI_SEARCH_ENDPOINT: ${{secrets.AZURE_AI_SEARCH_ENDPOINT}} | ||
MONGODB_ATLAS_CONNECTION_STRING: ${{secrets.MONGODB_ATLAS_CONNECTION_STRING}} | ||
run: | | ||
cd python | ||
poetry run pytest ./tests/samples -v | ||
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 |
---|---|---|
|
@@ -10,57 +10,59 @@ on: | |
types: | ||
- in_progress | ||
|
||
env: | ||
PYTHON_VERSION: "3.10" | ||
RUN_OS: ubuntu-latest | ||
|
||
jobs: | ||
python-tests-coverage: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
name: Create Test Coverage Messages | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
pull-requests: write | ||
contents: read | ||
actions: read | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
os: [ubuntu-latest] | ||
steps: | ||
- name: Wait for unit tests to succeed | ||
continue-on-error: true | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
check-name: 'Python Unit Tests (${{ env.PYTHON_VERSION }}, ${{ env.RUN_OS }}, false)' | ||
check-name: 'Python Unit Tests (${{ matrix.python-version}}, ${{ matrix.os }})' | ||
repo-token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
wait-interval: 90 | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
- uses: actions/checkout@v4 | ||
- name: Setup filename variables | ||
run: echo "FILE_ID=${{ github.event.number }}-${{ env.RUN_OS }}-${{ env.PYTHON_VERSION }}" >> $GITHUB_ENV | ||
- name: Download coverage | ||
continue-on-error: true | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
name: python-coverage-${{ env.FILE_ID }}.txt | ||
name: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt | ||
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
workflow: python-unit-tests.yml | ||
search_artifacts: true | ||
if_no_artifact_found: warn | ||
- name: Download pytest | ||
continue-on-error: true | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
name: pytest-${{ env.FILE_ID }}.xml | ||
name: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml | ||
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
workflow: python-unit-tests.yml | ||
search_artifacts: true | ||
if_no_artifact_found: warn | ||
- name: Pytest coverage comment | ||
continue-on-error: true | ||
id: coverageComment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
github-token: ${{ secrets.GH_ACTIONS_PR_WRITE }} | ||
pytest-coverage-path: python-coverage.txt | ||
pytest-coverage-path: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt | ||
coverage-path-prefix: "python/" | ||
title: "Python ${{ env.PYTHON_VERSION }} Test Coverage Report" | ||
badge-title: "Py${{ env.PYTHON_VERSION }} Test Coverage" | ||
title: "Python ${{ matrix.python-version }} Test Coverage Report" | ||
badge-title: "Py${{ matrix.python-version }} Test Coverage" | ||
report-only-changed-files: true | ||
junitxml-title: "Python ${{ env.PYTHON_VERSION }} Unit Test Overview" | ||
junitxml-path: pytest.xml | ||
junitxml-title: "Python ${{ matrix.python-version }} Unit Test Overview" | ||
junitxml-path: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml | ||
default-branch: "main" | ||
unique-id-for-comment: python-${{ env.PYTHON_VERSION }} | ||
unique-id-for-comment: python-${{ matrix.python-version }} |
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
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.