From 57538776dfc9ab2d96d52ce886882dd7629108d6 Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Mon, 24 Jun 2024 12:22:01 -0400 Subject: [PATCH 1/3] PYTHON-4506 Add Autogen pointing to pull-request --- .evergreen/config.yml | 19 ++++++++++++++- .../database/autogen_test_vectorstore.json | 1 + autogen/run.sh | 23 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 autogen/database/autogen_test_vectorstore.json create mode 100644 autogen/run.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 07ac1e8..8146e23 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -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 @@ -180,4 +185,16 @@ buildvariants: run_on: - rhel87-small tasks: - - name: test-docarray \ No newline at end of file + - 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 \ No newline at end of file diff --git a/autogen/database/autogen_test_vectorstore.json b/autogen/database/autogen_test_vectorstore.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/autogen/database/autogen_test_vectorstore.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/autogen/run.sh b/autogen/run.sh new file mode 100644 index 0000000..fbbb596 --- /dev/null +++ b/autogen/run.sh @@ -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" \ +pytest -v test/agentchat/contrib/vectordb/test_mongodb.py \ No newline at end of file From e646f175cf7f5206a449836bad47283eb1b4a55f Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Mon, 24 Jun 2024 13:34:28 -0400 Subject: [PATCH 2/3] typo in run.sh --- autogen/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/run.sh b/autogen/run.sh index fbbb596..f3625be 100644 --- a/autogen/run.sh +++ b/autogen/run.sh @@ -20,4 +20,4 @@ $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" \ -pytest -v test/agentchat/contrib/vectordb/test_mongodb.py \ No newline at end of file +py.test -v test/agentchat/contrib/vectordb/test_mongodb.py \ No newline at end of file From 093a853829644d5b1b8f1aac59d7adcad8bb209f Mon Sep 17 00:00:00 2001 From: Casey Clements Date: Mon, 24 Jun 2024 14:25:08 -0400 Subject: [PATCH 3/3] PYTHON-4506 Had to invoke pytest as a module for some reason. --- autogen/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/run.sh b/autogen/run.sh index f3625be..a157f39 100644 --- a/autogen/run.sh +++ b/autogen/run.sh @@ -20,4 +20,4 @@ $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" \ -py.test -v test/agentchat/contrib/vectordb/test_mongodb.py \ No newline at end of file +$PYTHON_BINARY -m pytest -v test/agentchat/contrib/vectordb/test_mongodb.py