-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
83 lines (76 loc) · 2.24 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
[project]
dynamic = ["version", "description"]
name = "legacy-api-wrap"
authors = [{ name = "Philipp A.", email = "flying-sheep@web.de" }]
urls.Source = "https://github.com/flying-sheep/legacy-api-wrap"
readme = "README.rst"
license = "GPL-3.0-or-later"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = []
[project.optional-dependencies]
test = [
"pytest",
"coverage",
"coverage-rich",
"anyconfig[toml] >=0.14", # coverage-rich uses anyconfig
]
[tool.ruff]
line-length = 100
select = ["ALL"]
ignore = [
"D203", # zero instead of one blank lines before class
"D213", # multiline summary on first instead of second line
]
allowed-confusables = ["’"]
[tool.ruff.isort]
known-first-party = ["legacy_api_wrap"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.extend-per-file-ignores]
"src/testing/*.py" = ["INP001"]
"tests/**/test_*.py" = [
"D100", # tests need no module docstrings
"D103", # tests need no function docstrings
"INP001", # tests should not have __init__.py
"PLR2004", # tests use magic values
"S101", # tests use `assert`
]
[tool.mypy]
strict = true
explicit_package_bases = true
mypy_path = "src"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
"-Werror",
"-ptesting.legacy_api_wrap.pytest",
"--doctest-modules",
"--doctest-glob=*.rst",
]
[tool.coverage]
run.data_file = "test-data/coverage"
xml.output = "test-data/coverage.xml"
html.directory = "test-data/htmlcov"
run.omit = ["src/testing/*", "tests/*"]
report.exclude_also = ["if TYPE_CHECKING:"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["src/legacy_api_wrap", "src/testing/legacy_api_wrap"]
[tool.hatch.envs.test]
features = ["test"]
[tool.hatch.envs.test.scripts]
run = "pytest {args}"
cov = "coverage run -m pytest {args} && coverage-rich report && coverage html"
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-docstring-description"]
build-backend = "hatchling.build"