-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
194 lines (167 loc) · 4.65 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
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=3.4", "wheel"]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
name = "capella-dockerimages"
requires-python = ">=3.11, <3.12"
license = { text = "Apache-2.0" }
authors = [{ name = "DB InfraGO AG" }]
dependencies = ["PyYAML", "requests", "prometheus_client"]
[project.urls]
Homepage = "https://github.com/DSD-DBS/capella-dockerimages"
[project.optional-dependencies]
test = ["docker>=6.1.0", "pytest", "capellambse[decl]", "chardet"]
dev = [
"black",
"isort",
"mypy",
"pylint",
"types-PyYAML",
"types-lxml",
"types-requests",
]
[tool.black]
line-length = 79
target-version = ["py311"]
[tool.coverage.run]
branch = true
command_line = "-m pytest"
[tool.coverage.report]
exclude_also = [
'if t\.TYPE_CHECKING:',
'class .*\bt\.Protocol\):',
'@abc\.abstractmethod',
'@t\.overload',
]
skip_covered = true
[tool.docformatter]
wrap-descriptions = 72
wrap-summaries = 79
[tool.isort]
profile = 'black'
line_length = 79
[tool.mypy]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unreachable = true
python_version = "3.11"
[[tool.mypy.overrides]]
# Untyped third party libraries
module = ["docker.*"]
ignore_missing_imports = true
[tool.pydocstyle]
convention = "numpy"
add-select = [
"D212", # Multi-line docstring summary should start at the first line
"D402", # First line should not be the function’s “signature”
"D417", # Missing argument descriptions in the docstring
]
add-ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D201", # No blank lines allowed before function docstring # auto-formatting
"D202", # No blank lines allowed after function docstring # auto-formatting
"D203", # 1 blank line required before class docstring # auto-formatting
"D204", # 1 blank line required after class docstring # auto-formatting
"D211", # No blank lines allowed before class docstring # auto-formatting
"D213", # Multi-line docstring summary should start at the second line
]
[tool.pylint.format]
ignore-long-lines = '^\s*(?:(?:__ |\.\. __: )?https?://[^ ]+$|def test_.*|[A-Za-z0-9_\.]+(?: ?:)?$)'
[tool.pylint.master]
init-import = "yes"
load-plugins = ["pylint.extensions.mccabe", "pylint.extensions.bad_builtin"]
max-complexity = 14
max-line-length = 79
extension-pkg-allow-list = ["lxml.builder", "lxml.etree"]
[tool.pylint.messages_control]
disable = [
"broad-except",
"global-statement",
"import-outside-toplevel",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"no-else-break",
"no-else-continue",
"no-else-raise",
"no-else-return",
"protected-access",
"redefined-builtin",
"too-few-public-methods",
"too-many-ancestors",
"too-many-arguments",
"too-many-positional-arguments",
"too-many-boolean-expressions",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-public-methods",
"too-many-return-statements",
"too-many-statements",
# Auto-formatting
"bad-indentation",
"inconsistent-quotes",
"line-too-long",
"missing-final-newline",
"mixed-line-endings",
"multiple-imports",
"multiple-statements",
"trailing-newlines",
"trailing-whitespace",
"unexpected-line-ending-format",
"ungrouped-imports",
"wrong-import-order",
"wrong-import-position",
# Handled by mypy
"arguments-differ",
"assignment-from-no-return",
"import-error",
"missing-kwoa",
"no-member",
"no-value-for-parameter",
"redundant-keyword-arg",
"signature-differs",
"syntax-error",
"too-many-function-args",
"unbalanced-tuple-unpacking",
"undefined-variable",
"unexpected-keyword-arg",
]
enable = [
"c-extension-no-member",
"deprecated-pragma",
"use-symbolic-message-instead",
"useless-suppression",
]
[tool.pytest.ini_options]
addopts = """
--strict-config
--strict-markers
"""
markers = [
"t4c: mark a test that requires a TeamForCapella docker image",
"t4c_server: mark a test that requires a TeamForCapella server docker image",
]
testpaths = ["tests"]
xfail_strict = true
[tool.setuptools]
platforms = ["any"]
zip-safe = false
[tool.setuptools.package-data]
"*" = ["py.typed"]
[tool.setuptools.packages.find]
exclude = ["LICENSES"]
[tool.setuptools_scm]
# This section must exist for setuptools_scm to work
local_scheme = "no-local-version"