forked from litestar-org/polyfactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
271 lines (253 loc) · 6.71 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
[tool.poetry]
name = "polyfactory"
version = "2.7.0"
description = "Mock data generation factories"
authors = [
"Na'aman Hirschfeld <[email protected]>",
"Cody Fincher <[email protected]>",
"Janek Nouvertné <[email protected]>",
"Jacob Coffee <[email protected]>",
]
maintainers = [
"Na'aman Hirschfeld <[email protected]>",
"Cody Fincher <[email protected]>",
"Janek Nouvertné <[email protected]>",
"Jacob Coffee <[email protected]>",
]
license = "MIT"
readme = "docs/PYPI_README.md"
homepage = "https://github.com/litestar-org/polyfactory"
repository = "https://github.com/litestar-org/polyfactory"
documentation = "https://github.com/litestar-org/polyfactory"
keywords = [
"dataclasses",
"factory",
"msgspec",
"pydantic",
"testing",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Testing :: Unit",
"Topic :: Software Development :: Testing",
"Topic :: Software Development",
"Topic :: Utilities",
"Typing :: Typed",
]
packages = [{ include = "polyfactory" }]
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
beanie = { version = "*", optional = true }
faker = "*"
msgspec = { version = "*", optional = true }
odmantic = { version = "*", optional = true }
pydantic = { version = "*", optional = true, extras = ["email"] }
typing-extensions = "*"
attrs = { version = "*", optional = true }
[tool.poetry.group.dev.dependencies]
hypothesis = "*"
mongomock-motor = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"
[tool.poetry.group.docs.dependencies]
auto-pytabs = "*"
blacken-docs = "*"
litestar-sphinx-theme = { git = "https://github.com/litestar-org/litestar-sphinx-theme.git" }
sphinx = "*"
sphinx-autobuild = "*"
sphinx-copybutton = "*"
sphinxcontrib-mermaid = "*"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
black = "*"
blacken-docs = "*"
mypy = "*"
pre-commit = "*"
pyright = "*"
ruff = '*'
sourcery = "*"
[tool.poetry.extras]
pydantic = ["pydantic"]
msgspec = ["msgspec"]
odmantic = ["odmantic", "pydantic"]
beanie = ["beanie", "pydantic"]
attrs = ["attrs"]
full = [
"pydantic",
"odmantic",
"msgspec",
"beanie",
"attrs",
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
include = '\.pyi?$'
[tool.pyright]
include = ["polyfactory", "tests", "examples"]
[tool.coverage.run]
omit = ["*/tests/*"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
filterwarnings = [
"ignore:.*pkg_resources.declare_namespace\\('sphinxcontrib'\\).*:DeprecationWarning",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
# Get rid those above once sphinxcontrib-mermaid doesn't use pkg_resources anymore
# https://github.com/mgaitan/sphinxcontrib-mermaid/issues/119
]
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'except ImportError:',
'except ImportError as e:',
'\.\.\.',
]
[tool.ruff]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"ERA", # eradicate
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PLC", # pylint - convention
"PLE", # pylint - error
"PLW", # pylint - warning
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle - warning
"YTT", # flake8-2020
]
ignore = [
"A003", # flake8-builtins - class attribute {name} is shadowing a python builtin
"B010", # flake8-bugbear - do not call setattr with a constant attribute value
"D100", # pydocstyle - missing docstring in public module
"D101", # pydocstyle - missing docstring in public class
"D102", # pydocstyle - missing docstring in public method
"D103", # pydocstyle - missing docstring in public function
"D104", # pydocstyle - missing docstring in public package
"D105", # pydocstyle - missing docstring in magic method
"D106", # pydocstyle - missing docstring in public nested class
"D107", # pydocstyle - missing docstring in __init__
"D202", # pydocstyle - no blank lines allowed after function docstring
"D205", # pydocstyle - 1 blank line required between summary line and description
"D415", # pydocstyle - first line should end with a period, question mark, or exclamation point
"E501", # pycodestyle line too long, handled by black
"N818", # pep8-naming - exception name should be named with an Error suffix
"S311", # flake8-bandit - Standard pseudo-random generators are not suitable for security/cryptographic purposes
"UP037", # pyupgrade - removes quotes from type annotation
]
line-length = 120
src = ["polyfactory", "tests", "docs/examples"]
target-version = "py38"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.pep8-naming]
classmethod-decorators = [
"classmethod",
"pydantic.validator",
"pydantic.root_validator",
"sqlalchemy.ext.declarative.declared_attr",
]
[tool.ruff.isort]
known-first-party = ["polyfactory", "tests"]
[tool.ruff.per-file-ignores]
"polyfactory/field_meta.py" = ["N806"]
"tests/**/*.*" = [
"S101",
"D",
"ARG",
"PGH",
"B",
"FBT",
"PTH",
"A",
"TCH",
"DTZ",
"TRY",
"EM",
"S",
"N",
"SIM",
"PLR",
"BLE",
"RSE",
"C901",
"PLW",
"G",
"PIE",
"RUF012",
]
"docs/examples/tests/**/*.*" = [
"S101",
"D",
"ARG",
"PGH",
"B",
"FBT",
"PTH",
"A",
"TCH",
"DTZ",
"TRY",
"EM",
"S",
"N",
"SIM",
"PLR",
"BLE",
"RSE",
"C901",
"PLW",
"G",
"PIE",
]
"docs/**/*.*" = [
"S",
"B",
"DTZ",
"A",
"TCH",
"ERA",
"D",
"RET",
"E731",
"RUF012",
]