Skip to content

Commit

Permalink
Move FTP Provider to the New Structure (#46206)
Browse files Browse the repository at this point in the history
Related: #46045
  • Loading branch information
aritra24 authored Jan 30, 2025
1 parent 60f0abf commit 162f435
Show file tree
Hide file tree
Showing 38 changed files with 527 additions and 37 deletions.
5 changes: 1 addition & 4 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,7 @@ labelPRBasedOnFilePath:
- providers/facebook/**

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

provider:github:
- providers/src/airflow/providers/github/**/*
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ apache-airflow-providers-docker
apache-airflow-providers-edge
apache-airflow-providers-exasol
apache-airflow-providers-facebook
apache-airflow-providers-ftp
apache-airflow-providers-http
apache-airflow-providers-influxdb
apache-airflow-providers-mongo
Expand Down
25 changes: 0 additions & 25 deletions docs/apache-airflow-providers-ftp/changelog.rst

This file was deleted.

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

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

Release: ``3.12.0``


`File Transfer Protocol (FTP) <https://tools.ietf.org/html/rfc114>`__


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

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

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

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``
================== ==================

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-ftp[common.compat]
================================================================================================================== =================
Dependent package Extra
================================================================================================================== =================
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
`apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
================================================================================================================== =================

The changelog for the provider package can be found in the
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-ftp/3.12.0/changelog.html>`_.
File renamed without changes.
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,15 +33,15 @@ For parameter definition take a look at :class:`~airflow.providers.ftp.operators

The below example shows how to use the FTPFileTransmitOperator to transfer a locally stored file to a remote FTP Server:

.. exampleinclude:: /../../providers/tests/system/ftp/example_ftp.py
.. exampleinclude:: /../../providers/ftp/tests/system/ftp/example_ftp.py
:language: python
:dedent: 4
:start-after: [START howto_operator_ftp_put]
:end-before: [END howto_operator_ftp_put]

The below example shows how to use the FTPFileTransmitOperator to pull a file from a remote FTP Server.

.. exampleinclude:: /../../providers/tests/system/ftp/example_ftp.py
.. exampleinclude:: /../../providers/ftp/tests/system/ftp/example_ftp.py
:language: python
:dedent: 4
:start-after: [START howto_operator_ftp_get]
Expand All @@ -63,15 +63,15 @@ For parameter definition take a look at :class:`~airflow.providers.ftp.operators

The below example shows how to use the FTPSFileTransmitOperator to transfer a locally stored file to a remote FTPS Server:

.. exampleinclude:: /../../providers/tests/system/ftp/example_ftp.py
.. exampleinclude:: /../../providers/ftp/tests/system/ftp/example_ftp.py
:language: python
:dedent: 4
:start-after: [START howto_operator_ftps_put]
:end-before: [END howto_operator_ftps_put]

The below example shows how to use the FTPSFileTransmitOperator to pull a file from a remote FTPS Server.

.. exampleinclude:: /../../providers/tests/system/ftp/example_ftp.py
.. exampleinclude:: /../../providers/ftp/tests/system/ftp/example_ftp.py
:language: python
:dedent: 4
:start-after: [START howto_operator_ftps_get]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,10 @@ versions:
- 1.0.1
- 1.0.0

dependencies:
- apache-airflow>=2.9.0

integrations:
- integration-name: File Transfer Protocol (FTP)
external-doc-url: https://tools.ietf.org/html/rfc114
logo: /integration-logos/ftp/FTP.png
logo: /docs/integration-logos/FTP.png
tags: [protocol]

operators:
Expand Down
87 changes: 87 additions & 0 deletions providers/ftp/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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-ftp"
version = "3.12.0"
description = "Provider package apache-airflow-providers-ftp 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", "ftp", "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",
]

# 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.compat" = [
"apache-airflow-providers-common-compat"
]
"openlineage" = [
"apache-airflow-providers-openlineage"
]

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

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

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

0 comments on commit 162f435

Please sign in to comment.