Skip to content

Add tests, bump version for 0.4.1 #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading