-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathpyproject.toml
More file actions
206 lines (171 loc) · 5.11 KB
/
Copy pathpyproject.toml
File metadata and controls
206 lines (171 loc) · 5.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "dag-factory"
dynamic = ["version"]
description = "Dynamically build Apache Airflow DAGs from YAML files"
authors = [{ name = "Astronomer", email = "humans@astronomer.io" }]
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.10"
keywords = ["airflow", "apache-airflow", "provider", "astronomer", "dag"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Topic :: Database",
"Framework :: Apache Airflow",
"Intended Audience :: Developers",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"apache-airflow>=2.9",
"pathspec",
"pyyaml",
"packaging",
"typer"
]
[project.scripts]
dagfactory = "dagfactory.__main__:app"
[project.optional-dependencies]
all = [
"apache-airflow-providers-http>=4.0.0",
"apache-airflow-providers-cncf-kubernetes>=4.4.0",
"apache-airflow-providers-common-sql>=1.2.0",
"pyyaml",
"packaging",
]
kubernetes = [
"apache-airflow-providers-cncf-kubernetes>=4.4.0",
]
http = [
"apache-airflow-providers-http>=4.0.0",
]
common-sql = [
"apache-airflow-providers-common-sql>=1.2.0"
]
tests = [
"pytest>=6.0",
"pytest-cov",
"pre-commit",
"pandas"
]
######################################
# UV CONFIGURATION
######################################
[tool.uv]
dev-dependencies = [
"dag-factory[tests]",
"pre-commit",
"pytest>=6.0",
"pytest-cov",
"apache-airflow-providers-slack",
"httpx>=0.25.0",
"pandas",
"hatch",
]
# Respect existing constraints for Airflow compatibility
constraint-dependencies = [
"apache-airflow>=2.9",
]
[tool.uv.workspace]
# Enable workspace mode for better dependency management
members = ["."]
[tool.uv.pip]
# Use more efficient resolution strategy
resolution = "highest"
# Respect existing pip-compatible behavior for scripts
system = false
# Optimize for CI/CD performance
compile-bytecode = true
[tool.uv.sources]
# Add custom package sources if needed in the future
# Example: custom-package = { url = "https://custom-repo.com/simple" }
######################################
# TESTING
######################################
[tool.hatch.envs.tests]
dependencies = [
"dag-factory[tests]"
]
pre-install-commands = ["sh scripts/test/pre-install-airflow.sh {matrix:airflow} {matrix:python} {matrix:providers-standard:}"]
[[tool.hatch.envs.tests.matrix]]
python = ["3.10", "3.11", "3.12"]
airflow = ["2.9", "2.10", "2.11", "3.0", "3.1", "3.2", "3.3"]
[[tool.hatch.envs.tests.matrix]]
python = ["3.13"]
airflow = ["3.1", "3.2", "3.3"]
[[tool.hatch.envs.tests.matrix]]
python = ["3.14"]
airflow = ["3.2", "3.3"]
# Regression coverage for issue #679: on Airflow 2.x with apache-airflow-providers-standard
# installed, the core and providers.standard PythonOperator classes diverge.
[[tool.hatch.envs.tests.matrix]]
python = ["3.12"]
airflow = ["2.11"]
providers-standard = ["1.9.1"]
[tool.hatch.envs.tests.scripts]
freeze = "pip freeze"
static-check = "pre-commit run --files dagfactory/*"
test = 'sh scripts/test/unit.sh'
test-cov = 'sh scripts/test/unit-cov.sh'
test-integration = 'sh scripts/test/integration.sh'
test-integration-setup = 'sh scripts/test/integration-setup.sh'
[project.urls]
Source = "https://github.com/astronomer/dag-factory"
[tool.hatch.version]
path = "dagfactory/__init__.py"
[project.entry-points."airflow.plugins"]
dagfactory = "dagfactory.plugin:DagFactoryPlugin"
[tool.hatch.build]
sources = ["."]
[tool.hatch.build.targets.sdist]
include = ["dagfactory"]
[tool.hatch.build.targets.wheel]
packages = ["dagfactory"]
[tool.distutils.bdist_wheel]
universal = true
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]
minversion = "6.0"
markers = ["integration", "callbacks"]
######################################
# DOCS
######################################
[tool.hatch.envs.docs]
dependencies = [
"mkdocs",
"mike",
"pymdown-extensions",
"mkdocs-material",
]
[tool.hatch.envs.docs.scripts]
dev = "mkdocs build && mkdocs serve" # For local development and preventing publishing
gh-deploy = "python scripts/docs_deploy.py dev"
gh-release = "python scripts/docs_deploy.py release"
build = "mkdocs build --strict"
######################################
# THIRD PARTY TOOLS
######################################
[tool.black]
line-length = 120
target-version = ['py310', 'py311', 'py312', 'py313', 'py314']
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["C901", "D300", "I", "F"]
ignore = ["F541", "C901"]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["dagfactory", "tests"]
[tool.ruff.lint.mccabe]
max-complexity = 10