Skip to content

Commit

Permalink
Move Weaviate provider to new structure (apache#46049)
Browse files Browse the repository at this point in the history
* Move weaviate provider

* remove incorrectly added file
  • Loading branch information
vatsrahul1001 authored Jan 26, 2025
1 parent 63f3b0e commit f7a9a15
Show file tree
Hide file tree
Showing 42 changed files with 496 additions and 54 deletions.
5 changes: 1 addition & 4 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,7 @@ labelPRBasedOnFilePath:
- providers/tests/vertica/**/*

provider:weaviate:
- providers/src/airflow/providers/weaviate/**/*
- docs/apache-airflow-providers-weaviate/**/*
- providers/tests/weaviate/**/*
- providers/tests/system/weaviate/**/*
- providers/weaviate/**

provider:yandex:
- providers/src/airflow/providers/yandex/**/*
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ apache-airflow-providers-common-sql
apache-airflow-providers-edge
apache-airflow-providers-pinecone
apache-airflow-providers-standard
apache-airflow-providers-weaviate
25 changes: 0 additions & 25 deletions docs/apache-airflow-providers-weaviate/changelog.rst

This file was deleted.

64 changes: 64 additions & 0 deletions providers/weaviate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
Package ``apache-airflow-providers-weaviate``

Release: ``3.0.0``


`Weaviate <https://weaviate.io/developers/weaviate>`__


Provider package
----------------

This is a provider package for ``weaviate`` provider. All classes for this provider package
are in ``airflow.providers.weaviate`` python package.

You can find package information and changelog for the provider
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-weaviate/3.0.0/>`_.

Installation
------------

You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
for the minimum Airflow version supported) via
``pip install apache-airflow-providers-weaviate``

The package supports the following python versions: 3.9,3.10,3.11,3.12

Requirements
------------

=================== ==================
PIP package Version required
=================== ==================
``apache-airflow`` ``>=2.9.0``
``httpx`` ``>=0.25.0``
``weaviate-client`` ``>=4.4.0``
``pandas`` ``>=2.1.2,<2.2``
=================== ==================

The changelog for the provider package can be found in the
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-weaviate/3.0.0/changelog.html>`_.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ connect to your account.

An example using the operator to ingest data with custom vectors retrieved from XCOM:

.. exampleinclude:: /../../providers/tests/system/weaviate/example_weaviate_operator.py
.. exampleinclude:: /../../providers/weaviate/tests/system/weaviate/example_weaviate_operator.py
:language: python
:start-after: [START howto_operator_weaviate_embedding_and_ingest_xcom_data_with_vectors]
:end-before: [END howto_operator_weaviate_embedding_and_ingest_xcom_data_with_vectors]

An example using the operator to ingest data with custom vectors retrieved from a python callable:

.. exampleinclude:: /../../providers/tests/system/weaviate/example_weaviate_operator.py
.. exampleinclude:: /../../providers/weaviate/tests/system/weaviate/example_weaviate_operator.py
:language: python
:start-after: [START howto_operator_weaviate_embedding_and_ingest_callable_data_with_vectors]
:end-before: [END howto_operator_weaviate_embedding_and_ingest_callable_data_with_vectors]

An example using the operator to ingest data without vectors retrieved from XCOM for which the operator would generate embedding vectors:

.. exampleinclude:: /../../providers/tests/system/weaviate/example_weaviate_operator.py
.. exampleinclude:: /../../providers/weaviate/tests/system/weaviate/example_weaviate_operator.py
:language: python
:start-after: [START howto_operator_weaviate_ingest_xcom_data_without_vectors]
:end-before: [END howto_operator_weaviate_ingest_xcom_data_without_vectors]

An example using the operator to ingest data without vectors retrieved from a python callable for which the operator would generate embedding vectors:

.. exampleinclude:: /../../providers/tests/system/weaviate/example_weaviate_operator.py
.. exampleinclude:: /../../providers/weaviate/tests/system/weaviate/example_weaviate_operator.py
:language: python
:start-after: [START howto_operator_weaviate_ingest_callable_data_without_vectors]
:end-before: [END howto_operator_weaviate_ingest_callable_data_without_vectors]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ integrations:
- /docs/apache-airflow-providers-weaviate/operators/weaviate.rst
tags: [software]

dependencies:
- apache-airflow>=2.9.0
- httpx>=0.25.0
- weaviate-client>=4.4.0
# In pandas 2.2 minimal version of the sqlalchemy is 2.0
# https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#increased-minimum-versions-for-dependencies
# However Airflow not fully supports it yet: https://github.com/apache/airflow/issues/28723
# In addition FAB also limit sqlalchemy to < 2.0
- pandas>=2.1.2,<2.2

hooks:
- integration-name: Weaviate
python-modules:
Expand Down
84 changes: 84 additions & 0 deletions providers/weaviate/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!

# IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
# `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
[build-system]
requires = ["flit_core==3.10.1"]
build-backend = "flit_core.buildapi"

[project]
name = "apache-airflow-providers-weaviate"
version = "3.0.0"
description = "Provider package apache-airflow-providers-weaviate for Apache Airflow"
readme = "README.rst"
authors = [
{name="Apache Software Foundation", email="[email protected]"},
]
maintainers = [
{name="Apache Software Foundation", email="[email protected]"},
]
keywords = [ "airflow-provider", "weaviate", "airflow", "integration" ]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Framework :: Apache Airflow",
"Framework :: Apache Airflow :: Provider",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]
requires-python = "~=3.9"

# The dependencies should be modified in place in the generated file
# Any change in the dependencies is preserved when the file is regenerated
dependencies = [
"apache-airflow>=2.9.0",
"httpx>=0.25.0",
"weaviate-client>=4.4.0",
# In pandas 2.2 minimal version of the sqlalchemy is 2.0
# https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#increased-minimum-versions-for-dependencies
# However Airflow not fully supports it yet: https://github.com/apache/airflow/issues/28723
# In addition FAB also limit sqlalchemy to < 2.0
"pandas>=2.1.2,<2.2",
]

[project.urls]
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-weaviate/3.0.0"
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-weaviate/3.0.0/changelog.html"
"Bug Tracker" = "https://github.com/apache/airflow/issues"
"Source Code" = "https://github.com/apache/airflow"
"Slack Chat" = "https://s.apache.org/airflow-slack"
"Twitter" = "https://x.com/ApacheAirflow"
"YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"

[project.entry-points."apache_airflow_provider"]
provider_info = "airflow.providers.weaviate.get_provider_info:get_provider_info"

[tool.flit.module]
name = "airflow.providers.weaviate"

[tool.pytest.ini_options]
ignore = "tests/system/"
Loading

0 comments on commit f7a9a15

Please sign in to comment.