Skip to content

Commit 7855c41

Browse files
authored
Don't register classes that shouldn't be instantiated (#277)
* Don't register classes that shouldn't be instantiated * Lint
1 parent bd52fc6 commit 7855c41

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.3.5-dev3
1+
## 0.3.5-dev4
22

33
### Enhancements
44

@@ -9,6 +9,7 @@
99
* **Remove client.ping() from the Elasticsearch precheck.**
1010
* **Pinecone metadata fixes** - Fix CLI's --metadata-fields default. Always preserve record ID tracking metadata.
1111
* **Add check to prevent querying for more than pinecone limit when deleting records**
12+
* **Unregister Weaviate base classes** - Weaviate base classes shouldn't be registered as they are abstract and cannot be instantiated as a configuration
1213

1314
## 0.3.4
1415

unstructured_ingest/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.5-dev3" # pragma: no cover
1+
__version__ = "0.3.5-dev4" # pragma: no cover

unstructured_ingest/v2/processes/connectors/weaviate/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
from .embedded import weaviate_embedded_destination_entry
1111
from .local import CONNECTOR_TYPE as LOCAL_WEAVIATE_CONNECTOR_TYPE
1212
from .local import weaviate_local_destination_entry
13-
from .weaviate import CONNECTOR_TYPE as WEAVIATE_CONNECTOR_TYPE
14-
from .weaviate import weaviate_destination_entry
1513

1614
add_destination_entry(
1715
destination_type=LOCAL_WEAVIATE_CONNECTOR_TYPE, entry=weaviate_local_destination_entry
@@ -22,4 +20,3 @@
2220
add_destination_entry(
2321
destination_type=EMBEDDED_WEAVIATE_CONNECTOR_TYPE, entry=weaviate_embedded_destination_entry
2422
)
25-
add_destination_entry(destination_type=WEAVIATE_CONNECTOR_TYPE, entry=weaviate_destination_entry)

unstructured_ingest/v2/processes/connectors/weaviate/weaviate.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
UploadStagerConfig,
2323
)
2424
from unstructured_ingest.v2.logger import logger
25-
from unstructured_ingest.v2.processes.connector_registry import DestinationRegistryEntry
2625

2726
if TYPE_CHECKING:
2827
from weaviate.classes.init import Timeout
@@ -288,12 +287,3 @@ def run(self, path: Path, file_data: FileData, **kwargs: Any) -> None:
288287
vector=vector,
289288
)
290289
self.check_for_errors(client=weaviate_client)
291-
292-
293-
weaviate_destination_entry = DestinationRegistryEntry(
294-
connection_config=WeaviateConnectionConfig,
295-
uploader=WeaviateUploader,
296-
uploader_config=WeaviateUploaderConfig,
297-
upload_stager=WeaviateUploadStager,
298-
upload_stager_config=WeaviateUploadStagerConfig,
299-
)

0 commit comments

Comments
 (0)