-
Notifications
You must be signed in to change notification settings - Fork 76
/
pyproject.toml
279 lines (258 loc) · 6.83 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
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# SPDX-FileCopyrightText: 2019–2024 Pynguin Contributors
#
# SPDX-License-Identifier: MIT
[tool.poetry]
name = "pynguin"
version = "0.39.0"
description = "Pynguin is a tool for automated unit test generation for Python"
authors = ["Stephan Lukasczyk <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/se2p/pynguin"
documentation = "https://pynguin.readthedocs.io"
homepage = "https://www.pynguin.eu"
keywords = [
"unit test",
"random testing",
"search based",
"test generation"
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Education :: Testing",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Unit",
"Typing :: Typed",
]
packages = [
{ include = "pynguin", from = "src" }
]
include = [
{ path = "tests", format = "sdist" }
]
[tool.poetry.dependencies]
python = ">=3.10, <3.11"
astroid = "^3.2.2"
black = "^24.4.2"
bytecode = "^0.15.1"
jellyfish = "^1.0.4"
Jinja2 = "^3.1.4"
networkx = "^3.3"
rich = "^13.7.1"
Pygments = "^2.18.0"
pytest = "^8.2.2"
simple-parsing = "^0.1.5"
typing_inspect = "^0.9.0"
asciitree = "^0.3.3"
libcst = "^1.4.0"
[tool.poetry.group.dev.dependencies]
isort = {extras = ["pyproject"], version = "^5.13.2"}
mypy = "^1.10.0"
pre-commit = "^3.7.1"
pyupgrade = "^3.16.0"
ruff = "^0.4"
[tool.poetry.group.docs.dependencies]
sphinx = "^7.3.7"
sphinx-autodoc-typehints = "^2.2"
sphinx-hoverxref = "^1.3.0"
sphinx-rtd-theme = "^2.0.0"
sphinx-selective-exclude = "^1.0.3"
[tool.poetry.group.test.dependencies]
coverage = "^7.5.3"
hypothesis = "^6.103"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
pytest-picked = "^0.5.0"
pytest-sugar = "^1.0.0"
[tool.poetry.scripts]
pynguin = "pynguin.cli:main"
[tool.black]
line-length = 88
target_version = ['py310']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.pytest_cache
| \.mypy_cache
| \.venv
| venv
| _build
| build
| dist
| pynguin.egg-info
)/
)
'''
[tool.coverage.run]
branch = true
source = ["src/pynguin", "tests"]
omit = ["tests/fixtures/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:"
]
[tool.coverage.html]
directory = "cov_html"
[tool.isort]
py_version = 310
profile = "black"
force_single_line = true
combine_as_imports = true
lines_between_types = 1
lines_after_imports = 2
src_paths = [ "src", "tests"]
[tool.mypy]
files = "src"
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
show_error_codes = true
enable_error_code = [
"ignore-without-code",
"truthy-bool",
]
check_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
strict_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
[tool.pytest.ini_options]
testpaths = [
"tests",
]
# A lot of our own classes start with Test so pytest will pick them up during test collection.
# But they don't actually contains tests, so we set an empty matcher for the class name.
python_classes = ''
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# Assume Python 3.10.
target-version = "py310"
line-length = 88
preview = true
src = ["src", "tests"]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"docs",
"node_modules",
"venv",
"tests/fixtures/*.py",
"tests/fixtures/*.pyi",
]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # bugbear
"BLE", # flake8-blind-except
"CPY", # flake8-copyright
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle
"ERA", # flake8-eradicate
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # flake8-naming
"NPY", # numpy
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff
"S", # flake8-bandig
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"T20", # flake8-print
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"ARG002", # unused method argument
"B019", # functools.lru_cache might cause memory leaks
"CPY001", # missing copyright notice at top of file
"D105", # missing docstrings in magic methods
"FIX002", # valid TODO comments
"PLR0911", # do not complain about too many return statements
"PLR0912", # do not complain about too many branches
"PLR0913", # do not complain about too many arguments to function call
"PLR2004", # magic values in comparisons
"PLR6301", # method could be a function, class method, or static method
"RUF003", # comment contains ambiguous en dash
"S101", # do not complain about using assert statements
]
# Allow unused variables when underscore-prefixed:
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"PT006", # Wrong name(s) type in `@pytest.mark.parameterize`, expected `tuple`
"S101", # Use of `assert` detected
"SLF001", # Private member accessed
]