forked from databrickslabs/ucx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (156 loc) · 3.77 KB
/
Copy pathpyproject.toml
File metadata and controls
178 lines (156 loc) · 3.77 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
sources = ["src"]
include = ["src"]
[project]
name = "databricks-labs-ucx"
dynamic = ["version"]
description = 'UCX - Unity Catalog Migration Toolkit'
readme = "README.md"
license-files = { paths = ["LICENSE", "NOTICE"] }
requires-python = ">=3.10.6" # latest available in DBR 13.2
keywords = ["Databricks", "Unity Catalog"]
authors = [
{ name = "Serge Smertin", email = "serge.smertin@databricks.com" },
{ name = "Ivan Trusov", email = "ivan.trusov@databricks.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: Other/Proprietary License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"databricks-sdk~=0.13.0",
"PyYAML>=6.0.0,<7.0.0",
]
[project.optional-dependencies]
test = [
"coverage[toml]>=6.5",
"pytest",
"pytest-cov>=4.0.0,<5.0.0",
"pytest-mock>=3.0.0,<4.0.0",
]
[project.entry-points.databricks]
runtime = "databricks.labs.ucx.runtime:main"
[project.urls]
Issues = "https://github.com/databricks/ucx/issues"
Source = "https://github.com/databricks/ucx"
[tool.hatch.version]
path = "src/databricks/labs/ucx/__about__.py"
[tool.hatch.envs.unit]
dependencies = [
"databricks-labs-ucx[test]"
]
[tool.hatch.envs.unit.scripts]
test = "pytest --cov src --cov-report=xml tests/unit"
test-cov-report = "pytest --cov src tests/unit --cov-report=html"
[tool.hatch.envs.integration]
dependencies = [
"databricks-labs-ucx[test]",
]
[tool.hatch.envs.integration.scripts]
test = "pytest --cov src tests/integration"
[tool.hatch.envs.lint]
detached = true
dependencies = [
"black>=23.1.0",
"ruff>=0.0.243",
"isort>=2.5.0"
]
[tool.hatch.envs.lint.scripts]
fmt = [
"isort .",
"black .",
"ruff . --fix",
]
verify = [
"black --check .",
"isort . --check-only",
"ruff .",
]
[tool.isort]
skip_glob = [
"notebooks/*.py"
]
profile = "black"
[tool.pytest.ini_options]
addopts = "-s -p no:warnings -vv --cache-clear"
[tool.black]
target-version = ["py310"]
line-length = 120
skip-string-normalization = true
[tool.ruff]
target-version = "py310"
line-length = 120
select = [
"A",
"ARG",
"B",
"C",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords and SQL statement construction
"S105", "S106", "S107", "S603", "S608",
# Allow print statements
"T201",
# Allow asserts
"S101",
# Allow standard random generators
"S311",
# Ignore complexity
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
# Ignore flaky Import block is un-sorted or un-formatted
"I001"
]
extend-exclude = [
"notebooks/*.py"
]
[tool.ruff.isort]
known-first-party = ["databricks.labs.ucx"]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
"tests/**/*" = [
"PLR2004", "S101", "TID252", # tests can use magic values, assertions, and relative imports
"ARG001" # tests may not use the provided fixtures
]
"src/databricks/labs/ucx/mixins/redash.py" = ["A002", "A003", "N815"]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
omit = ["src/databricks/labs/ucx/mixins/*", "*/working-copy/*", "*/fresh_wheel_file/*"]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]