Skip to content
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

Tiny PR: Fix two typos in Weaviate provider code #40670

Merged
merged 1 commit into from
Jul 9, 2024
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
2 changes: 1 addition & 1 deletion airflow/providers/weaviate/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Breaking changes
* Update ``WeaviateIngestOperator`` and ``WeaviateDocumentIngestOperator`` to use ``WeaviateHook`` with ``weaviate-client`` v4 API. The major changes are changing argument ``class_name`` to ``collection_name`` and removing ``batch_params``.
* Update ``WeaviateHook`` to utilize ``weaviate-client`` v4 API. The implementation has been extensively changed. We recommend reading `Migrate from v3 to v4 <https://weaviate.io/developers/weaviate/client-libraries/python/v3_v4_migration>`_ to understand the changes on the Weaviate side before using the updated ``WeaviateHook``.
* Migrate the following ``WeaviateHook`` public methods to v4 API: ``test_connections``, ``query_with_vector``, ``create_object``, ``get_object``, ``delete_object``, ``update_object``, ``replace_object``, ``object_exists``, ``batch_data``, ``get_or_create_object``, ``create_or_replace_document_objects``
* Rename ``WeaviateHook`` public methods ``update_schema`` as ``update_collection_configuration``, ``create_class`` as ``create_collection``, ``get_schema`` as ``get_collection_configuraiton``, ``delete_classes`` as ``delete_collections`` and ``query_without_vector`` as ``query_with_text``.
* Rename ``WeaviateHook`` public methods ``update_schema`` as ``update_collection_configuration``, ``create_class`` as ``create_collection``, ``get_schema`` as ``get_collection_configuration``, ``delete_classes`` as ``delete_collections`` and ``query_without_vector`` as ``query_with_text``.
* Remove the following ``WeaviateHook`` public methods: ``validate_object``, ``update_schema``, ``create_schema``, ``delete_all_schema``, ``check_subset_of_schema``
* Remove deprecated method ``WeaviateHook.get_client``
* Remove unused argument ``retry_status_codes`` in ``WeaviateHook.__init__``
Expand Down
6 changes: 3 additions & 3 deletions airflow/providers/weaviate/hooks/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_connection_form_widgets(cls) -> dict[str, Any]:
"token": PasswordField(lazy_gettext("Weaviate API Key"), widget=BS3PasswordFieldWidget()),
"grpc_host": StringField(lazy_gettext("gRPC host"), widget=BS3TextFieldWidget()),
"grpc_port": StringField(lazy_gettext("gRPC port"), widget=BS3TextFieldWidget()),
"grcp_secure": BooleanField(
"grpc_secure": BooleanField(
lazy_gettext("Use a secure channel for the underlying gRPC API"), default=False
),
}
Expand All @@ -125,7 +125,7 @@ def get_conn(self) -> WeaviateClient:
conn = self.get_connection(self.conn_id)
extras = conn.extra_dejson
http_secure = extras.pop("http_secure", False)
grpc_secure = extras.pop("grcp_secure", False)
grpc_secure = extras.pop("grpc_secure", False)
return weaviate.connect_to_custom(
http_host=conn.host,
http_port=conn.port or 443 if http_secure else 80,
Expand Down Expand Up @@ -238,7 +238,7 @@ def delete_collections(
| retry_if_exception_type(REQUESTS_EXCEPTIONS_TYPES)
),
)
def get_collection_configuraiton(self, collection_name: str) -> CollectionConfig | CollectionConfigSimple:
def get_collection_configuration(self, collection_name: str) -> CollectionConfig | CollectionConfigSimple:
"""
Get the collection configuration from Weaviate.

Expand Down