-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
186 lines (170 loc) · 4.84 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
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[tool.distutils.bdist_wheel]
universal = true
[tool.setuptools.package-dir]
metadata_pepxxx = "metadata_pepxxx"
[project]
name = "metadata_pepxxx"
version = "0.0.1.dev1"
description = "A library to prototype the METADATA PEP XXX"
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE"}
authors = [
{name = "Michael Sarahan", email = "[email protected]" },
{name = "Jonathan Dekhtiar", email = "[email protected]" }
]
maintainers = [
{name = "Michael Sarahan", email = "[email protected]" },
{name = "Jonathan Dekhtiar", email = "[email protected]" }
]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 3 - Alpha",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Topic :: Utilities",
# Pick your license as you wish
"License :: OSI Approved :: Apache Software License",
# Not OS Specific
"Operating System :: OS Independent",
# Specify the Python versions you support here. In particular, ensure
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "requires-python" key in this file.
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"tomlkit>=0.13,<0.14"
]
[project.optional-dependencies]
dev = [
"check-manifest",
# Pre Commit Hooks
"pre-commit>=3.6.0,<3.7",
# Linting
"ruff>=0.3,<0.4"
]
test = [
"pytest>=8.0.0,<9.0.0",
"pytest-cov>=5.0.0,<6.0.0",
"pytest-dotenv>=0.5.0,<1.0.0",
"pytest-env>=1.1.3,<2.0.0",
"pytest-runner>=6.0.0,<7.0.0",
"pytest-ordering>=0.6,<1.0.0",
"parameterized>=0.9.0,<0.10"
]
[project.urls]
[project.scripts]
metadata_pepxxx = "metadata_pepxxx.commands.main:main"
[project.entry-points."metadata_pepxxx.actions"]
convert = "metadata_pepxxx.commands.convert:convert"
[tool.isort]
profile = "black"
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
# at least this three should be fine in tests:
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"C90",
"I",
"N",
"UP",
"YTT",
# "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"DJ",
"EM",
"EXE",
"FA",
'ISC',
"ICN",
"G",
'INP',
'PIE',
"T20",
'PYI',
'PT',
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
# "ARG", # Unused function argument
"PTH",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
# "NPY",
# "AIR",
"PERF",
# "FURB",
# "LOG",
"RUF"
]
ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # sometimes it's better to nest
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
# of types for comparison.
# Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871
"EM101", # Checks for the use of string literals in exception constructors.
"EM102", # Checks for the use of f-strings in exception constructors.
"TRY003", # Checks for long exception messages that are not defined in the
# exception class itself.
"G004", # Checks for uses of f-strings to format logging messages.
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = ["UP038"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
indent-style = "space"
[tool.pytest.ini_options]
testpaths = [
"tests/",
]
addopts = "-vvv --cov=metadata_pepxxx --cov-report=term-missing"
# addopts = "-vvv --cov=metadata_pepxxx --cov-report=term-missing --capture=no"