Skip to content

Commit

Permalink
Add tests, bump version for 0.4.1 (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrookins authored Feb 21, 2025
1 parent 8c97668 commit ad9bb21
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<div align="center" style="margin-bottom: 20px;">
<div><img src="https://raw.githubusercontent.com/redis/redis-vl-python/main/docs/_static/Redis_Logo_Red_RGB.svg" style="max-width: 200px; margin-bottom: 20px;"></div>
<div align="center" dir="auto">
<img width="300" src="https://raw.githubusercontent.com/redis/redis-vl-python/main/docs/_static/Redis_Logo_Red_RGB.svg" style="max-width: 100%" alt="Redis">
<h1>🔥 Vector Library</h1>
</div>


<div align="center" style="margin-top: 20px;">
<span style="display: block; margin-bottom: 10px;">The *AI-native* Redis Python client</span>
<br />
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "redisvl"
version = "0.4.0"
version = "0.4.1"
description = "Python client library and CLI for using Redis as a vector database"
authors = ["Redis Inc. <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion redisvl/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.4.1"
14 changes: 14 additions & 0 deletions tests/integration/test_async_search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ async def test_search_index_from_existing(async_client, async_index):
assert async_index2.schema == async_index.schema


@pytest.mark.asyncio
async def test_search_index_from_existing_url(async_index, redis_url):
await async_index.create(overwrite=True)

try:
async_index2 = await AsyncSearchIndex.from_existing(
async_index.name, redis_url=redis_url
)
except Exception as e:
pytest.skip(str(e))

assert async_index2.schema == async_index.schema


@pytest.mark.asyncio
async def test_search_index_from_existing_complex(async_client):
schema = {
Expand Down
9 changes: 8 additions & 1 deletion tests/integration/test_search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_search_index_from_dict(index_from_dict):
assert index_from_dict.key("foo").startswith(index_from_dict.prefix)


def test_search_index_from_existing(client, index):
def test_search_index_from_existing(index, client):
index.create(overwrite=True)

try:
Expand Down Expand Up @@ -176,6 +176,13 @@ def test_search_index_set_client(async_client, redis_url, index_schema):
assert index.client is None


def test_search_index_connect(index, redis_url):
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
index.connect(redis_url=redis_url)
assert index.client


def test_search_index_create(index):
index.create(overwrite=True, drop=True)
assert index.exists()
Expand Down

0 comments on commit ad9bb21

Please sign in to comment.