-
Notifications
You must be signed in to change notification settings - Fork 16
/
pyproject.toml
200 lines (182 loc) · 5.68 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
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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["kubemarine*"]
[project]
dynamic = ["version", "readme"]
name = "kubemarine"
description = "Management tool for Kubernetes cluster deployment and maintenance"
authors = [
{name = "Kubemarine Group", email = "kubemarinegroup@netcracker.com"},
]
license = {text = "Apache-2.0"}
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
]
keywords = ["kubernetes", "devops", "administration", "helm"]
dependencies = [
"PyYAML==6.0.*",
"deepmerge==1.1.*",
"fabric==3.2.*",
"jinja2==3.1.*",
"MarkupSafe==2.1.*",
"invoke==2.2.*",
"ruamel.yaml==0.18.*",
"pygelf==0.4.*",
"toml==0.10.*",
"python-dateutil==2.9.*",
"deepdiff==7.0.*",
"ordered-set==4.1.*",
# Each time cryptography version is updated, need to regenerate scripts/ci/custom-hooks/hook-cryptography.py
"cryptography==43.0.1",
"paramiko==3.4.*",
"jsonschema==4.22.*",
"referencing==0.35.*",
"typing_extensions==4.11.*",
"pathvalidate==3.2.*",
"useful_types==0.2.*",
"packaging==24.1.*"
]
requires-python = ">=3.8"
[project.optional-dependencies]
ansible = ["ansible==7.7.*"]
mypy = [
"mypy==1.10.*",
"types-PyYAML==6.0.*",
"types-toml==0.10.*",
"types-python-dateutil==2.9.*",
"types-paramiko==3.4.*",
"types-jsonschema==4.22.*",
"types-pyinstaller==6.6.0.*",
]
pylint = [
"pylint==3.1.*"
]
# Auxiliary executable roughly equivalent to python -m kubemarine
# Allows to not worry about exact path to python executable on the client machine
# Should still no be called directly as it does not ensure necessary environment variables.
# Real executables are installed by setup.py
[project.scripts]
_kubemarine = "kubemarine.__main__:main"
[project.urls]
Homepage = "https://github.com/Netcracker/KubeMarine"
Documentation = "https://github.com/Netcracker/KubeMarine#documentation"
Issues = "https://github.com/Netcracker/KubeMarine/issues/"
# To change version with automatic push and triggering of the release workflow use
# 1. pip install bumpver
# 2. bumpver update --set-version <new version>
[tool.bumpver]
current_version = "v0.33.1"
version_pattern = "vMAJOR.MINOR.PATCH"
commit_message = "bump version to {new_version}"
commit = true
tag = true
push = true
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
]
"kubemarine/version" = [
'^{version}$'
]
[tool.pylint.main]
py-version = "3.8"
init-hook = 'import sys; sys.path.append("scripts/thirdparties")'
load-plugins = [
"pylint.extensions.bad_builtin"
]
# Without `fail-under`, pylint fails if at least one message is printed.
# Still, do not remove `fail-on` section, because it has precedence over `disable`,
# and thus prevents from accidental disabling.
# Also, it contains inline recommendations about particular messages.
fail-on = [
# Messages with numerical IDs `E\d+` or `F\d+`.
"E", "F",
# Use logging framework as much as possible instead of print().
"bad-builtin",
# https://github.com/pyinstaller/pyinstaller/issues/1687
"consider-using-sys-exit",
# Considered more error prone because we have __main__ startup dependent on the initial procedure.
"cyclic-import",
# Since we use ruamel.yaml, using of `type() == ` checks is considered more error prone.
"unidiomatic-typecheck",
# Consider using kubemarine.core.utils.open_(external|internal).
"unspecified-encoding",
# List of other warnings that are considered more error prone
"arguments-differ",
"arguments-renamed",
"cell-var-from-loop",
"implicit-str-concat",
"undefined-loop-variable",
]
[tool.pylint.format]
max-line-length = 130
[tool.pylint."messages control"]
disable = [
# Refactor
"duplicate-code",
"inconsistent-return-statements",
"no-else-raise",
"no-else-return",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-public-methods",
"too-many-statements",
# Convention
"consider-using-f-string",
"import-outside-toplevel",
"invalid-name",
"missing-final-newline",
"missing-function-docstring",
"missing-module-docstring",
"missing-class-docstring",
"trailing-newlines",
"trailing-whitespace",
"typevar-name-incorrect-variance",
# Warnings
"broad-exception-caught",
"broad-exception-raised",
"f-string-without-interpolation",
"fixme",
"redefined-outer-name",
"unnecessary-pass",
]
[tool.pylint.deprecated_builtins]
bad-functions = ["print"]
[tool.mypy]
files = ["kubemarine", "scripts"]
# various configuration and code checks
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
# strict typing checks
check_untyped_defs = true
strict_equality = true
extra_checks = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
disallow_untyped_calls = true
warn_return_any = true
# permissive configuration
implicit_optional = true
# https://github.com/python/mypy/issues/12664
incremental = false