File tree Expand file tree Collapse file tree 4 files changed +45
-58
lines changed Expand file tree Collapse file tree 4 files changed +45
-58
lines changed Original file line number Diff line number Diff line change 92
92
93
93
tasks :
94
94
- name : test-semantic-kernel-python-local
95
+ tags : [local]
95
96
commands :
96
97
- func : " fetch repo"
97
98
- func : " setup local atlas"
98
99
- func : " execute tests"
99
100
100
101
- name : test-semantic-kernel-python-remote
102
+ tags : [remote]
101
103
commands :
102
104
- func : " fetch repo"
103
105
- func : " setup remote atlas"
104
106
- func : " execute tests"
105
107
106
108
- name : test-semantic-kernel-csharp-local
109
+ tags : [local]
107
110
commands :
108
111
- func : " fetch repo"
109
112
- func : " setup local atlas"
110
113
- func : " execute tests"
111
114
112
115
- name : test-semantic-kernel-csharp-remote
116
+ tags : [remote]
113
117
commands :
114
118
- func : " fetch repo"
115
119
- func : " setup remote atlas"
116
120
- func : " execute tests"
117
121
118
122
- name : test-langchain-python-local
123
+ tags : [local]
119
124
commands :
120
125
- func : " fetch repo"
121
126
- func : " setup local atlas"
122
127
- func : " execute tests"
123
128
124
129
- name : test-langchain-python-remote
130
+ tags : [remote]
125
131
commands :
126
132
- func : " fetch repo"
127
133
- func : " setup remote atlas"
128
134
- func : " execute tests"
129
135
130
136
- name : test-chatgpt-retrieval-plugin-local
137
+ tags : [local]
131
138
commands :
132
139
- func : " fetch repo"
133
140
- func : " setup local atlas"
134
141
- func : " execute tests"
135
142
136
143
- name : test-chatgpt-retrieval-plugin-remote
144
+ tags : [remote]
137
145
commands :
138
146
- func : " fetch repo"
139
147
- func : " setup remote atlas"
140
148
- func : " execute tests"
141
149
142
150
- name : test-llama-index-local
151
+ tags : [local]
143
152
commands :
144
153
- func : " fetch repo"
145
154
- func : " setup local atlas"
@@ -152,12 +161,14 @@ tasks:
152
161
- func : " execute tests"
153
162
154
163
- name : test-docarray-local
164
+ tags : [local]
155
165
commands :
156
166
- func : " fetch repo"
157
167
- func : " setup local atlas"
158
168
- func : " execute tests"
159
169
160
170
- name : test-docarray-remote
171
+ tags : [remote]
161
172
commands :
162
173
- func : " fetch repo"
163
174
- func : " setup remote atlas"
Original file line number Diff line number Diff line change 3
3
4
4
. .evergreen/utils.sh
5
5
6
- PYTHON_BINARY=$( find_python3)
7
-
8
- # Should be called from src
9
- EVERGREEN_PATH=$( pwd) /.evergreen
10
- TARGET_DIR=$( pwd) /$DIR
11
- SCAFFOLD_SCRIPT=$EVERGREEN_PATH /scaffold_atlas.py
12
-
13
- mkdir atlas
14
-
15
- setup_local_atlas
16
-
17
- pushd atlas
18
-
19
- $PYTHON_BINARY -m venv .
20
- source ./bin/activate
21
- popd
22
-
23
- # Test server is up
24
- $PYTHON_BINARY -m pip install pymongo
25
- CONN_STRING=$CONN_STRING \
26
- $PYTHON_BINARY -c " from pymongo import MongoClient; import os; MongoClient(os.environ['CONN_STRING']).db.command('ping')"
27
-
28
- # Add database and index configurations
29
- DATABASE=$DATABASE \
30
- CONN_STRING=$CONN_STRING \
31
- REPO_NAME=$REPO_NAME \
32
- DIR=$DIR \
33
- DEBUG=" ${DEBUG:- 1} " \
34
- TARGET_DIR=$TARGET_DIR \
35
- $PYTHON_BINARY $SCAFFOLD_SCRIPT
6
+ CONN_STRING=$( setup_local_atlas)
7
+ CONN_STRING=$CONN_STRING provision_atlas
36
8
37
9
# Get the secrets.
38
10
source secrets-export.sh
Original file line number Diff line number Diff line change @@ -42,34 +42,7 @@ export MONGODB_URI
42
42
echo " export OPENAI_API_KEY=$OPENAI_API_KEY " >> env.sh
43
43
echo " export MONGODB_URI=$MONGODB_URI " >> env.sh
44
44
45
-
46
45
# Ensure the remote database is populated.
47
46
. .evergreen/utils.sh
48
47
49
- PYTHON_BINARY=$( find_python3)
50
-
51
- # Should be called from src
52
- EVERGREEN_PATH=$( pwd) /.evergreen
53
- TARGET_DIR=$( pwd) /$DIR
54
- SCAFFOLD_SCRIPT=$EVERGREEN_PATH /scaffold_atlas.py
55
-
56
- mkdir atlas
57
-
58
- pushd atlas
59
-
60
- $PYTHON_BINARY -m venv .
61
- source ./bin/activate
62
- popd
63
-
64
- # Test server is up
65
- $PYTHON_BINARY -m pip install pymongo
66
- CONN_STRING=$MONGODB_URI \
67
- $PYTHON_BINARY -c " from pymongo import MongoClient; import os; MongoClient(os.environ['MONGODB_URI']).db.command('ping')"
68
-
69
- # Add database and index configurations
70
- DATABASE=$DATABASE \
71
- CONN_STRING=$MONGODB_URI \
72
- REPO_NAME=$REPO_NAME \
73
- DIR=$DIR \
74
- TARGET_DIR=$TARGET_DIR \
75
- $PYTHON_BINARY $SCAFFOLD_SCRIPT
48
+ CONN_STRING=MONGODB_URI provision_atlas
Original file line number Diff line number Diff line change @@ -115,3 +115,34 @@ fetch_local_atlas_uri() {
115
115
export CONN_STRING=$CONN_STRING
116
116
echo " $CONN_STRING "
117
117
}
118
+
119
+
120
+ scaffold_atlas () {
121
+ PYTHON_BINARY=$( find_python3)
122
+
123
+ # Should be called from src
124
+ EVERGREEN_PATH=$( pwd) /.evergreen
125
+ TARGET_DIR=$( pwd) /$DIR
126
+ SCAFFOLD_SCRIPT=$EVERGREEN_PATH /scaffold_atlas.py
127
+
128
+ mkdir -p atlas
129
+ pushd atlas
130
+
131
+ $PYTHON_BINARY -m venv .
132
+ source ./bin/activate
133
+ popd
134
+
135
+ # Test server is up
136
+ $PYTHON_BINARY -m pip install pymongo
137
+ CONN_STRING=$CONN_STRING \
138
+ $PYTHON_BINARY -c " from pymongo import MongoClient; import os; MongoClient(os.environ['CONN_STRING']).db.command('ping')"
139
+
140
+ # Add database and index configurations
141
+ DATABASE=$DATABASE \
142
+ CONN_STRING=$CONN_STRING \
143
+ REPO_NAME=$REPO_NAME \
144
+ DIR=$DIR \
145
+ DEBUG=" ${DEBUG:- 1} " \
146
+ TARGET_DIR=$TARGET_DIR \
147
+ $PYTHON_BINARY $SCAFFOLD_SCRIPT
148
+ }
You can’t perform that action at this time.
0 commit comments