Skip to content

Commit c73067f

Browse files
committed
don't import dotenv
1 parent 334a6d8 commit c73067f

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

semantic-kernel-python/run.sh

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,37 @@ set -x
77
CONN_STRING=$(fetch_local_atlas_uri)
88
PYTHON_BINARY=$(find_python3)
99

10-
1110
# WORKING_DIR = src/semantic-kernel-python/semantic-kernel
1211
cd python
1312

13+
$PYTHON_BINARY -m venv .
14+
source ./bin/activate
1415

1516
# Install Poetry into base python
16-
$PYTHON_BINARY -m pip install -U pip poetry
17+
pip install -U pip poetry
1718
# 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
2120
# Recreate the poetry lock file
22-
$PYTHON_BINARY -m poetry lock --no-update
21+
poetry lock --no-update
2322
# 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
2924

3025
# Workaround to test vector search first
3126
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
3934

4035
# Stored in evergreen VARIABLES
4136
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

Comments
 (0)