forked from dbt-labs/dbt-adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
159 lines (146 loc) · 4.14 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
[project]
dynamic = ["version"]
name = "dbt-adapters"
description = "The set of adapter protocols and base functionality that supports integration with dbt-core"
readme = "README.md"
keywords = ["dbt", "adapter", "adapters", "database", "elt", "dbt-core", "dbt Core", "dbt Cloud", "dbt Labs"]
requires-python = ">=3.8.0"
authors = [
{ name = "dbt Labs", email = "[email protected]" },
]
maintainers = [
{ name = "dbt Labs", email = "[email protected]" },
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"dbt-common<2.0",
"pytz>=2015.7",
# installed via dbt-common but used directly
"agate>=1.0,<2.0",
"mashumaro[msgpack]>=3.0,<4.0",
"protobuf>=3.0,<5.0",
"typing-extensions>=4.0,<5.0",
]
[project.urls]
Homepage = "https://github.com/dbt-labs/dbt-adapters"
Documentation = "https://docs.getdbt.com"
Repository = "https://github.com/dbt-labs/dbt-adapters.git"
Issues = "https://github.com/dbt-labs/dbt-adapters/issues"
Changelog = "https://github.com/dbt-labs/dbt-adapters/blob/main/CHANGELOG.md"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "dbt/adapters/__about__.py"
[tool.hatch.build.targets.sdist]
include = ["dbt/adapters", "dbt/include", "dbt/__init__.py"]
[tool.hatch.build.targets.wheel]
include = ["dbt/adapters", "dbt/include", "dbt/__init__.py"]
[tool.hatch.envs.default]
dependencies = [
"dbt_common @ git+https://github.com/dbt-labs/dbt-common.git",
]
[tool.hatch.envs.lint]
detached = true
dependencies = [
"black>=24.3",
"flake8",
"Flake8-pyproject",
]
[tool.hatch.envs.lint.scripts]
all = [
"- black-only",
"- flake8-only",
]
black-only = "python -m black ."
flake8-only = "python -m flake8 ."
[tool.hatch.envs.typecheck]
dependencies = [
"mypy",
"types-PyYAML",
"types-protobuf",
"types-pytz",
]
[tool.hatch.envs.typecheck.scripts]
all = "python -m mypy ."
[tool.hatch.envs.unit-tests]
dependencies = [
"pytest",
"pytest-dotenv",
"pytest-xdist",
]
[tool.hatch.envs.unit-tests.scripts]
all = "python -m pytest {args:tests/unit}"
[tool.hatch.envs.build]
detached = true
dependencies = [
"wheel",
"twine",
"check-wheel-contents",
]
[tool.hatch.envs.build.scripts]
check-all = [
"- check-wheel",
"- check-sdist",
]
check-wheel = [
"twine check dist/*",
"find ./dist/dbt_adapters-*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/",
"pip freeze | grep dbt-adapters",
]
check-sdist = [
"check-wheel-contents dist/*.whl --ignore W007,W008",
"find ./dist/dbt_adapters-*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/",
"pip freeze | grep dbt-adapters",
]
protobuf = "protoc -I=./dbt/adapters/events --python_out=./dbt/adapters/events ./dbt/adapters/events/adapter_types.proto"
[tool.black]
extend-exclude = "dbt/adapters/events/adapter_types_pb2.py"
line-length = 99
target-version = ['py38']
[tool.flake8]
select = ["E", "W", "F"]
ignore = ["E203", "E501", "E741", "W503", "W504"]
exclude = [
"dbt/adapters/events/adapter_types_pb2.py",
"tests/functional",
"venv",
]
per-file-ignores = ["*/__init__.py: F401"]
[tool.mypy]
namespace_packages = true
show_error_codes = true
explicit_package_bases = true
ignore_missing_imports = true
pretty = true
mypy_path = "third-party-stubs/"
files = [
"dbt",
"tests/unit",
]
exclude = [
"dbt/adapters/events/adapter_types_pb2.py",
"dbt-tests-adapter/dbt/__init__.py", # overlaps with `dbt/__init__.py` as expected for namespaces
"venv",
]
[[tool.mypy.overrides]]
module = ["dbt.adapters.events.adapter_types_pb2"]
follow_imports = "skip"
[tool.pytest]
env_files = ["test.env"]
testpaths = [
"tests/functional",
"tests/unit",
]
color = true
csv = "results.csv"