From 83a5faf9ac32b61321afe5632b9fa0262aff96c6 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Wed, 10 Sep 2025 13:50:31 -0400 Subject: [PATCH 1/3] INTPYTHON-598 - Create an AI/ML helper library --- pymongo-vectorsearch-utils/config.env | 3 +++ pymongo-vectorsearch-utils/run.sh | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pymongo-vectorsearch-utils/config.env create mode 100644 pymongo-vectorsearch-utils/run.sh diff --git a/pymongo-vectorsearch-utils/config.env b/pymongo-vectorsearch-utils/config.env new file mode 100644 index 0000000..a2e9b46 --- /dev/null +++ b/pymongo-vectorsearch-utils/config.env @@ -0,0 +1,3 @@ +REPO_NAME=pymongo-vectorsearch-utils +REPO_ORG=mongodb-labs +DATABASE="pymongo_vectorsearch_utils_test_db" diff --git a/pymongo-vectorsearch-utils/run.sh b/pymongo-vectorsearch-utils/run.sh new file mode 100644 index 0000000..fa69ec7 --- /dev/null +++ b/pymongo-vectorsearch-utils/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -eu + +# Get the MONGODB_URI. +SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})") +ROOT_DIR=$(dirname $SCRIPT_DIR) +. $ROOT_DIR/env.sh + +. $ROOT_DIR/.evergreen/utils.sh + +PYTHON_BINARY=$(find_python3) + +$PYTHON_BINARY -m venv venv_pipeline +source venv_pipeline/bin/activate + +pip install uv rust-just + +just install + +export MONGODB_URI=$MONGODB_URI + +just test From 91357ffbfb8609254c77e0adf1a98e0ffc230724 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Wed, 10 Sep 2025 14:02:17 -0400 Subject: [PATCH 2/3] Add to EVG config --- .evergreen/config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index ef5c005..c78af1a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -317,6 +317,20 @@ tasks: - func: "setup remote atlas" - func: "execute tests" + - name: test-pymongo-vectorsearch-utils-local + tags: [local] + commands: + - func: "fetch repo" + - func: "setup local atlas" + - func: "execute tests" + + - name: test-pymongo-vectorsearch-utils-remote + tags: [remote] + commands: + - func: "fetch repo" + - func: "setup remote atlas" + - func: "execute tests" + buildvariants: - name: test-semantic-kernel-python-rhel display_name: Semantic-Kernel RHEL Python @@ -504,3 +518,14 @@ buildvariants: - name: test-mem0-python-local - name: test-mem0-python-remote batchtime: 10080 # 1 week + + - name: test-pymongo-vectorsearch-utils-python-rhel + display_name: PyMongo-Vectorsearch Utils RHEL + tags: [python] + expansions: + DIR: pymongo-vectorsearch-utils + run_on: + - rhel87-small + tasks: + - name: test-pymongo-vectorsearch-utils-local + - name: test-pymongo-vectorsearch-utils-remote From 687e3ed80e93c33ee05d98cfe08ae23e3bbdc065 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Wed, 10 Sep 2025 14:26:18 -0400 Subject: [PATCH 3/3] Add remote URI --- .evergreen/config.yml | 2 +- .evergreen/setup-remote.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index c78af1a..73c38b4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -520,7 +520,7 @@ buildvariants: batchtime: 10080 # 1 week - name: test-pymongo-vectorsearch-utils-python-rhel - display_name: PyMongo-Vectorsearch Utils RHEL + display_name: PyMongo Vectorsearch Utils RHEL tags: [python] expansions: DIR: pymongo-vectorsearch-utils diff --git a/.evergreen/setup-remote.sh b/.evergreen/setup-remote.sh index e0252e2..6398b84 100644 --- a/.evergreen/setup-remote.sh +++ b/.evergreen/setup-remote.sh @@ -50,6 +50,9 @@ case $DIR in mem0-python) MONGODB_URI=$MEM0_URI ;; + pymongo-vectorsearch-utils) + MONGODB_URI=$PYMONGO_VECTORSEARCH_UTILS_URI + ;; *) echo "Missing config in setup-remote.sh for DIR: $DIR" exit 1