This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 728ee2ea08 fix two typos (#40670)
728ee2ea08 is described below
commit 728ee2ea08c33d0c65d123dcf3d49e62434e73c7
Author: Tamara Janina Fingerlin <[email protected]>
AuthorDate: Tue Jul 9 15:23:10 2024 +0200
fix two typos (#40670)
---
airflow/providers/weaviate/CHANGELOG.rst | 2 +-
airflow/providers/weaviate/hooks/weaviate.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/airflow/providers/weaviate/CHANGELOG.rst
b/airflow/providers/weaviate/CHANGELOG.rst
index 404bbf534c..8e0220ed3e 100644
--- a/airflow/providers/weaviate/CHANGELOG.rst
+++ b/airflow/providers/weaviate/CHANGELOG.rst
@@ -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__``
diff --git a/airflow/providers/weaviate/hooks/weaviate.py
b/airflow/providers/weaviate/hooks/weaviate.py
index 4bbc19efd4..916df62e66 100644
--- a/airflow/providers/weaviate/hooks/weaviate.py
+++ b/airflow/providers/weaviate/hooks/weaviate.py
@@ -105,7 +105,7 @@ class WeaviateHook(BaseHook):
"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
),
}
@@ -125,7 +125,7 @@ class WeaviateHook(BaseHook):
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,
@@ -238,7 +238,7 @@ class WeaviateHook(BaseHook):
| 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.