forked from databricks/dbt-databricks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
132 lines (116 loc) · 4.28 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "dbt-databricks"
dynamic = ["version"]
description = "The Databricks adapter plugin for dbt"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.9"
authors = [{ name = "Databricks", email = "[email protected]" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"databricks-sdk==0.17.0",
"databricks-sql-connector>=3.5.0, <4.0.0",
"dbt-adapters>=1.7.0, <2.0",
"dbt-common>=1.10.0, <2.0",
"dbt-core>=1.8.7, <2.0",
"dbt-spark>=1.8.0, <2.0",
"keyring>=23.13.0",
"pandas<2.2.0",
"pydantic>=1.10.0, <2",
]
[project.urls]
homepage = "https://github.com/databricks/dbt-databricks"
changelog = "https://github.com/databricks/dbt-databricks/blob/main/CHANGELOG.md"
documentation = "https://docs.getdbt.com/reference/resource-configs/databricks-configs"
issues = "https://github.com/databricks/dbt-databricks/issues"
repository = "https://github.com/databricks/dbt-databricks"
[tool.hatch.version]
path = "dbt/adapters/databricks/__version__.py"
[tool.hatch.build]
include = ["/dbt"]
[tool.hatch.envs.verify]
detached = true
dependencies = ["wheel", "twine", "check-wheel-contents"]
[tool.hatch.envs.verify.scripts]
check-all = ["- check-wheel", "- check-sdist"]
check-wheel = [
"twine check dist/*",
"find ./dist/dbt_databricks-*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/",
"pip freeze | grep dbt-databricks",
]
check-sdist = [
"check-wheel-contents dist/*.whl --ignore W007,W008",
"find ./dist/dbt_databricks-*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/",
"pip freeze | grep dbt-databricks",
]
[tool.hatch.envs.default]
dependencies = [
"dbt_common @ git+https://github.com/dbt-labs/dbt-common.git",
"dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@main",
"dbt-core @ git+https://github.com/dbt-labs/dbt-core.git@main#subdirectory=core",
"dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@main#subdirectory=dbt-tests-adapter",
"dbt-spark @ git+https://github.com/dbt-labs/dbt-spark.git@main",
"pytest",
"pytest-xdist",
"pytest-dotenv",
"freezegun",
"mypy",
"pre-commit",
"ruff",
"types-requests",
"debugpy",
]
path = ".hatch"
python = "3.9"
[tool.hatch.envs.default.scripts]
setup-precommit = "pre-commit install"
code-quality = "pre-commit run --all-files"
unit = "pytest --color=yes -v --profile databricks_cluster -n auto --dist=loadscope tests/unit"
cluster-e2e = "pytest --color=yes -v --profile databricks_cluster -n auto --dist=loadscope tests/functional"
uc-cluster-e2e = "pytest --color=yes -v --profile databricks_uc_cluster -n auto --dist=loadscope tests/functional"
sqlw-e2e = "pytest --color=yes -v --profile databricks_uc_sql_endpoint -n auto --dist=loadscope tests/functional"
[tool.hatch.envs.test.scripts]
unit = "pytest --color=yes -v --profile databricks_cluster -n auto --dist=loadscope tests/unit"
[[tool.hatch.envs.test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[tool.ruff]
line-length = 100
target-version = 'py39'
[tool.ruff.lint]
select = ["E", "W", "F", "I"]
ignore = ["E203"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore:.*'soft_unicode' has been renamed to 'soft_str'*:DeprecationWarning",
"ignore:unclosed file .*:ResourceWarning",
]
env_files = ["test.env"]
testpaths = ["tests/unit", "tests/functional"]
markers = [
"external: mark test as requiring an external location",
"python: mark test as running a python model",
"dlt: mark test as running a DLT model",
]
[tool.mypy]
strict_optional = true
no_implicit_optional = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["databricks.*", "agate.*", "jinja2.*", "yaml.*"]
ignore_missing_imports = true