Skip to content

Commit e7f3bfd

Browse files
authored
chore: bump deps, refactor Py tests to use dict options (#25)
* chore: bump deps * ci: bump pip * ci: remove 3.8 Python * Update README.md
1 parent 06902cd commit e7f3bfd

File tree

7 files changed

+127
-172
lines changed

7 files changed

+127
-172
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- '3.8'
1817
- '3.9'
1918
- '3.10'
2019
- '3.11'
@@ -42,6 +41,8 @@ jobs:
4241
python-version: '${{ matrix.python-version }}'
4342
cache: pip
4443
- name: Install Python test dependencies
45-
run: pip install -r src/test/python/requirements.txt
44+
run: |
45+
pip install --upgrade pip
46+
pip install -r src/test/python/requirements.txt
4647
- name: Run Python tests
4748
run: pytest

.releaserc

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -68,73 +68,6 @@
6868
],
6969
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
7070
}
71-
],
72-
[
73-
"@semantic-release/release-notes-generator",
74-
{
75-
"preset": "conventionalcommits",
76-
"parserOpts": {
77-
"noteKeywords": [
78-
"BREAKING CHANGE",
79-
"BREAKING CHANGES",
80-
"BREAKING"
81-
]
82-
},
83-
"writerOpts": {
84-
"commitsSort": [
85-
"subject",
86-
"scope"
87-
]
88-
},
89-
"presetConfig": {
90-
"types": [
91-
{
92-
"type": "feat",
93-
"section": "🌞 Features"
94-
},
95-
{
96-
"type": "fix",
97-
"section": "🐛 Bug Fixes"
98-
},
99-
{
100-
"type": "perf",
101-
"section": "🚀 Performance Improvements"
102-
},
103-
{
104-
"type": "revert",
105-
"section": "⏩ Reverts"
106-
},
107-
{
108-
"type": "docs",
109-
"section": "📝 Documentation"
110-
},
111-
{
112-
"type": "style",
113-
"section": "🎨 Styles"
114-
},
115-
{
116-
"type": "refactor",
117-
"section": "🧑‍💻 Code Refactoring"
118-
},
119-
{
120-
"type": "test",
121-
"section": "✅ Tests"
122-
},
123-
{
124-
"type": "build",
125-
"section": "🤖 Build System"
126-
},
127-
{
128-
"type": "ci",
129-
"section": "🔁 Continuous Integration"
130-
},
131-
{
132-
"type": "chore",
133-
"section": "🧹 Chores"
134-
}
135-
]
136-
}
137-
}
13871
]
13972
]
14073
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ You can use the connector as a library in Databricks to ingest data into Qdrant.
192192
- Select `Install New` to open the library installation modal.
193193
- Search for `io.qdrant:spark:VERSION` in the Maven packages and click `Install`.
194194

195-
<img width="1064" alt="Screenshot 2024-01-05 at 17 20 01 (1)" src="https://github.com/qdrant/qdrant-spark/assets/46051506/d95773e0-c5c6-4ff2-bf50-8055bb08fd1b">
195+
<img width="704" alt="Screenshot 2024-04-28 at 11 34 17 AM" src="https://github.com/qdrant/qdrant-spark/assets/46051506/0c1bd356-3fba-436a-90ce-d8ff39b02d1f">
196+
196197

197198
## Datatype support
198199

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
<dependency>
4040
<groupId>io.qdrant</groupId>
4141
<artifactId>client</artifactId>
42-
<version>1.8.0</version>
42+
<version>1.9.0</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>com.google.guava</groupId>
4646
<artifactId>guava</artifactId>
47-
<version>32.0.0-jre</version>
47+
<version>33.1.0-jre</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>io.grpc</groupId>
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>org.slf4j</groupId>
5858
<artifactId>slf4j-api</artifactId>
59-
<version>2.0.7</version>
59+
<version>2.0.13</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>org.apache.spark</groupId>
@@ -75,13 +75,13 @@
7575
<dependency>
7676
<groupId>org.testcontainers</groupId>
7777
<artifactId>qdrant</artifactId>
78-
<version>1.19.6</version>
78+
<version>1.19.7</version>
7979
<scope>test</scope>
8080
</dependency>
8181
<dependency>
8282
<groupId>org.testcontainers</groupId>
8383
<artifactId>junit-jupiter</artifactId>
84-
<version>1.19.4</version>
84+
<version>1.19.7</version>
8585
<scope>test</scope>
8686
</dependency>
8787
</dependencies>

src/test/python/conftest.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import pytest
2-
from testcontainers.core.container import DockerContainer # type: ignore
3-
from testcontainers.core.waiting_utils import wait_for_logs # type: ignore
2+
from testcontainers.qdrant import QdrantContainer
43
from qdrant_client import QdrantClient, models
54
import uuid
65
from pyspark.sql import SparkSession
76
from typing import NamedTuple
7+
from uuid import uuid4
88

99

1010
QDRANT_GRPC_PORT = 6334
1111
QDRANT_EMBEDDING_DIM = 6
1212
QDRANT_DISTANCE = models.Distance.COSINE
13+
QDRANT_API_KEY = uuid4().hex
1314

1415

1516
class Qdrant(NamedTuple):
1617
url: str
18+
api_key: str
1719
collection_name: str
1820
client: QdrantClient
1921

2022

21-
qdrant_container = DockerContainer("qdrant/qdrant").with_exposed_ports(QDRANT_GRPC_PORT)
23+
qdrant_container = QdrantContainer(image="qdrant/qdrant:latest", api_key=QDRANT_API_KEY)
2224

2325

2426
# Reference: https://gist.github.com/dizzythinks/f3bb37fd8ab1484bfec79d39ad8a92d3
@@ -36,9 +38,6 @@ def get_pom_version():
3638
@pytest.fixture(scope="module", autouse=True)
3739
def setup_container(request):
3840
qdrant_container.start()
39-
wait_for_logs(
40-
qdrant_container, ".*Actix runtime found; starting in Actix runtime.*", 60
41-
)
4241

4342
def remove_container():
4443
qdrant_container.stop()
@@ -70,6 +69,8 @@ def qdrant():
7069
host=host,
7170
grpc_port=grpc_port,
7271
prefer_grpc=True,
72+
api_key=QDRANT_API_KEY,
73+
https=False,
7374
)
7475

7576
collection_name = str(uuid.uuid4())
@@ -99,6 +100,7 @@ def qdrant():
99100
url=f"http://{host}:{grpc_port}",
100101
client=client,
101102
collection_name=collection_name,
103+
api_key=QDRANT_API_KEY,
102104
)
103105

104106
return client.close()

src/test/python/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pyspark==3.5.1
2-
pytest==8.0.2
3-
qdrant-client==1.7.3
4-
testcontainers==3.7.1
2+
pytest==8.2.0
3+
qdrant-client==1.9.0
4+
testcontainers==4.4.0

0 commit comments

Comments
 (0)