forked from yandex/ch-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
171 lines (148 loc) · 4.41 KB
/
pyproject.toml
File metadata and controls
171 lines (148 loc) · 4.41 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
[project]
name = "ch-backup"
description = "Backup tool for ClickHouse DBMS."
license = "MIT"
readme = "README.md"
homepage = "https://github.com/yandex/ch-backup"
repository = "https://github.com/yandex/ch-backup"
dynamic = ["version"]
requires-python = ">=3.10"
keywords=[
"clickhouse",
"database",
"administration",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Environment :: Console",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Typing :: Typed",
]
dependencies = [
"boto3 >= 1.24, < 1.36",
"click >= 8.1, < 8.2",
"cloup >= 3.0",
"humanfriendly >= 10.0",
"kazoo >= 2.10",
"loguru >= 0.7",
"packaging",
"psutil >= 7.0",
"pynacl >= 1.2",
"pypeln >= 0.4.9",
"pyyaml >= 5.4",
"requests >= 2.20",
"tabulate >= 0.9",
"tenacity >= 8.3",
"xmltodict >= 0.14",
"setuptools >= 71, < 81", # for the library "stopit" (dependency of "pypeln")
]
[dependency-groups]
dev = [
"behave >= 1.2.6",
"black >= 25.1",
"codespell >= 2.4.1",
"deepdiff >= 8.0",
"docker >= 4.0",
"hypothesis >= 6.131.9",
"isort >= 6.0",
"jinja2 >= 3.1.6",
"mypy >= 1.10, < 1.19",
"mypy-boto3-s3 >= 1.38",
"pyhamcrest >= 2.1",
"pylint >= 3.0, < 4.0",
"pytest >= 8.3.5",
"ruff >= 0.11.8",
"types-kazoo",
"types-pyyaml",
"types-requests",
"types-tabulate",
]
[project.scripts]
ch-backup = "ch_backup:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "ch_backup/version.txt"
pattern = "(?P<version>.+)"
[tool.hatch.build]
ignore-vcs = true # to prevent excluding generated files
only-include = ["ch_backup"]
[tool.isort]
profile = "black"
[tool.codespell]
ignore-words-list = "sav,fpr"
[tool.ruff]
lint.select = ["E", "F", "W", "A", "S"]
lint.ignore = [
"A003", # "Class attribute is shadowing a Python builtin"
"A005", # Module `logging` shadows a Python standard-library module
"E402", # "Module level import not at top of file", duplicate corresponding pylint check
"E501", # "Line too long"
"S101", # Use of `assert` detected
"S108", # Probable insecure usage of temporary file or directory
"S110", # `try`-`except`-`pass` detected, consider logging the exception"
"S113", # Probable use of `requests` call without timeout
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S324", # Probable use of insecure hash functions in `hashlib`: `md5`
"S602", # `subprocess` call with `shell=True
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Unused import
"tests/**" = ["S"] # Disable security checks in tests
[tool.pylint.main]
py-version = "3.10" # Minimum Python version to use for version dependent checks
jobs = 4 # Use multiple processes to speed up Pylint
ignored-modules = [ # List of module names for which member attributes should not be checked
"behave",
"requests.packages",
]
[tool.pylint."messages control"]
disable = [
"broad-exception-caught",
"duplicate-code",
"fixme",
"inconsistent-return-statements",
"line-too-long",
"raise-missing-from",
"too-few-public-methods",
"unnecessary-pass",
"use-dict-literal",
"wrong-import-position",
]
[tool.pylint.basic]
include-naming-hint = true
[tool.pylint.design]
max-args = 10
max-locals = 18
max-branches = 14
max-attributes = 10
max-public-methods = 30
[tool.pylint.refactoring]
max-nested-blocks = 7
[tool.pylint.reports]
score = false
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
disallow_incomplete_defs = true
check_untyped_defs = true
implicit_optional = true
[[tool.mypy.overrides]]
module = "ch_backup.cli"
disable_error_code = "arg-type" # Suppress errors related to Click library usage
[[tool.mypy.overrides]]
module = "tests.integration.steps.*"
disable_error_code = "arg-type,call-overload" # Suppress errors related to PyHamcrest library usage