Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
289 lines (267 loc) · 8.51 KB
/
Copy pathpyproject.toml
File metadata and controls
289 lines (267 loc) · 8.51 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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
[project]
name = "mimesis"
version = "22.2.0"
description = "Mimesis: Fake Data Generator."
authors = [{ name = "Isaak Uchakaev", email = "hey@isaak.dev" }]
requires-python = ">=3.10"
readme = "README.md"
license = "MIT"
keywords = [
"data",
"datascince",
"database",
"dummy",
"fake",
"faker",
"fixtures",
"generate",
"mimesis",
"mock",
"schema",
"dataframe",
"populate",
"testing",
"pandas",
"polars",
"pytest",
"factory",
"factory_boy",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"Topic :: Utilities",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
"License :: OSI Approved :: MIT License",
]
dependencies = []
[project.optional-dependencies]
factory = ["factory-boy>=3.3.0,<4"]
[project.urls]
Homepage = "https://github.com/lk-geimfari/mimesis"
Repository = "https://github.com/lk-geimfari/mimesis"
Documentation = "https://mimesis.name"
[project.entry-points."pytest_randomly.random_seeder"]
mimesis = "mimesis.entrypoints:pytest_randomly_reseed"
[dependency-groups]
dev = [
"pytest~=7.2",
"pytest-mock~=3.10",
"requests~=2.28",
"mypy~=1.1",
"colorama>=0.4.6,<0.5",
"pygments~=2.13",
"pytest-randomly~=3.12",
"pytz~=2023.3",
"ruff>=0.12.0",
"types-pytz~=2023.3",
"taskipy>=1.10.1,<2",
"validators>=0.20.0,<0.21",
"pytest-repeat>=0.9.1,<0.10",
"coverage>=7.2.3,<8",
"pytest-cov>=4.0.0,<5",
"Sphinx>=5.1.1,<8.0.0",
"sphinx-copybutton>=0.5.0,<0.6",
"sphinx-autodoc-typehints>=1.19.2,<2",
"furo>=2024.8.6",
"pytest-factoryboy>=2.6.0,<3",
"twine>=7.0.0",
]
[tool.hatch.build.targets.sdist]
exclude = ["mimesis/datasets/locale_template"]
[tool.hatch.build.targets.wheel]
exclude = ["mimesis/datasets/locale_template"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
exclude = ["tests", "docs", "benchmarks"]
files = ["mimesis"]
strict_optional = true
check_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
warn_no_return = false
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_return_any = true
strict_equality = true
[tool.ruff]
target-version = "py310"
line-length = 88
src = ["mimesis", "tests"]
extend-exclude = [
"docs",
"mimesis/datasets/locale_template",
"benchmarks/performance_comparison.py",
]
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe complexity
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TC", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # perflint
"FURB", # refurb
"RUF", # Ruff-specific
]
ignore = [
# Formatter conflicts
"COM812", # trailing-comma-missing — conflicts with ruff format
"ISC001", # implicit-str-concat — conflicts with ruff format
# Docstyle: Sphinx/RST ``:param:`` style, not Google/NumPy
"D100", # missing-module-docstring (many dataset modules)
"D104", # missing-package-docstring
"D105", # missing-magic-method-docstring
"D106", # undocumented-public-nested-class (Meta nested classes)
"D107", # missing-__init__-docstring
"D203", # incorrect-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
"D401", # non-imperative-mood (project uses mixed moods)
"D406", # new-line-after-section-name (RST sections)
"D407", # missing-dashed-underline-after-section
"D413", # missing-blank-line-after-last-section
# Library / API ergonomics
"A003", # builtin-attribute-shadowing (e.g. ``id``, ``type`` fields)
"A005", # stdlib-module-shadowing (``mimesis.random``, ``mimesis.types``)
"DTZ", # naive datetimes are intentional for fake data
"EM101", # exception message assignment style is too pedantic here
"EM102", # f-string in exception — same
"PLC0415", # import-outside-top-level (lazy imports are intentional)
"PLR0913", # too-many-arguments (provider APIs)
"PLR2004", # magic-value-comparison (OK in data generators)
"TRY003", # raise-vanilla-args (short messages are fine)
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"D", # tests need not carry full docstring coverage
"S101", # assert is expected in tests
"S105", # hardcoded passwords in fixtures
"S106", # hardcoded passwords in fixtures
"S301", # pickle used in export tests
"S311", # pseudo-random for tests
"SLF001", # private member access in tests
"ARG001", # unused fixture args
"ARG002", # unused method args in mocks
"ARG005", # unused lambda args in fixtures/mocks
"PLR0915", # too many statements in large tests
"PLR0912", # too many branches in large tests
"INP001", # namespace packages in tests
"N803", # argument name conventions in fixtures
"TID252", # relative imports in test packages
"RUF001", # unicode in locale/assertion fixtures
# Existing pytest style; keep PT001/PT003/etc. for real footguns
"PT006", # parametrize names as string vs tuple
"PT007", # parametrize values as list vs tuple
"PT011", # broad ``pytest.raises(Exception)`` in negative tests
"PT012", # multi-statement raises blocks
"PT018", # composite assertions
"PT019", # fixture without default in signature
]
"mimesis/datasets/**/*.py" = [
"E501", # long data strings
"F403", # star-imports re-export datasets
"F405", # undefined names from star-imports
"RUF001", # ambiguous unicode in locale data
"RUF002",
"RUF003",
]
"mimesis/builder/**/*.py" = [
"SLF001", # intentional private access between builder types
]
"tasks/**/*.py" = [
"T20",
"INP001",
"D", # internal scripts
"E501", # colorful CLI output lines
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.isort]
known-first-party = ["mimesis"]
combine-as-imports = true
force-wrap-aliases = true
lines-after-imports = 2
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.pylint]
max-args = 8
max-branches = 12
max-returns = 8
max-statements = 50
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.taskipy.tasks]
minify = "python tasks/minifier.py"