Skip to content

PYTHON-4506 Add autogen #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ tasks:
- func: "fetch repo"
- func: "execute tests"

- name: test-autogen
commands:
- func: "fetch repo"
- func: "execute tests"

buildvariants:
- name: test-semantic-kernel-python-rhel
display_name: Semantic-Kernel RHEL Python
Expand Down Expand Up @@ -180,4 +185,16 @@ buildvariants:
run_on:
- rhel87-small
tasks:
- name: test-docarray
- name: test-docarray

- name: test-autogen-rhel
display_name: Autogen RHEL
expansions:
DIR: autogen
REPO_NAME: autogen # TODO [PYTHON-4506] Switch to https://github.com/microsoft/autogen.git one merged
CLONE_URL: https://github.com/ranfysvalle02/autogen.git
DATABASE: autogen_test_db
run_on:
- rhel87-small
tasks:
- name: test-autogen
1 change: 1 addition & 0 deletions autogen/database/autogen_test_vectorstore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
23 changes: 23 additions & 0 deletions autogen/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

# Sets up a virtual environment
# Runs the mongodb tests of the upstream repo
# NOTE: In this instance, the tests *programmtically* create_vector_search_index

set -x

. $workdir/src/.evergreen/utils.sh
PYTHON_BINARY=$(find_python3)
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"

# Create and activate an isolated python venv environment
$PYTHON_BINARY -m venv venv
source venv/bin/activate
# Install autogen with extras
$PYTHON_BINARY -m pip install .[test,"retrievechat-mongodb"]


# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
MONGODB_URI=$autogen_mongodb_uri \
MONGODB_DATABASE="autogen_test_db" \
$PYTHON_BINARY -m pytest -v test/agentchat/contrib/vectordb/test_mongodb.py