Skip to content

Commit 9fa0c27

Browse files
committed
lint
1 parent b0a8435 commit 9fa0c27

File tree

7 files changed

+39
-35
lines changed

7 files changed

+39
-35
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,4 +567,4 @@ buildvariants:
567567
run_on:
568568
- ubuntu2204-small
569569
tasks:
570-
- name: test-self-community
570+
- name: test-self-community

.evergreen/lint_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
CURRENT_DIR = Path(__file__).parent.resolve()
1818
CONFIG_YML = CURRENT_DIR / "config.yml"
19-
VALID_LANGUAGES = {"python", "golang", "javascript", "csharp"}
19+
VALID_LANGUAGES = {"python", "golang", "javascript", "csharp", "self"}
2020

2121

2222
def load_yaml_file(file_path: str) -> Dict[Any, Any]:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
DATABASE=test
2-
REPO_NAME=.
2+
REPO_NAME=.

.evergreen/mongodb-community-search/mongot.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ logging:
2323
embedding:
2424
queryKeyFile: /etc/voyage-api-query-key
2525
indexingKeyFile: /etc/voyage-api-indexing-key
26-
providerEndpoint: https://api.voyageai.com/v1/embeddings
26+
providerEndpoint: https://api.voyageai.com/v1/embeddings

.evergreen/mongodb-community-search/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -eu
33

44
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
5-
ROOT_DIR=$(dirname $(dirname $SCRIPT_DIR))
5+
ROOT_DIR=$(dirname "$(dirname $SCRIPT_DIR)")
66

77
. $ROOT_DIR/env.sh
88
. $ROOT_DIR/.evergreen/utils.sh
@@ -18,4 +18,4 @@ source .venv/bin/activate
1818
pip install pymongo
1919

2020
python self_test.py
21-
popd
21+
popd

.evergreen/mongodb-community-search/self_test.py

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,42 @@
4040
)
4141

4242
# Create auto-embed index (private preview-style syntax)
43-
movies.create_search_index(model=SearchIndexModel(
44-
name="auto_embed_plot_index",
45-
type="vectorSearch",
46-
definition={
47-
"fields": [
48-
{
49-
"type": "text",
50-
"path": "plot",
51-
"model": "voyage-3-large",
52-
},
53-
],
54-
})
43+
movies.create_search_index(
44+
model=SearchIndexModel(
45+
name="auto_embed_plot_index",
46+
type="vectorSearch",
47+
definition={
48+
"fields": [
49+
{
50+
"type": "text",
51+
"path": "plot",
52+
"model": "voyage-3-large",
53+
},
54+
],
55+
},
56+
)
5557
)
5658

5759
# Create normal vector index
58-
movies.create_search_index(model=SearchIndexModel(
59-
name="plot_vector_index",
60-
type="vectorSearch",
61-
definition={
62-
"fields": [
63-
{
64-
"type": "vector",
65-
"path": "plot_embeddings",
66-
"numDimensions": 1024,
67-
"similarity": "cosine",
68-
"quantization": "none",
69-
},
70-
],
71-
})
60+
movies.create_search_index(
61+
model=SearchIndexModel(
62+
name="plot_vector_index",
63+
type="vectorSearch",
64+
definition={
65+
"fields": [
66+
{
67+
"type": "vector",
68+
"path": "plot_embeddings",
69+
"numDimensions": 1024,
70+
"similarity": "cosine",
71+
"quantization": "none",
72+
},
73+
],
74+
},
75+
)
7276
)
7377

7478

75-
7679
# Run vector search aggregation using auto-embed index
7780
cursor = movies.aggregate(
7881
[
@@ -90,4 +93,4 @@
9093

9194
for doc in cursor:
9295
print(doc)
93-
assert doc['title'] == "Breathe"
96+
assert doc["title"] == "Breathe"

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ repos:
5353
rev: "v2.2.6"
5454
hooks:
5555
- id: codespell
56+
args: ["-L", "damon"]
5657

5758
- repo: local
5859
hooks:
@@ -61,4 +62,4 @@ repos:
6162
entry: python3 .evergreen/lint_config.py
6263
language: system
6364
files: .evergreen/config.yml
64-
args: ['--languages=python,golang,javascript,csharp']
65+
args: ['--languages=python,golang,javascript,csharp,self']

0 commit comments

Comments
 (0)