-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
261 lines (224 loc) · 7.01 KB
/
pyproject.toml
File metadata and controls
261 lines (224 loc) · 7.01 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
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# This is a comment.
# syntax-documentation:
# - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
#
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
#
# > just install
# > uv sync
# > uv sync --all-groups
# > uv sync --with <groupname>
[build-system]
requires = ["uv_build>=0.9.0,<0.11.0"]
build-backend = "uv_build"
[project]
name = "autoadd_bindir"
version = "1.0.7a0"
description = "Automatically add bin-dir to PATH for every process in your virtualenv."
readme = "docs/readme.md"
authors = [{ name = "Wouter Vanden Hove", email = "wouter@libranet.eu" }]
maintainers = [{ name = "Wouter Vanden Hove", email = "wouter@libranet.eu" }]
requires-python = ">=3.9"
license = { file = "license.md" }
keywords = ["entrypoints", "dotenv", "sitecustomize"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
]
dependencies = [
"python-dotenv>=1.0.0",
"sitecustomize-entrypoints>=1.1.0",
]
[dependency-groups]
dev = ["toml-cli >=0.7.0"]
docs = [
"docutils!=0.21", # Work-around for https://github.com/pypi/warehouse/issues/15749
"markupsafe>=2.1",
"mdformat>=0.7",
"mdformat-gfm>=0.3",
"mdformat-frontmatter>=2.0",
"mdformat-tables>=1.0",
"myst-parser>=3.0",
"sphinx>=7.1",
"sphinx-autoapi>=3.3",
"sphinx-rtd-theme>=3.0",
]
ipython = [
"ipdb>=0.13",
"ipython>=8.12",
"rich>=13.9",
]
linting = [
"pylint>=3.2",
"ruff>=0.8",
]
packaging = ["pyroma>=4.2"]
pre-commit = [
"pre-commit>=3.5",
"pre-commit-hooks>=5.0",
"prek>=0.2",
]
security = [
"bandit[toml]>=1.7",
"safety>=3.5",
]
testing = [
"pytest>=8.3",
"pytest-clarity>=1.0",
"pytest-cov>=5.0",
"pytest-dotenv>=0.5",
"pytest-xdist>=3.6",
]
typing = [
"mypy[reports]>=1.1",
"ty>=0.0",
]
# https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#advanced-plugins
# https://github.com/Darsstar/sitecustomize-entrypoints/blob/main/src/sitecustomize/__init__.py
[project.entry-points.sitecustomize]
autoadd_bindir = "autoadd_bindir:entrypoint"
[project.urls]
homepage = "https://github.com/libranet/autoadd-bindir"
repository = "https://github.com/libranet/autoadd-bindir"
documentation = "https://autoadd-bindir.readthedocs.io"
changelog = "https://github.com/libranet/autoadd-bindir/blob/main/docs/changes.md"
issues = "https://github.com/libranet/autoadd-bindir/issues"
releases = "https://github.com/libranet/autoadd-bindir/releases"
[tool.coverage.html]
directory = "var/html/coverage"
[tool.coverage.xml]
output = "var/html/coverage/coverage.xml"
[tool.coverage.report]
# cfr. https://coverage.readthedocs.io/en/coverage-4.2/excluding.html
fail_under = 90
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
include = ["src/*"]
[tool.coverage.run]
branch = true
data_file = "var/cache/coverage/coverage.db"
[tool.mdformat]
# https://mdformat.readthedocs.io/en/stable/users/configuration_file.html
wrap = "keep" # preserve line wrapping
number = false # don't renumber ordered lists
end_of_line = "lf"
[tool.mypy]
# cfr https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
cache_dir = "${MYPY_CONFIG_FILE_DIR}/var/cache/mypy"
check_untyped_defs = true
disallow_untyped_defs = true
exclude = "^bin/"
ignore_missing_imports = true
mypy_path = ["src"]
pretty = true
[tool.pylint.design]
# complete pylint-config, see https://github.com/PyCQA/pylint/blob/main/pylintrc
exclude-too-few-public-methods = []
max-attributes = 11 # default is 11
[tool.pylint.format]
max-line-length = 120
good-names = [
"i", # counter in loop
]
max-args = 5 # default is 5
[tool.pylint.messages_control]
disable = [
# wontfix
# "W1203", # logging-fstring-interpolation
# "fixme", # Disable reporting of TODO, FIXME, and XXX comments
]
[tool.pytest.ini_options]
cache_dir = "var/cache/pytest"
log_cli = false # enable to show log-output
log_cli_level = "NOTSET"
filterwarnings = []
markers = [ # avoid warnings about unregistered markers
"unit",
"integration",
"slow",
]
testpaths = ["tests"]
pythonpath = ["tests"] # allows for importing helper-module
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/#using-pyprojecttoml
cache-dir = "var/cache/ruff" # relative to project_root
line-length = 120
[tool.ruff.lint]
ignore = [
# COM812 may cause conflicts when used with the ruff formatter
"COM812",
# D211 conflicts with D203 - we prefer D211, so we ignore D203
"D203", # 1 blank line required before class docstring
# D212 conflicts with D213 - we prefer D212, so we ignore D213
"D213", # Multi-line docstring summary should start at the second line
"ERA001", # Found commented-out code
]
select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.isort]
# https://docs.astral.sh/ruff/settings/#lintisort
combine-as-imports = true
force-single-line = false
from-first = false
known-third-party = []
known-first-party = ["autoadd_bindir"]
# known-local-folder = ["_helpers"]
[tool.ruff.lint.per-file-ignores]
"docs/**" = [
"INP001", # docs-dir should not be a python-package
]
"tests/**" = [
"ANN", # Missing type annotation
"D103", # Missing docstring in public function
"INP001", # tests-dir should not be a python-package
"PLC0415", # import should be at the top-level of a file
"S101", # Use of assert detected
]
[tool.ty]
# https://docs.astral.sh/ty/reference/configuration/
[tool.ty.analysis]
# Disable support for `type: ignore` comments
respect-type-ignore-comments = true
[tool.ty.environment]
# extra-paths = ["docs/"]
[tool.ty.rules]
possibly-unresolved-reference = "warn"
division-by-zero = "ignore"
[tool.ty.src]
include = ["src", "tests"]
[tool.uv]
# Settings reference: https://docs.astral.sh/uv/reference/settings/
default-groups = "all"
keyring-provider = "subprocess"
managed = true
package = true
# override-dependencies = ["packaging>=24.0"]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true