Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
test: improve testing
Signed-off-by: jupyterjazz <saba.sturua@jina.ai>
  • Loading branch information
jupyterjazz committed Jul 18, 2023
commit 00147c69702475140a81951beb3755ac96658d13
1 change: 1 addition & 0 deletions docarray/index/backends/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ class DBConfig(BaseDocIndex.DBConfig):
def __post_init__(self):
# To prevent errors, it is important to capitalize the provided index name
# when working with Weaviate, as it stores index names in a capitalized format.
# Can't use .capitalize() because it modifies the whole string (See test).
self.index_name = (
self.index_name[0].upper() + self.index_name[1:]
if self.index_name
Expand Down
6 changes: 3 additions & 3 deletions tests/index/weaviate/test_column_config_weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class StringDoc(BaseDoc):
index = WeaviateDocumentIndex[StringDoc]()
assert index.index_name == StringDoc.__name__

index = WeaviateDocumentIndex[StringDoc](index_name='Index_name')
assert index.index_name == 'Index_name'
index = WeaviateDocumentIndex[StringDoc](index_name='BaseDoc')
assert index.index_name == 'BaseDoc'

index = WeaviateDocumentIndex[StringDoc](index_name='Index_name')
index = WeaviateDocumentIndex[StringDoc](index_name='index_name')
assert index.index_name == 'Index_name'