forked from meltano/meltano
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
429 lines (400 loc) · 12.4 KB
/
Copy pathpyproject.toml
File metadata and controls
429 lines (400 loc) · 12.4 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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
[project]
name = "meltano"
version = "4.0.7"
description = "Meltano is your CLI for ELT+: Open Source, Flexible, and Scalable. Move, transform, and test your data with confidence using a streamlined data engineering workflow you’ll love."
authors = [{ name = "Meltano", email = "hello@meltano.com" }]
requires-python = ">=3.10,<3.16"
readme = "README.md"
license = "MIT"
license-files = [
"LICENSE",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
keywords = [
"Meltano",
"ELT",
"Data integration",
"singer-io",
"dbt",
]
dependencies = [
"alembic>=1.14.0,<2",
"anyio>=4.4.0,<5",
"backports-strenum>=1.3.1,<2 ; python_version < '3.11'",
"check-jsonschema>=0.33,<0.36",
"click>=8.1,<8.4,!=8.2.2",
"click-default-group>=1.2.4,<2",
"dateparser>=1.2.1",
"fasteners>=0.19,<0.21",
"importlib-metadata>=5 ; python_version < '3.12'",
"jinja2>=3.1.4,<4",
"jsonschema>=4.23,<5",
"packaging>=24.2,<26.0",
"pip~=25.1",
"platformdirs>=4.3.8",
"psutil>=7.0.0,<8",
"python-dotenv>=1.0.1,<2",
"pyyaml>=6.0.2,<7",
"requests>=2.32.3,<3",
"rich>=14.0,<14.3",
"ruamel.yaml>=0.18.6,<0.19",
"smart-open>=7.0.5,<8",
"snowplow-tracker>=1.0.4,<2",
"sqlalchemy>=2.0.35,<2.1",
"structlog>=25.1.0,<26",
"typing-extensions>=4.12.2,<5",
"tzlocal~=5.3",
"urllib3>=1.26.20",
"uv>=0.1.24,<0.10,!=0.8.7",
"virtualenv>=20.26.6,<21",
]
[project.optional-dependencies]
azure = [
"azure-storage-blob>=12.24.0,<13",
"azure-common>=1.1.28,<2",
"azure-core>=1.32.0,<2",
"azure-identity>=1.19.0,<2",
]
containers = [
"aiodocker>=0.24.0,<0.25",
]
gcs = ["google-cloud-storage>=1.31.0"]
mssql = ["pymssql>=2.3.2,<3"]
postgres = ["psycopg[binary]>=3.2.3,<4"]
psycopg2 = ["psycopg2-binary>=2.9.9,<3"]
s3 = ["boto3>=1.35,<1.43"]
[project.urls]
Homepage = "https://meltano.com"
Repository = "https://github.com/meltano/meltano"
Documentation = "https://docs.meltano.com"
Changelog = "https://github.com/meltano/meltano/blob/main/CHANGELOG.md"
"Issue Tracker" = "https://github.com/meltano/meltano/issues"
Slack = "https://meltano.com/slack"
Twitter = "https://twitter.com/meltanodata/"
Youtube = "https://www.youtube.com/meltano"
[project.scripts]
meltano = "meltano.cli:main"
[project.entry-points."meltano.settings"]
# AWS S3 state backend settings
s3_aws_access_key_id = "meltano.core.state_store.s3.settings:AWS_ACCESS_KEY_ID"
s3_aws_secret_access_key = "meltano.core.state_store.s3.settings:AWS_SECRET_ACCESS_KEY"
s3_endpoint_url = "meltano.core.state_store.s3.settings:ENDPOINT_URL"
# Azure state backend settings
azure_connection_string = "meltano.core.state_store.azure.settings:CONNECTION_STRING"
azure_storage_account_url = "meltano.core.state_store.azure.settings:STORAGE_ACCOUNT_URL"
# Google Cloud Storage state backend settings
google_application_credentials = "meltano.core.state_store.google.settings:APPLICATION_CREDENTIALS" # Deprecated! Remove in Meltano v4
google_application_credentials_path = "meltano.core.state_store.google.settings:APPLICATION_CREDENTIALS_PATH"
google_application_credentials_json = "meltano.core.state_store.google.settings:APPLICATION_CREDENTIALS_JSON"
[project.entry-points."meltano.state_backends"]
# These keys should match the expected scheme for URIs of
# the given type. E.g., filesystem state backends have a
# file://<path>/<to>/<state directory> URI
azure = "meltano.core.state_store.azure.backend:AZStorageStateStoreManager"
file = "meltano.core.state_store.filesystem:LocalFilesystemStateStoreManager"
gs = "meltano.core.state_store.google.backend:GCSStateStoreManager"
s3 = "meltano.core.state_store.s3.backend:S3StateStoreManager"
[dependency-groups]
coverage = [
"coverage[toml]>=7.10",
]
dev = [
{ include-group = "testing" },
{ include-group = "typing" },
]
pre-commit = [
"pre-commit>=4.0.1,<5",
]
testing = [
{ include-group = "coverage" },
"colorama>=0.4.4,<0.5",
"faker>=37.4.2",
"moto>=5.0.21,<6",
"pytest>=9",
"pytest-asyncio>=1.3",
"pytest-docker~=3.1",
"pytest-order~=1.3",
"pytest-randomly>=3.16,<5.0",
"pytest-structlog~=1.1",
"pytest-timeout>=2.4.0",
"pytest-xdist~=3.6",
"requests-mock>=1.12.1,<2",
"setproctitle~=1.3", # Used by pytest-xdist to aid with handling resource intensive processes.
"time-machine>=3",
]
typing = [
{ include-group = "testing" },
"backports-strenum", # TODO: Drop once the runtime dependency is dropped
"boto3-stubs[essential]>=1.35",
"importlib-metadata", # TODO: Drop once the runtime dependency is dropped
"mypy>=1.16.0,<2",
"types-dateparser>=1.2.0.20250208",
"types-jsonschema>=4.23.0.20240813,<5",
"types-psutil>=7.0.0.20250218,<8",
"types-pyyaml>=6.0.12.20240917,<7",
"types-requests>=2.31.0,<3",
]
[tool.hatch.build.targets.sdist]
include = [
"src",
"tests",
]
[tool.hatch.build.targets.wheel]
include = ["src/meltano"]
[tool.hatch.build.targets.wheel.sources]
"src/meltano" = "meltano"
[tool.pytest]
addopts = [
"--doctest-modules",
"-ra",
"--strict-config",
"--strict-markers",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "class"
filterwarnings = [
'error',
'''ignore:The 'version' field in meltano.yml is deprecated.*:DeprecationWarning''',
'ignore:datetime.datetime.utcnow.* is deprecated:DeprecationWarning:time_machine.*', # https://github.com/adamchainz/time-machine/issues/445
'ignore:datetime.datetime.utcnow.* is deprecated:DeprecationWarning:botocore.auth.*', # https://github.com/boto/boto3/issues/3889
'ignore: Parsing dates involving a day of month without a year specified is:DeprecationWarning:dateparser.*', # https://github.com/scrapinghub/dateparser/issues/1246
'ignore::pytest.PytestUnraisableExceptionWarning',
'ignore::ResourceWarning',
'once::meltano.core._compat.MeltanoInternalDeprecationWarning',
'once:You are using a Python version .* which Google will stop supporting in new releases of google.api_core once it reaches its end of life:FutureWarning',
]
log_cli = true
log_cli_format = "%(message)s"
log_cli_level = "CRITICAL"
log_file = "pytest.log"
log_file_date_format = "%Y-%m-%d %H:%M:%S"
log_file_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_file_level = "DEBUG"
markers = [
"backend(type): backend specific test",
"meta: meta test",
"concurrent: test requires true concurrency",
"slow: slow test",
]
minversion = "9"
testpaths = [
"tests/",
]
xfail_strict = true
[tool.coverage.run]
branch = true
core = "sysmon"
concurrency = [
"multiprocessing",
"thread",
]
disable_warnings = [
"no-sysmon",
]
parallel = true
patch = [
"subprocess",
]
relative_files = true # This allows coverage to be measured in Windows
sigterm = true
source = [
"meltano",
"tests",
]
omit = [
"**/meltano/migrations/env.py",
"**/meltano/cli/interactive/*",
]
[tool.coverage.paths]
source = [
"src/meltano/",
"**/site-packages/meltano/",
"**/site-packages/meltano*/meltano/",
]
[tool.coverage.report]
exclude_also = [
# Ignore TYPE_CHECKING blocks
'''if (t\.)?TYPE_CHECKING:''',
# Ignore assert_never type checks
'''(t\.)?assert_never''',
# Ignore ellipsis in abstract methods
"\\.\\.\\.",
# Comments to turn coverage on and off
'no cover: start(?s:.)*?no cover: stop',
]
precision = 2
show_missing = true
skip_covered = true
[tool.commitizen]
name = "cz_version_bump"
version = "4.0.7"
prerelease_offset = 1
tag_format = "v$major.$minor.$patch$prerelease"
changelog_merge_prerelease = true
version_files = [
"pyproject.toml:^version =",
'docs/package.json:^ "version":',
".github/ISSUE_TEMPLATE/bug.yml:^ placeholder:",
]
[tool.mypy]
check_untyped_defs = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
"exhaustive-match",
"deprecated",
]
incremental = false # Disabled until https://github.com/python/mypy/issues/12664 is resolved
files = [
"src/meltano/",
]
follow_untyped_imports = true
exclude = [
"src/meltano/migrations/",
]
local_partial_types = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
# The following whitelist is used to allow for incremental adoption
# of MyPy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.
[[tool.mypy.overrides]]
ignore_errors = true
module = [
# Way too many modules at the root of meltano.core to tackle them all at once # so listing them individually here.
"meltano.core.task_sets_service",
"meltano.core.transform_add_service",
# Meltano Core submodules
"meltano.core.behavior.canonical",
"meltano.core.behavior.hookable",
"meltano.core.behavior.name_eq",
"meltano.core.behavior.visitor",
"meltano.core.block.extract_load",
"meltano.core.block.plugin_command",
"meltano.core.block.singer",
"meltano.core.plugin.base",
"meltano.core.plugin.dbt.*",
"meltano.core.plugin.meltano_file",
"meltano.core.plugin.project_plugin",
"meltano.core.plugin.settings_service",
"meltano.core.runner.*",
"meltano.core.tracking.*",
"meltano.core.utils.*",
]
[build-system]
requires = ["hatchling==1.28.0"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 88
required-version = ">=0.13"
target-version = "py310"
[tool.ruff.lint]
future-annotations = true
ignore = [
"N818", # Allow Exceptions to have suffix 'Exception' rather than 'Error'
"S310", # Allow `urllib.open`
"S603", # Allow `subprocess.run(..., shell=False)`
"COM812", # Handled by the Ruff formatter
"ISC001", # Handled by the Ruff formatter
]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle/flake8-docstrings
"DTZ", # flake8-datetimez
"E", # pycodestyle (error)
"EM", # flake8-errmsg
"ERA", # flake8-eradicate
"F", # pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle (warning)
"YTT", # flake8-2020
]
unfixable = [
"ERA001", # Don't remove commented-out code
]
[tool.ruff.lint.per-file-ignores]
"src/meltano/**/__init__.py" = [
"F401", # Permit unused imports in `__init__.py` files
]
"tests/**" = [
"ANN",
"D1",
"S101", # Allow 'assert' in tests
"INP", # Don't require __init__.py files in tests directories
"LOG015", # Allow `logging.<level>` in tests
]
"src/meltano/migrations/versions/*" = [
"D103",
"INP001",
]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
mypy-init-return = true
suppress-dummy-args = true
[tool.ruff.lint.flake8-import-conventions]
banned-from = [
"typing",
]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
typing = "t"
[tool.ruff.lint.flake8-pytest-style]
parametrize-values-type = "tuple"
[tool.ruff.lint.isort]
known-first-party = ["asserts", "fixtures", "meltano"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"logging.getLogger".msg = "Use `structlog.stdlib.get_logger` instead"
"meltano.cli.cli.command".msg = "Use `click.command` and `meltano.cli.cli.add_command` instead"
"meltano.cli.cli.group".msg = "Use `click.group` and `meltano.cli.cli.add_command` instead"
"structlog.dev.ConsoleRenderer".msg = "Use `meltano.core.logging.renderers.MeltanoConsoleRenderer` instead"
[tool.check-wheel-contents]
ignore = [
"W004", # https://github.com/jwodder/check-wheel-contents/issues/5
]
[tool.uv]
required-version = ">=0.6.15"