/
pyproject.toml
156 lines (138 loc) · 4.04 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
[build-system]
requires = [
"setuptools >= 65.3.0", # required by pyproject+setuptools_scm integration
"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" = "sorin.sbarnea@gmail.com" }]
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 :: Only",
"Programming Language :: Python",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
keywords = ["mk"]
[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"
[project.scripts]
mk = "mk.__main__:cli"
[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"
[tool.black]
[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"]
# 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_lines = ["pragma: no cover", "if TYPE_CHECKING:"]
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.isort]
profile = "black"
[tool.mypy]
python_version = 3.9
strict = true
color_output = true
error_summary = true
no_incremental = true
[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]
ignore = [
# temporary disabled until we fix them:
"ANN",
"B",
"T",
"D",
"E",
"PT",
"ERA",
"PTH",
"C901",
"ARG",
"FBT",
"SIM",
"PGH",
"TCH",
"PLR",
"INP",
"RET",
]
select = ["ALL"]
target-version = "py39"
# Same as Black.
line-length = 88
[tool.ruff.flake8-pytest-style]
parametrize-values-type = "tuple"
[tool.ruff.isort]
known-first-party = ["mk"]
[tool.ruff.per-file-ignores]
"test/**/*.py" = ["S"]
[tool.setuptools.dynamic]
optional-dependencies.test = { file = [".config/requirements-test.txt"] }
optional-dependencies.docs = { file = [".config/requirements-docs.txt"] }
dependencies = { file = [".config/requirements.txt"] }
[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "src/mk/_version.py"