diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 50bb4e7..346e6b1 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: [ 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 @@ -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..8b0fca7 --- /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