forked from astronomer/astronomer-cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
231 lines (209 loc) · 6.67 KB
/
pyproject.toml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "astronomer-cosmos"
dynamic = ["version"]
description = "Orchestrate your dbt projects in Airflow"
readme = "README.rst"
license = "Apache-2.0"
requires-python = ">=3.8"
authors = [{ name = "Astronomer", email = "[email protected]" }]
keywords = ["airflow", "apache-airflow", "astronomer", "dags", "dbt"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Apache Airflow",
"Framework :: Apache Airflow :: Provider",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"aenum",
"attrs",
"apache-airflow>=2.4.0",
"importlib-metadata; python_version < '3.8'",
"Jinja2>=3.0.0",
"msgpack",
"packaging>=22.0",
"pydantic>=1.10.0",
"typing-extensions; python_version < '3.8'",
"virtualenv",
]
[project.optional-dependencies]
dbt-all = [
"dbt-athena",
"dbt-bigquery",
"dbt-clickhouse",
"dbt-databricks",
"dbt-exasol",
"dbt-postgres",
"dbt-redshift",
"dbt-snowflake",
"dbt-spark",
"dbt-teradata",
"dbt-vertica",
]
dbt-athena = ["dbt-athena-community", "apache-airflow-providers-amazon>=8.0.0"]
dbt-bigquery = ["dbt-bigquery"]
dbt-clickhouse = ["dbt-clickhouse"]
dbt-databricks = ["dbt-databricks"]
dbt-exasol = ["dbt-exasol"]
dbt-postgres = ["dbt-postgres"]
dbt-redshift = ["dbt-redshift"]
dbt-snowflake = ["dbt-snowflake"]
dbt-spark = ["dbt-spark"]
dbt-teradata = ["dbt-teradata"]
dbt-vertica = ["dbt-vertica<=1.5.4"]
openlineage = ["openlineage-integration-common!=1.15.0", "openlineage-airflow"]
amazon = [
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
]
google = ["apache-airflow-providers-google>=10.17.0"]
microsoft = ["apache-airflow-providers-microsoft-azure>=8.5.0"]
all = [
"astronomer-cosmos[dbt-all]",
"astronomer-cosmos[openlineage]",
"astronomer-cosmos[amazon]",
"astronomer-cosmos[google]",
"astronomer-cosmos[microsoft]",
]
docs = [
"sphinx",
"pydata-sphinx-theme",
"sphinx-autobuild",
"sphinx-autoapi",
"apache-airflow-providers-cncf-kubernetes>=5.1.1",
]
docker = [
"apache-airflow-providers-docker>=3.5.0",
]
kubernetes = [
"apache-airflow-providers-cncf-kubernetes>=5.1.1",
]
aws_eks = [
"apache-airflow-providers-amazon>=8.0.0",
]
azure-container-instance = [
"apache-airflow-providers-microsoft-azure>=8.5.0",
]
gcp-cloud-run-job = [
"apache-airflow-providers-google>=10.11.0",
]
[project.entry-points.apache_airflow_provider]
provider_info = "cosmos:get_provider_info"
[project.entry-points."airflow.plugins"]
cosmos = "cosmos.plugin:CosmosPlugin"
[project.urls]
Homepage = "https://github.com/astronomer/astronomer-cosmos"
Documentation = "https://astronomer.github.io/astronomer-cosmos"
"Source code" = "https://github.com/astronomer/astronomer-cosmos"
[tool.hatch.version]
path = "cosmos/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/cosmos"]
[tool.hatch.build.targets.wheel]
packages = ["/cosmos"]
######################################
# TESTING
######################################
[tool.hatch.envs.tests]
dependencies = [
# do not install Airflow dependencies here!
# we need to use constrantis and we're doing this in the `pre-install-commands`
"packaging>=22.0",
"pytest>=6.0",
"pytest-split",
"pytest-dotenv",
"requests-mock",
"pytest-cov",
"pytest-describe",
"sqlalchemy-stubs", # Change when sqlalchemy is upgraded https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html
"pre-commit",
"types-PyYAML",
"types-attrs",
"types-pytz",
"types-requests",
"types-python-dateutil",
"Werkzeug<3.0.0",
"eval_type_backport", # TODO: https://github.com/astronomer/astronomer-cosmos/issues/1342
"dbt-core<1.8.9" # TODO: https://github.com/astronomer/astronomer-cosmos/issues/1343
]
pre-install-commands = ["sh scripts/test/pre-install-airflow.sh {matrix:airflow} {matrix:python}"]
[[tool.hatch.envs.tests.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
airflow = ["2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10"]
[tool.hatch.envs.tests.overrides]
matrix.airflow.dependencies = [
{ value = "typing_extensions<4.6", if = ["2.6"] },
]
[tool.hatch.envs.tests.scripts]
freeze = "pip freeze"
test = 'sh scripts/test/unit.sh'
test-cov = 'sh scripts/test/unit-cov.sh'
test-integration = 'sh scripts/test/integration.sh'
test-kubernetes = "sh scripts/test/integration-kubernetes.sh"
test-kubernetes-setup = "sh scripts/test/kubernetes-setup.sh"
test-integration-dbt-1-5-4 = 'sh scripts/test/integration-dbt-1-5-4.sh'
test-integration-expensive = 'sh scripts/test/integration-expensive.sh'
test-integration-setup = 'sh scripts/test/integration-setup.sh'
test-integration-sqlite = 'sh scripts/test/integration-sqlite.sh'
test-integration-sqlite-setup = 'sh scripts/test/integration-sqlite-setup.sh'
test-performance = 'sh scripts/test/performance.sh'
test-performance-setup = 'sh scripts/test/performance-setup.sh'
type-check = "pre-commit run mypy --files cosmos/**/*"
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]
minversion = "6.0"
markers = ["integration", "sqlite", "perf"]
######################################
# DOCS
######################################
[tool.hatch.envs.docs]
dependencies = [
"aenum",
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
"apache-airflow-providers-cncf-kubernetes>=5.1.1",
"apache-airflow-providers-google>=10.17.0",
"apache-airflow-providers-microsoft-azure>=8.5.0",
"msgpack",
"openlineage-airflow",
"pydantic>=1.10.0",
"pydata-sphinx-theme",
"sphinx",
"sphinx-autoapi",
"sphinx-autobuild",
]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -b html docs docs/_build"
serve = "sphinx-autobuild docs docs/_build"
######################################
# THIRD PARTY TOOLS
######################################
[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310']
[tool.isort]
profile = "black"
known_third_party = ["airflow", "jinja2"]
[tool.mypy]
strict = true
ignore_missing_imports = true
no_warn_unused_ignores = true
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["C901", "D300", "I", "F"]
ignore = ["F541"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.distutils.bdist_wheel]
universal = true