Skip to content

Commit 52db18d

Browse files
PYTHON-4506 Add autogen (#28)
* PYTHON-4506 Add Autogen pointing to pull-request * typo in run.sh * PYTHON-4506 Had to invoke pytest as a module for some reason.
1 parent 5dd1329 commit 52db18d

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

.evergreen/config.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ tasks:
108108
- func: "fetch repo"
109109
- func: "execute tests"
110110

111+
- name: test-autogen
112+
commands:
113+
- func: "fetch repo"
114+
- func: "execute tests"
115+
111116
buildvariants:
112117
- name: test-semantic-kernel-python-rhel
113118
display_name: Semantic-Kernel RHEL Python
@@ -180,4 +185,16 @@ buildvariants:
180185
run_on:
181186
- rhel87-small
182187
tasks:
183-
- name: test-docarray
188+
- name: test-docarray
189+
190+
- name: test-autogen-rhel
191+
display_name: Autogen RHEL
192+
expansions:
193+
DIR: autogen
194+
REPO_NAME: autogen # TODO [PYTHON-4506] Switch to https://github.com/microsoft/autogen.git one merged
195+
CLONE_URL: https://github.com/ranfysvalle02/autogen.git
196+
DATABASE: autogen_test_db
197+
run_on:
198+
- rhel87-small
199+
tasks:
200+
- name: test-autogen
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

autogen/run.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
# Sets up a virtual environment
4+
# Runs the mongodb tests of the upstream repo
5+
# NOTE: In this instance, the tests *programmtically* create_vector_search_index
6+
7+
set -x
8+
9+
. $workdir/src/.evergreen/utils.sh
10+
PYTHON_BINARY=$(find_python3)
11+
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
12+
13+
# Create and activate an isolated python venv environment
14+
$PYTHON_BINARY -m venv venv
15+
source venv/bin/activate
16+
# Install autogen with extras
17+
$PYTHON_BINARY -m pip install .[test,"retrievechat-mongodb"]
18+
19+
20+
# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
21+
MONGODB_URI=$autogen_mongodb_uri \
22+
MONGODB_DATABASE="autogen_test_db" \
23+
$PYTHON_BINARY -m pytest -v test/agentchat/contrib/vectordb/test_mongodb.py

0 commit comments

Comments
 (0)