-
Notifications
You must be signed in to change notification settings - Fork 30
/
pyproject.toml
134 lines (113 loc) · 3.99 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
[tool.poetry]
name = "pytest-split"
version = "0.10.0"
description = "Pytest plugin which splits the test suite to equally sized sub suites based on test execution time."
authors = [
"Jerry Pussinen <[email protected]>",
]
license = "MIT"
readme = "README.md"
documentation = "https://jerry-git.github.io/pytest-split"
homepage = "https://jerry-git.github.io/pytest-split"
repository = "https://github.com/jerry-git/pytest-split"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = ['pytest', 'plugin', 'split', 'tests']
packages = [{ include = 'pytest_split', from = 'src' }]
[tool.poetry.dependencies]
python = ">=3.8.1, <4.0"
pytest = "^5 | ^6 | ^7 | ^8"
[tool.poetry.dev-dependencies]
importlib-metadata = "==4.11.*"
mkdocstrings = {version = ">=0.18", extras = ["python"]}
mkdocs-material = "*"
mypy = "*"
pre-commit = "*"
pymdown-extensions = "*"
pytest = "*"
pytest-github-actions-annotate-failures = "*"
pytest-cov = "*"
python-kacl = "*"
ruff = ">=0.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
slowest-tests = "pytest_split.cli:list_slowest_tests"
[tool.poetry.plugins.pytest11]
pytest-split = "pytest_split.plugin"
[tool.black]
target-version = ["py37", "py38", "py39"]
include = '\.pyi?$'
[tool.pytest.ini_options]
addopts = """\
--cov pytest_split \
--cov tests \
--cov-report term-missing \
--no-cov-on-fail \
"""
[tool.coverage.report]
fail_under = 90
exclude_lines = [
'if TYPE_CHECKING:',
'pragma: no cover'
]
[tool.mypy]
# This is the global mypy configuration.
# Avoid changing this!
strict = true # See all the enabled flags `mypy --help | grep -A 10 'Strict mode'`
disallow_any_unimported = true
[[tool.mypy.overrides]]
module = ['tests.*']
disallow_untyped_defs = false
strict_equality = false
disallow_untyped_calls = false
[tool.ruff]
target-version = "py38" # The lowest supported version
[tool.ruff.lint]
# By default, enable all the lint rules.
# Add to the ignore list below if you don't want some rules.
# If you need some ignores for certain modules, see tool.ruff.lint.per-file-ignores below.
# For individual ignore cases, prefer inline `# noqa`s within the code.
select = ["ALL"]
ignore = [
"ANN", # Type hints related, let mypy handle these.
"COM812", # "Trailing comma missing". If black is happy, I'm happy.
"D", # Docstrings related
"E501", # "Line too long". If black is happy, I'm happy.
"EM101", # "Exception must not use a string literal, assign to variable first"
"EM102", # "Exception must not use an f-string literal, assign to variable first"
"PTH", # User Pathlib stuff over os.*. Should migrate to Pathlib at some point.
"RET504", # "Unnecessary variable assignment before `return` statement"
"S101", # "Use of `assert` detected"
"SIM108", # "Use ternary operator ...". Ternary is harmful for readability in some cases.
"TRY003", # "Avoid specifying long messages outside the exception class"
"FA100", # "Missing `from __future__ import annotations` ..." pytest-split supports a range of Python versions
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"S101", # "Use of `assert` detected"
"ARG", # "Unused function argument". Fixtures are often unused.
"S105", # "Possible hardcoded password".
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"classmethod",
"pydantic.validator",
"pydantic.root_validator",
]