Skip to content

Commit b8eb5b8

Browse files
authored
Merge pull request #41 from Jibola/run-lint
Make lint fixes provided by pre-commit
2 parents ed1c6a2 + 121bab5 commit b8eb5b8

File tree

15 files changed

+39
-20
lines changed

15 files changed

+39
-20
lines changed

.evergreen/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ buildvariants:
187187
- rhel87-small
188188
tasks:
189189
- name: test-llama-index
190-
190+
191191
- name: test-docarray-rhel
192192
display_name: DocArray RHEL
193193
expansions:
@@ -210,4 +210,4 @@ buildvariants:
210210
run_on:
211211
- rhel87-small
212212
tasks:
213-
- name: test-autogen
213+
- name: test-autogen

.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/scaffold_atlas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def upload_data(db: Database, filename: Path) -> None:
3636
loaded_collection = json.load(f)
3737

3838
logger.info(
39-
"Loading %s to Atlas database %s in colleciton %s",
39+
"Loading %s to Atlas database %s in collection %s",
4040
filename.name,
4141
db.name,
4242
collection_name,

.evergreen/utils.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ setup_local_atlas() {
8080
*)
8181
echo "Unrecognized state $STATE"
8282
sleep 1
83-
esac
83+
esac
8484
done
8585

8686
echo "container did not get healthy within 120 seconds, quitting"
@@ -92,14 +92,14 @@ 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
102104
echo "$CONN_STRING"
103105
}
104-
105-

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
python -m pip install -U pip pre-commit
2727
- name: Run linters
2828
run: |
29-
pre-commit run --hook-stage=manual --all-files
29+
pre-commit run --hook-stage=manual --all-files

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ xunit-results/
4949

5050
# Miscellaneous
5151
.DS_Store
52-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Within each subdirectory you should expect to have:
3030
The general layout of this repo looks like this:
3131

3232
```bash
33-
├── LICENSE # License Agreeement
33+
├── LICENSE # License Agreement
3434
├── README.md # This Document
3535
├── langchain-python # Folder scoped for one Integration
3636
│ └── run.sh # Script that executes test

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: 4 additions & 2 deletions
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" \
26-
pytest -v tests/index/mongo_atlas
28+
pytest -v tests/index/mongo_atlas

0 commit comments

Comments
 (0)