Skip to content

Commit f3f890e

Browse files
committed
Merge branch 'main' into update-langchain-test
2 parents 75cc8b8 + 5672f3c commit f3f890e

15 files changed

+173
-0
lines changed

.evergreen/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ tasks:
100100
- func: "fetch repo"
101101
- func: "execute tests"
102102

103+
- name: test-docarray
104+
commands:
105+
- func: "fetch repo"
106+
- func: "execute tests"
107+
103108
buildvariants:
104109
- name: test-semantic-kernel-python-rhel
105110
display_name: Semantic-Kernel RHEL Python
@@ -162,3 +167,16 @@ buildvariants:
162167
- rhel87-small
163168
tasks:
164169
- name: test-llama-index
170+
171+
- name: test-docarray-rhel
172+
display_name: DocArray RHEL
173+
expansions:
174+
DIR: docarray
175+
REPO_NAME: docarray
176+
# TODO - Update CLONE_URL once pull-request is merged
177+
CLONE_URL: -b mongodb-atlas-backend --single-branch https://github.com/caseyclements/docarray.git
178+
DATABASE: docarray_test_db
179+
run_on:
180+
- rhel87-small
181+
tasks:
182+
- name: test-docarray

docarray/database/flatschema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

docarray/database/mydoc__docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

docarray/database/nesteddoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

docarray/database/simpleschema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"mappings": {
3+
"dynamic": false,
4+
"fields": {
5+
"text": [
6+
{
7+
"type": "string"
8+
}
9+
]
10+
}
11+
},
12+
"name": "text_index",
13+
"type": "search",
14+
"database": "docarray_test_db",
15+
"collectionName": "simpleschema"
16+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "embedding1",
6+
"similarity": "cosine",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index_1",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "flatschema"
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 50,
5+
"path": "embedding2",
6+
"similarity": "cosine",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index_2",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "flatschema"
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "simple_tens",
6+
"similarity": "euclidean",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "mydoc__docs"
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "simple_tens",
6+
"similarity": "euclidean",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "mydoc__list_docs__docs"
14+
}
15+
16+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "d__embedding",
6+
"similarity": "cosine",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index_1",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "nesteddoc"
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "embedding",
6+
"similarity": "cosine",
7+
"type": "vector"
8+
}
9+
],
10+
"name": "vector_index",
11+
"type": "vectorSearch",
12+
"database": "docarray_test_db",
13+
"collectionName": "nesteddoc"
14+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"fields": [
3+
{
4+
"numDimensions": 10,
5+
"path": "embedding",
6+
"similarity": "cosine",
7+
"type": "vector"
8+
},
9+
{
10+
"path": "number",
11+
"type": "filter"
12+
},
13+
{
14+
"path": "text",
15+
"type": "filter"
16+
}
17+
],
18+
"name": "vector_index",
19+
"type": "vectorSearch",
20+
"database": "docarray_test_db",
21+
"collectionName": "simpleschema"
22+
}

docarray/run.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
# Sets up a virtual environment (poetry)
4+
# Runs the mongodb tests of the upstream repo
5+
6+
set -x
7+
8+
. $workdir/src/.evergreen/utils.sh
9+
PYTHON_BINARY=$(find_python3)
10+
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
11+
12+
# Create and activate an isolated python venv environment
13+
$PYTHON_BINARY -m venv venv
14+
source venv/bin/activate
15+
# Install Poetry
16+
pip install -U pip poetry
17+
# Recreate the poetry lock file
18+
poetry lock --no-update
19+
# Install from pyproject.toml into package specific environment
20+
poetry install --with dev --extras mongo
21+
22+
23+
# Run tests. Sensitive variables in Evergreen come from Evergeen project: ai-ml-pipeline-testing/
24+
MONGODB_URI=$docarray_mongodb_uri \
25+
MONGODB_DATABASE="docarray_test_db" \
26+
pytest -v tests/index/mongo_atlas

0 commit comments

Comments
 (0)