Skip to content

Commit 121bab5

Browse files
committed
fix shellcheck lint issues
1 parent e3c4709 commit 121bab5

File tree

10 files changed

+30
-8
lines changed

10 files changed

+30
-8
lines changed

.evergreen/provision-atlas.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ PYTHON_BINARY=$(find_python3)
77
# Should be called from src
88
EVERGREEN_PATH=$(pwd)/.evergreen
99
TARGET_DIR=$(pwd)/$DIR
10-
PING_ATLAS=$EVERGREEN_PATH/ping_atlas.py
1110
SCAFFOLD_SCRIPT=$EVERGREEN_PATH/scaffold_atlas.py
12-
DEPLOYMENT_NAME=$DIR
1311

1412
set -ex
1513
mkdir atlas

.evergreen/utils.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ setup_local_atlas() {
9292
wait "$CONTAINER_ID"
9393
EXPOSED_PORT=$(podman inspect --format='{{ (index (index .NetworkSettings.Ports "27017/tcp") 0).HostPort }}' "$CONTAINER_ID")
9494
export CONN_STRING="mongodb://127.0.0.1:$EXPOSED_PORT/?directConnection=true"
95+
# shellcheck disable=SC2154
9596
echo "CONN_STRING=mongodb://127.0.0.1:$EXPOSED_PORT/?directConnection=true" > $workdir/src/.evergreen/.local_atlas_uri
9697
}
9798

9899
fetch_local_atlas_uri() {
100+
# shellcheck disable=SC2154
99101
. $workdir/src/.evergreen/.local_atlas_uri
100102

101103
export CONN_STRING=$CONN_STRING

autogen/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66

77
set -x
88

9+
# shellcheck disable=SC2154
910
. $workdir/src/.evergreen/utils.sh
1011
PYTHON_BINARY=$(find_python3)
1112
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
1213

1314
# Create and activate an isolated python venv environment
1415
$PYTHON_BINARY -m venv venv
15-
source venv/bin/activate
16+
. venv/bin/activate
1617
# Install autogen with extras
1718
$PYTHON_BINARY -m pip install .[test,"retrievechat-mongodb"]
1819

1920

2021
# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
22+
# shellcheck disable=SC2154
2123
MONGODB_URI=$autogen_mongodb_uri \
2224
MONGODB_DATABASE="autogen_test_db" \
2325
$PYTHON_BINARY -m pytest -v test/agentchat/contrib/vectordb/test_mongodb.py

chatgpt-retrieval-plugin/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
set -x
66

7+
# shellcheck disable=SC2154
78
. $workdir/src/.evergreen/utils.sh
89

910
PYTHON_BINARY=$(find_python3)
@@ -14,13 +15,14 @@ $PYTHON_BINARY -m pip install -U pip poetry
1415
# Create a package specific poetry environment
1516
$PYTHON_BINARY -m poetry env use $PYTHON_BINARY
1617
# Activate the poetry env, which itself does not include poetry
17-
source $($PYTHON_BINARY -m poetry env info --path)/bin/activate
18+
. "$($PYTHON_BINARY -m poetry env info --path)/bin/activate"
1819
# Recreate the poetry lock file
1920
$PYTHON_BINARY -m poetry lock --no-update
2021
# Install from pyproject.toml into package specific environment
2122
$PYTHON_BINARY -m poetry install --with dev
2223

2324
# Run tests. Sensitive variables in Evergreen come from Evergeen project: ai-ml-pipeline-testing/
25+
# shellcheck disable=SC2154
2426
OPENAI_API_KEY=$openai_api_key \
2527
DATASTORE="mongodb-atlas" \
2628
BEARER_TOKEN="staylowandkeepmoving" \

docarray/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66
set -x
77

8+
# shellcheck disable=SC2154
89
. $workdir/src/.evergreen/utils.sh
910
PYTHON_BINARY=$(find_python3)
1011
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
1112

1213
# Create and activate an isolated python venv environment
1314
$PYTHON_BINARY -m venv venv
14-
source venv/bin/activate
15+
. venv/bin/activate
1516
# Install Poetry
1617
pip install -U pip poetry
1718
# Recreate the poetry lock file
@@ -21,6 +22,7 @@ poetry install --with dev --extras mongo
2122

2223

2324
# Run tests. Sensitive variables in Evergreen come from Evergeen project: ai-ml-pipeline-testing/
25+
# shellcheck disable=SC2154
2426
MONGODB_URI=$docarray_mongodb_uri \
2527
MONGODB_DATABASE="docarray_test_db" \
2628
pytest -v tests/index/mongo_atlas

langchain-python/run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
# WORKING_DIR = src/langchain-python/langchain
44
set -x
55

6+
# shellcheck disable=SC2154
67
. $workdir/src/.evergreen/utils.sh
78

89
PYTHON_BINARY=$(find_python3)
910

11+
# shellcheck disable=SC2164
1012
cd libs/partners/mongodb
1113

1214
$PYTHON_BINARY -m venv venv_pipeline
@@ -18,7 +20,10 @@ poetry lock --no-update
1820

1921
poetry install --with test --with test_integration
2022

21-
export MONGODB_ATLAS_URI=$(fetch_local_atlas_uri)
23+
MONGODB_ATLAS_URI=$(fetch_local_atlas_uri)
24+
25+
export MONGODB_ATLAS_URI
26+
# shellcheck disable=SC2154
2227
export OPENAI_API_KEY=$openai_api_key
2328

2429
make test

llama-index-python-kvstore/run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22

33
set -x
44

5+
# shellcheck disable=SC2154
56
. $workdir/src/.evergreen/utils.sh
67

78
CONN_STRING=$(fetch_local_atlas_uri)
89
PYTHON_BINARY=$(find_python3)
910
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
1011

1112
# cd to the MongoDB integration. It has its own project
13+
# shellcheck disable=SC2164
1214
cd llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-mongodb
1315

1416
# Install Poetry into base python
1517
$PYTHON_BINARY -m pip install -U pip poetry
1618
# Create a package specific poetry environment
1719
$PYTHON_BINARY -m poetry env use $PYTHON_BINARY
1820
# Activate the poetry env, which itself does not include poetry
19-
source $($PYTHON_BINARY -m poetry env info --path)/bin/activate
21+
. "$($PYTHON_BINARY -m poetry env info --path)/bin/activate"
2022
# PYTHON-4522: Will fix requirement in llama-index repo
2123
$PYTHON_BINARY -m poetry add motor
2224
# Recreate the poetry lock file
@@ -25,6 +27,7 @@ $PYTHON_BINARY -m poetry lock --no-update
2527
$PYTHON_BINARY -m poetry install --with dev
2628

2729
# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
30+
# shellcheck disable=SC2154
2831
OPENAI_API_KEY=$openai_api_key \
2932
MONGODB_URI=$CONN_STRING \
3033
MONGODB_DATABASE="llama_index_test_db" \

llama-index-python-vectorstore/run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,29 @@
22

33
set -x
44

5+
# shellcheck disable=SC2154
56
. $workdir/src/.evergreen/utils.sh
67

78
PYTHON_BINARY=$(find_python3)
89
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"
910

1011
# cd to the MongoDB integration. It has its own project
12+
# shellcheck disable=SC2164
1113
cd llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb
1214

1315
# Install Poetry into base python
1416
$PYTHON_BINARY -m pip install -U pip poetry
1517
# Create a package specific poetry environment
1618
$PYTHON_BINARY -m poetry env use $PYTHON_BINARY
1719
# Activate the poetry env, which itself does not include poetry
18-
source $($PYTHON_BINARY -m poetry env info --path)/bin/activate
20+
. "$($PYTHON_BINARY -m poetry env info --path)/bin/activate"
1921
# Recreate the poetry lock file
2022
$PYTHON_BINARY -m poetry lock --no-update
2123
# Install from pyproject.toml into package specific environment
2224
$PYTHON_BINARY -m poetry install --with dev
2325

2426
# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
27+
# shellcheck disable=SC2154
2528
MONGODB_URI=$(fetch_local_atlas_uri) \
2629
OPENAI_API_KEY=$openai_api_key \
2730
MONGODB_DATABASE="llama_index_test_db" \

semantic-kernel-csharp/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set -x
44

5+
# shellcheck disable=SC2154
56
. $workdir/src/.evergreen/utils.sh
67
# WORKING_DIR = src/semantic-kernel-csharp/semantic-kernel
78

semantic-kernel-python/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
set -x
44

5+
# shellcheck disable=SC2154
56
. $workdir/src/.evergreen/utils.sh
67

78
CONN_STRING=$(fetch_local_atlas_uri)
89
PYTHON_BINARY=$(find_python3)
910

1011
# WORKING_DIR = src/semantic-kernel-python/semantic-kernel
12+
# shellcheck disable=SC2164
1113
cd python
1214

1315
# Temporary solution until https://github.com/microsoft/semantic-kernel/issues/9067 resolves
@@ -19,6 +21,7 @@ make install-python
1921
make install-sk
2022
make install-pre-commit
2123

24+
# shellcheck disable=SC2154
2225
OPENAI_API_KEY=$openai_api_key \
2326
OPENAI_ORG_ID="" \
2427
AZURE_OPENAI_DEPLOYMENT_NAME="" \
@@ -28,6 +31,7 @@ OPENAI_API_KEY=$openai_api_key \
2831
Python_Integration_Tests=1 \
2932
uv run pytest tests/integration/connectors/memory/test_mongodb_atlas.py -k test_collection_knn
3033

34+
# shellcheck disable=SC2154
3135
OPENAI_API_KEY=$openai_api_key \
3236
OPENAI_ORG_ID="" \
3337
AZURE_OPENAI_DEPLOYMENT_NAME="" \

0 commit comments

Comments
 (0)