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

Move PGVECTOR provider to new structure #46051

Merged
merged 14 commits into from
Jan 26, 2025
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
10 changes: 2 additions & 8 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,13 @@ labelPRBasedOnFilePath:
- providers/tests/system/papermill/**/*

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

provider:pinecone:
- providers/pinecone/**

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

provider:presto:
- providers/src/airflow/providers/presto/**/*
Expand Down
7 changes: 3 additions & 4 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
(
"airflow/api/file.py",
"providers/tests/postgres/file.py",
"providers/postgres/tests/provider_tests/postgres/file.py",
),
{
"selected-providers-list-as-string": "amazon common.compat common.sql fab google openlineage "
Expand Down Expand Up @@ -530,11 +530,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
(
"chart/aaaa.txt",
"providers/tests/postgres/file.py",
"providers/postgres/tests/provider_tests/postgres/file.py",
),
{
"selected-providers-list-as-string": "amazon common.sql google openlineage "
"pgvector postgres",
"selected-providers-list-as-string": "amazon common.sql google openlineage pgvector postgres",
"all-python-versions": "['3.9']",
"all-python-versions-list-as-string": "3.9",
"python-versions": "['3.9']",
Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ apache-airflow-providers-celery
apache-airflow-providers-cohere
apache-airflow-providers-common-sql
apache-airflow-providers-edge
apache-airflow-providers-pgvector
apache-airflow-providers-pinecone
apache-airflow-providers-postgres
apache-airflow-providers-standard
apache-airflow-providers-weaviate
apache-airflow-providers-zendesk
25 changes: 0 additions & 25 deletions docs/apache-airflow-providers-pgvector/changelog.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/apache-airflow-providers-postgres/changelog.rst

This file was deleted.

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

.. 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-pgvector``

Release: ``1.4.0``


`pgvector <https://github.com/pgvector/pgvector>`__


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

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

You can find package information and changelog for the provider
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-pgvector/1.4.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-pgvector``

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``
``apache-airflow-providers-postgres`` ``>=5.7.1``
``pgvector`` ``!=0.3.0``
===================================== ==================

Cross provider package dependencies
-----------------------------------

Those are dependencies that might be needed in order to use all the features of the package.
You need to install the specified provider packages in order to use them.

You can install such cross-provider dependencies when installing from PyPI. For example:

.. code-block:: bash

pip install apache-airflow-providers-pgvector[common.sql]


============================================================================================================ ==============
Dependent package Extra
============================================================================================================ ==============
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
`apache-airflow-providers-postgres <https://airflow.apache.org/docs/apache-airflow-providers-postgres>`_ ``postgres``
============================================================================================================ ==============

The changelog for the provider package can be found in the
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-pgvector/1.4.0/changelog.html>`_.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ See https://github.com/pgvector/pgvector#installation for installation instructi

An example using the operator to ingest data is shown below:

.. exampleinclude:: /../../providers/tests/system/pgvector/example_pgvector.py
.. exampleinclude:: /../../providers/pgvector/tests/system/pgvector/example_pgvector.py
:language: python
:start-after: [START howto_operator_pgvector_ingest]
:end-before: [END howto_operator_pgvector_ingest]
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ integrations:
- /docs/apache-airflow-providers-pgvector/operators/pgvector.rst
tags: [software]

dependencies:
- apache-airflow>=2.9.0
- apache-airflow-providers-postgres>=5.7.1
# setting !=0.3.0 version due to https://github.com/pgvector/pgvector-python/issues/79
# observed in 0.3.0.
- pgvector!=0.3.0

hooks:
- integration-name: pgvector
python-modules:
Expand Down
88 changes: 88 additions & 0 deletions providers/pgvector/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 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-pgvector"
version = "1.4.0"
description = "Provider package apache-airflow-providers-pgvector 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", "pgvector", "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",
"apache-airflow-providers-postgres>=5.7.1",
# setting !=0.3.0 version due to https://github.com/pgvector/pgvector-python/issues/79
# observed in 0.3.0.
"pgvector!=0.3.0",
]

# The optional dependencies should be modified in place in the generated file
# Any change in the dependencies is preserved when the file is regenerated
[project.optional-dependencies]
"common.sql" = [
"apache-airflow-providers-common-sql"
]

[project.urls]
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-pgvector/1.4.0"
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-pgvector/1.4.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.pgvector.get_provider_info:get_provider_info"

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

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