Skip to content

Commit bc5e506

Browse files
authored
Move SFTP Provider to the New Structure and fix codespell checks (apache#46155)
1 parent a8b90e1 commit bc5e506

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+566
-40
lines changed

.github/boring-cyborg.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,7 @@ labelPRBasedOnFilePath:
344344
- providers/segment/**
345345

346346
provider:sftp:
347-
- providers/src/airflow/providers/sftp/**/*
348-
- docs/apache-airflow-providers-sftp/**/*
349-
- providers/tests/sftp/**/*
347+
- providers/sftp/**
350348

351349
provider:singularity:
352350
- providers/singularity/**

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ apache-airflow-providers-presto
4343
apache-airflow-providers-qdrant
4444
apache-airflow-providers-samba
4545
apache-airflow-providers-segment
46+
apache-airflow-providers-sftp
4647
apache-airflow-providers-singularity
4748
apache-airflow-providers-ssh
4849
apache-airflow-providers-snowflake

docs/apache-airflow-providers-sftp/changelog.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

providers/sftp/README.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
.. Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
.. http://www.apache.org/licenses/LICENSE-2.0
11+
12+
.. Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
19+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
20+
21+
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22+
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
23+
24+
25+
Package ``apache-airflow-providers-sftp``
26+
27+
Release: ``5.0.0``
28+
29+
30+
`SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
31+
32+
33+
Provider package
34+
----------------
35+
36+
This is a provider package for ``sftp`` provider. All classes for this provider package
37+
are in ``airflow.providers.sftp`` python package.
38+
39+
You can find package information and changelog for the provider
40+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.0.0/>`_.
41+
42+
Installation
43+
------------
44+
45+
You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
46+
for the minimum Airflow version supported) via
47+
``pip install apache-airflow-providers-sftp``
48+
49+
The package supports the following python versions: 3.9,3.10,3.11,3.12
50+
51+
Requirements
52+
------------
53+
54+
================================ ==================
55+
PIP package Version required
56+
================================ ==================
57+
``apache-airflow`` ``>=2.9.0``
58+
``apache-airflow-providers-ssh`` ``>=2.1.0``
59+
``paramiko`` ``>=2.9.0``
60+
``asyncssh`` ``>=2.12.0``
61+
================================ ==================
62+
63+
Cross provider package dependencies
64+
-----------------------------------
65+
66+
Those are dependencies that might be needed in order to use all the features of the package.
67+
You need to install the specified provider packages in order to use them.
68+
69+
You can install such cross-provider dependencies when installing from PyPI. For example:
70+
71+
.. code-block:: bash
72+
73+
pip install apache-airflow-providers-sftp[common.compat]
74+
75+
76+
================================================================================================================== =================
77+
Dependent package Extra
78+
================================================================================================================== =================
79+
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
80+
`apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
81+
`apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
82+
================================================================================================================== =================
83+
84+
The changelog for the provider package can be found in the
85+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.0.0/changelog.html>`_.

providers/src/airflow/providers/sftp/CHANGELOG.rst renamed to providers/sftp/docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Breaking changes
5050
Features
5151
~~~~~~~~
5252

53-
* ``feat: retrieve sftp file attrs onces instead multiple time (#44625)``
53+
* ``feat: retrieve sftp file attrs once instead multiple time (#44625)``
5454
* ``Add host_proxy_cmd parameter to SSHHook and SFTPHook (#44565)``
5555

5656
Misc
@@ -191,7 +191,7 @@ Features
191191
Bug Fixes
192192
~~~~~~~~~
193193

194-
* ``change warnning message (#36148)``
194+
* ``change warning message (#36148)``
195195
* ``Follow BaseHook connection fields method signature in child classes (#36086)``
196196

197197
Misc

docs/apache-airflow-providers-sftp/sensors/sftp_sensor.rst renamed to providers/sftp/docs/sensors/sftp_sensor.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SFTP Sensor
2121
Looks for either a specific file or files with a specific pattern in a server using SFTP protocol.
2222
To get more information about this sensor visit :class:`~airflow.providers.sftp.sensors.sftp.SFTPSensor`
2323

24-
.. exampleinclude:: /../../providers/tests/system/sftp/example_sftp_sensor.py
24+
.. exampleinclude:: /../../providers/sftp/tests/system/sftp/example_sftp_sensor.py
2525
:language: python
2626
:dedent: 4
2727
:start-after: [START howto_operator_sftp_sensor]
@@ -39,15 +39,15 @@ op_kwargs (optional)
3939

4040
Whatever returned by the python callable is put into XCom.
4141

42-
.. exampleinclude:: /../../providers/tests/system/sftp/example_sftp_sensor.py
42+
.. exampleinclude:: /../../providers/sftp/tests/system/sftp/example_sftp_sensor.py
4343
:language: python
4444
:dedent: 4
4545
:start-after: [START howto_operator_sftp_sensor_decorator]
4646
:end-before: [END howto_operator_sftp_sensor_decorator]
4747

4848
Checks for the existence of a file on an SFTP server in the deferrable mode:
4949

50-
.. exampleinclude:: /../../providers/tests/system/sftp/example_sftp_sensor.py
50+
.. exampleinclude:: /../../providers/sftp/tests/system/sftp/example_sftp_sensor.py
5151
:language: python
5252
:dedent: 4
5353
:start-after: [START howto_sensor_sftp_deferrable]

providers/src/airflow/providers/sftp/provider.yaml renamed to providers/sftp/provider.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,10 @@ versions:
6767
- 1.1.0
6868
- 1.0.0
6969

70-
dependencies:
71-
- apache-airflow>=2.9.0
72-
- apache-airflow-providers-ssh>=2.1.0
73-
- paramiko>=2.9.0
74-
- asyncssh>=2.12.0
75-
7670
integrations:
7771
- integration-name: SSH File Transfer Protocol (SFTP)
7872
external-doc-url: https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/
79-
logo: /integration-logos/sftp/SFTP.png
73+
logo: /docs/integration-logos/SFTP.png
8074
tags: [protocol]
8175

8276
operators:

providers/sftp/pyproject.toml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
19+
20+
# IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
21+
# `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
22+
[build-system]
23+
requires = ["flit_core==3.10.1"]
24+
build-backend = "flit_core.buildapi"
25+
26+
[project]
27+
name = "apache-airflow-providers-sftp"
28+
version = "5.0.0"
29+
description = "Provider package apache-airflow-providers-sftp for Apache Airflow"
30+
readme = "README.rst"
31+
authors = [
32+
{name="Apache Software Foundation", email="dev@airflow.apache.org"},
33+
]
34+
maintainers = [
35+
{name="Apache Software Foundation", email="dev@airflow.apache.org"},
36+
]
37+
keywords = [ "airflow-provider", "sftp", "airflow", "integration" ]
38+
classifiers = [
39+
"Development Status :: 5 - Production/Stable",
40+
"Environment :: Console",
41+
"Environment :: Web Environment",
42+
"Intended Audience :: Developers",
43+
"Intended Audience :: System Administrators",
44+
"Framework :: Apache Airflow",
45+
"Framework :: Apache Airflow :: Provider",
46+
"License :: OSI Approved :: Apache Software License",
47+
"Programming Language :: Python :: 3.9",
48+
"Programming Language :: Python :: 3.10",
49+
"Programming Language :: Python :: 3.11",
50+
"Programming Language :: Python :: 3.12",
51+
"Topic :: System :: Monitoring",
52+
]
53+
requires-python = "~=3.9"
54+
55+
# The dependencies should be modified in place in the generated file
56+
# Any change in the dependencies is preserved when the file is regenerated
57+
dependencies = [
58+
"apache-airflow>=2.9.0",
59+
"apache-airflow-providers-ssh>=2.1.0",
60+
"paramiko>=2.9.0",
61+
"asyncssh>=2.12.0",
62+
]
63+
64+
# The optional dependencies should be modified in place in the generated file
65+
# Any change in the dependencies is preserved when the file is regenerated
66+
[project.optional-dependencies]
67+
"common.compat" = [
68+
"apache-airflow-providers-common-compat"
69+
]
70+
"openlineage" = [
71+
"apache-airflow-providers-openlineage"
72+
]
73+
74+
[project.urls]
75+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.0.0"
76+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.0.0/changelog.html"
77+
"Bug Tracker" = "https://github.com/apache/airflow/issues"
78+
"Source Code" = "https://github.com/apache/airflow"
79+
"Slack Chat" = "https://s.apache.org/airflow-slack"
80+
"Twitter" = "https://x.com/ApacheAirflow"
81+
"YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
82+
83+
[project.entry-points."apache_airflow_provider"]
84+
provider_info = "airflow.providers.sftp.get_provider_info:get_provider_info"
85+
86+
[tool.flit.module]
87+
name = "airflow.providers.sftp"
88+
89+
[tool.pytest.ini_options]
90+
ignore = "tests/system/"

0 commit comments

Comments
 (0)