-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
195 lines (176 loc) · 5.05 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
[build-system]
requires = [
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration and editable installs
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
]
build-backend = "setuptools.build_meta"
[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.9"
dynamic = ["version", "dependencies", "optional-dependencies"]
name = "mk"
description = "mk"
readme = "docs/README.md"
authors = [{ "name" = "Sorin Sbarnea", "email" = "[email protected]" }]
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
keywords = ["mk"]
[project.scripts]
mk = "mk.__main__:cli"
pre = "mk.pre:app"
[project.entry-points."mk_tools"]
ansible = "mk.tools.ansible:AnsibleTool"
cmake = "mk.tools.cmake:CMakeTool"
git = "mk.tools.git:GitTool"
make = "mk.tools.make:MakeTool"
node = "mk.tools.node:NodeTool"
pypackage = "mk.tools.py_package:PyPackageTool"
pytest = "mk.tools.pytest:PyTestTool"
pre-commit = "mk.tools.pre_commit:PreCommitTool"
shell = "mk.tools.shell:ShellTool"
taskfile = "mk.tools.taskfile:TaskfileTool"
tox = "mk.tools.tox:ToxTool"
nox = "mk.tools.nox:NoxTool"
pre = "mk.tools.pre:PreTool"
[project.urls]
homepage = "https://github.com/pycontribs/mk"
documentation = "https://mk.readthedocs.io/"
repository = "https://github.com/pycontribs/mk"
changelog = "https://github.com/pycontribs/mk/releases"
[tool.black]
# keep this value because typer does not accept new annotations such str | None
# from https://peps.python.org/pep-0604/
target-version = ["py39"]
# Keep this default because xml/report do not know to use load it from config file:
# data_file = ".coverage"
[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.coverage.report]
exclude_also = ["pragma: no cover", "if TYPE_CHECKING:"]
omit = ["test/*"]
# Increase it just so it would pass on any single-python run
fail_under = 45
skip_covered = true
skip_empty = true
# During development we might remove code (files) with coverage data, and we dont want to fail:
ignore_errors = true
show_missing = true
[tool.coverage.run]
source = ["src"]
# Do not use branch until bug is fixes:
# https://github.com/nedbat/coveragepy/issues/605
# branch = true
parallel = true
concurrency = ["multiprocessing", "thread"]
[tool.isort]
profile = "black"
[tool.mypy]
python_version = "3.9"
strict = true
color_output = true
error_summary = true
no_incremental = true
[tool.pip-tools]
no_annotate = true
quiet = true
[tool.pip-tools.compile]
all_extras = true
output_file = ".config/constraints.txt"
strip_extras = true
unsafe_package = [
"backports-tarfile",
"cryptography",
"exceptiongroup",
"jeepney",
"secretstorage",
"twine",
]
[tool.pylint."MESSAGES CONTROL"]
# increase from default is 50 which is too aggressive
max-statements = 60
disable = [
# Disabled on purpose (explain in comment)
"line-too-long", # black managed
"wrong-import-position", # isort managed
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
"dangerous-default-value",
"invalid-name",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"no-value-for-parameter",
"not-an-iterable",
"too-few-public-methods",
]
[tool.ruff]
# keep this as typer does not support new annotations format
target-version = "py39"
# Same as Black.
line-length = 88
lint.ignore = [
# Disabled due to typer not supporting new annotations format
"UP007",
# temporary disabled until we fix them:
"ANN",
"B",
"T",
"D",
"E",
"PT",
"ERA",
"PTH",
"C901",
"ARG",
"FBT",
"SIM",
"PGH",
"TCH",
"PLR",
"INP",
"RET",
]
lint.select = ["ALL"]
[tool.ruff.lint.flake8-pytest-style]
parametrize-values-type = "tuple"
[tool.ruff.lint.isort]
known-first-party = ["mk"]
[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = ["S"]
[tool.setuptools.dynamic]
dependencies = { file = [".config/requirements.txt"] }
optional-dependencies.test = { file = [".config/requirements-test.txt"] }
optional-dependencies.docs = { file = [".config/requirements-docs.txt"] }
[tool.setuptools_scm]
local_scheme = "no-local-version"
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
write_to = "src/mk/_version.py"
# To prevent accidental pick of mobile version tags such 'v6'
git_describe_command = [
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--match",
"v*.*",
]