|
7 | 7 | CONN_STRING=$(fetch_local_atlas_uri)
|
8 | 8 | PYTHON_BINARY=$(find_python3)
|
9 | 9 |
|
10 |
| - |
11 | 10 | # WORKING_DIR = src/semantic-kernel-python/semantic-kernel
|
12 | 11 | cd python
|
13 | 12 |
|
| 13 | +$PYTHON_BINARY -m venv . |
| 14 | +source ./bin/activate |
14 | 15 |
|
15 | 16 | # Install Poetry into base python
|
16 |
| -$PYTHON_BINARY -m pip install -U pip poetry |
| 17 | +pip install -U pip poetry |
17 | 18 | # Create a package specific poetry environment
|
18 |
| -$PYTHON_BINARY -m poetry env use $PYTHON_BINARY |
19 |
| -# Activate the poetry env, which itself does not include poetry |
20 |
| -source $($PYTHON_BINARY -m poetry env info --path)/bin/activate |
| 19 | +poetry env use $PYTHON_BINARY |
21 | 20 | # Recreate the poetry lock file
|
22 |
| -$PYTHON_BINARY -m poetry lock --no-update |
| 21 | +poetry lock --no-update |
23 | 22 | # Install from pyproject.toml into package specific environment
|
24 |
| -$PYTHON_BINARY -m poetry install ".[mongodb]" --with dev |
25 |
| - |
26 |
| -# Create .env file |
27 |
| -python -c "from dotenv import set_key; set_key('.env', 'OPENAI_API_KEY', '$openai_api_key')" |
28 |
| -python -c "from dotenv import set_key; set_key('.env', 'MONGODB_ATLAS_CONNECTION_STRING', '$CONN_STRING')" |
| 23 | +poetry install ".[mongodb]" --with dev |
29 | 24 |
|
30 | 25 | # Workaround to test vector search first
|
31 | 26 | OPENAI_API_KEY=$openai_api_key \
|
32 |
| -OPENAI_ORG_ID="" \ |
33 |
| -AZURE_OPENAI_DEPLOYMENT_NAME="" \ |
34 |
| -AZURE_OPENAI_ENDPOINT="" \ |
35 |
| -AZURE_OPENAI_API_KEY="" \ |
36 |
| -MONGODB_ATLAS_CONNECTION_STRING=$CONN_STRING \ |
37 |
| -Python_Integration_Tests=1 \ |
38 |
| -$PYTHON_BINARY -m poetry run pytest tests/integration/connectors/memory/test_mongodb_atlas.py -k test_collection_knn |
| 27 | + OPENAI_ORG_ID="" \ |
| 28 | + AZURE_OPENAI_DEPLOYMENT_NAME="" \ |
| 29 | + AZURE_OPENAI_ENDPOINT="" \ |
| 30 | + AZURE_OPENAI_API_KEY="" \ |
| 31 | + MONGODB_ATLAS_CONNECTION_STRING=$CONN_STRING \ |
| 32 | + Python_Integration_Tests=1 \ |
| 33 | + $PYTHON_BINARY -m poetry run pytest tests/integration/connectors/memory/test_mongodb_atlas.py -k test_collection_knn |
39 | 34 |
|
40 | 35 | # Stored in evergreen VARIABLES
|
41 | 36 | OPENAI_API_KEY=$openai_api_key \
|
42 |
| -OPENAI_ORG_ID="" \ |
43 |
| -AZURE_OPENAI_DEPLOYMENT_NAME="" \ |
44 |
| -AZURE_OPENAI_ENDPOINT="" \ |
45 |
| -AZURE_OPENAI_API_KEY="" \ |
46 |
| -MONGODB_ATLAS_CONNECTION_STRING=$CONN_STRING \ |
47 |
| -Python_Integration_Tests=1 \ |
48 |
| -$PYTHON_BINARY -m poetry run pytest tests/integration/connectors/memory/test_mongodb_atlas.py |
| 37 | + OPENAI_ORG_ID="" \ |
| 38 | + AZURE_OPENAI_DEPLOYMENT_NAME="" \ |
| 39 | + AZURE_OPENAI_ENDPOINT="" \ |
| 40 | + AZURE_OPENAI_API_KEY="" \ |
| 41 | + MONGODB_ATLAS_CONNECTION_STRING=$CONN_STRING \ |
| 42 | + Python_Integration_Tests=1 \ |
| 43 | + $PYTHON_BINARY -m poetry run pytest tests/integration/connectors/memory/test_mongodb_atlas.py |
0 commit comments