From 344dec1ee5dd535df8d96526f3f031fa5ed21f34 Mon Sep 17 00:00:00 2001 From: Iris Ho Date: Tue, 22 Jul 2025 08:49:34 -0700 Subject: [PATCH 1/3] add mem0 to pipeline --- .evergreen/config.yml | 25 +++++++++++++++++++++++++ .evergreen/setup-remote.sh | 3 +++ mem0-python/config.env | 3 +++ mem0-python/run.sh | 24 ++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 mem0-python/config.env create mode 100644 mem0-python/run.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 50bb4e7..e81d2e7 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -275,6 +275,20 @@ tasks: params: file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml + - name: test-mem0-python-local + tags: [ local ] + commands: + - func: "fetch repo" + - func: "setup local atlas" + - func: "execute tests" + + - name: test-mem0-python-remote + tags: [ local ] + commands: + - func: "fetch repo" + - func: "setup remote atlas" + - func: "execute tests" + buildvariants: - name: test-semantic-kernel-python-rhel display_name: Semantic-Kernel RHEL Python @@ -416,3 +430,14 @@ buildvariants: # tasks: # - name: test-langchain-js-local # - name: test-langchain-js-remote + + - name: test-mem0-python-rhel + display_name: mem0 RHEL Python + expansions: + DIR: mem0-python + run_on: + - rhel87-small + tasks: + - name: test-mem0-python-local + - name: test-mem0-python-remote + batchtime: 10080 # 1 week diff --git a/.evergreen/setup-remote.sh b/.evergreen/setup-remote.sh index 4fbf3af..c5c1e1c 100644 --- a/.evergreen/setup-remote.sh +++ b/.evergreen/setup-remote.sh @@ -47,6 +47,9 @@ case $DIR in langchain-js) MONGODB_URI=$LANGCHAIN_MONGODB_URI ;; + mem0-python) + MONGODB_URI=$MEM0_URI + ;; *) echo "Missing config in setup-remote.sh for DIR: $DIR" exit 1 diff --git a/mem0-python/config.env b/mem0-python/config.env new file mode 100644 index 0000000..329979a --- /dev/null +++ b/mem0-python/config.env @@ -0,0 +1,3 @@ +REPO_NAME=mem0 +REPO_ORG=mem0ai +DATABASE=mem0_test_db diff --git a/mem0-python/run.sh b/mem0-python/run.sh new file mode 100644 index 0000000..86e0982 --- /dev/null +++ b/mem0-python/run.sh @@ -0,0 +1,24 @@ +#!/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 hatch +make install_all + +# Run tests. +export MONGODB_URI=$MONGODB_URI +pip install pytest +pip install . +pytest tests/vector_stores/test_mongodb.py \ No newline at end of file From e6147343ff04d01b72b3f7d9edd362ac92220235 Mon Sep 17 00:00:00 2001 From: Iris Ho Date: Tue, 22 Jul 2025 09:08:30 -0700 Subject: [PATCH 2/3] run pre-commit (forgot to install it oops) --- mem0-python/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mem0-python/run.sh b/mem0-python/run.sh index 86e0982..8b0fca7 100644 --- a/mem0-python/run.sh +++ b/mem0-python/run.sh @@ -21,4 +21,4 @@ make install_all export MONGODB_URI=$MONGODB_URI pip install pytest pip install . -pytest tests/vector_stores/test_mongodb.py \ No newline at end of file +pytest tests/vector_stores/test_mongodb.py From 78ef3d5a8aef8eafc86fd75f1fb4a971de39e3aa Mon Sep 17 00:00:00 2001 From: Iris <58442094+sleepyStick@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:40:29 -0700 Subject: [PATCH 3/3] Update .evergreen/config.yml Co-authored-by: Steven Silvester --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e81d2e7..346e6b1 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -283,7 +283,7 @@ tasks: - func: "execute tests" - name: test-mem0-python-remote - tags: [ local ] + tags: [ remote ] commands: - func: "fetch repo" - func: "setup remote atlas"