-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (139 loc) · 2.89 KB
/
pyproject.toml
File metadata and controls
148 lines (139 loc) · 2.89 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
[project]
name = "test-project"
version = "3.0.20260414"
description = "A test project"
readme = "README.md"
requires-python = ">=3.13"
license = { file = "LICENSE" }
authors = [
{ name = "Test Author", email = "testuser@users.noreply.github.com" }
]
maintainers = [
{ name = "Test Author", email = "testuser@users.noreply.github.com" }
]
dependencies = [
"fire>=0.7.1",
]
[project.urls]
Repository = "https://github.com/testuser/test-project"
Documentation = "https://github.com/testuser/test-project/tree/main/docs/api/"
[project.optional-dependencies]
dev = [
"pdoc>=14.0",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest-html>=4.1.1",
"pytest-mock>=3.14.0",
"ruff>=0.11.5",
"taskipy>=1.14.1",
"hypothesis>=6.148.4",
"pyright>=1.1.407",
"ghp-import>=2.1.0",
]
[tool.setuptools]
packages = ["app"]
[tool.ruff.lint]
ignore = []
select = [
"A",
"ANN",
"ASYNC",
"B",
"C4",
"C9",
"D",
"DTZ",
"E",
"ERA",
"F",
"FURB",
"G",
"I",
"ICN",
"LOG",
"N",
"NPY",
"PD",
"PT",
"PTH",
"R",
"RUF",
"S",
"SIM",
"T20",
"TD",
"W",
]
preview = true
mccabe.max-complexity = 10
pydocstyle.convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "ANN", "D205", "D212", "D415", "D100", "D103"]
[tool.pytest.ini_options]
minversion = "6.0"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"unit: isolated tests for a single function or class",
"integration: tests covering multiple components together",
]
addopts = """
--maxfail=10 \
--color=yes \
--tb=short \
-q \
--html=docs/tests/report.html \
"""
testpaths = ["tests"]
python_files = ["*_test.py"]
python_functions = ["test_*"]
render_collapsed = "all"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
[tool.taskipy.tasks]
run = "python -m app"
test-report = """\
pytest \
--doctest-modules \
--cov-config=pyproject.toml \
--cov-report html:docs/coverage \
--cov-report term:skip-covered \
--cov=app \
--cov-fail-under=100 \
--hypothesis-show-statistics \
"""
test = """\
pytest -m "not slow" -q && \
task test-report\
"""
test-fast = "pytest -m \"not slow\" -q"
test-slow = "pytest -m slow"
ruff-check = "ruff check . --fix"
ruff-format = "ruff format ."
ruff-format-check = "ruff format . --check"
lint = "task ruff-check && task ruff-format"
doc-serve = "pdoc ./app --host localhost --port 8080"
doc-build = """\
pdoc ./app -o docs/api --search && \
pytest \
--cov-config=pyproject.toml \
--cov-report html:docs/coverage \
--cov=app \
--html=docs/tests/report.html \
--self-contained-html \
-q \
"""
doc-publish = "task doc-build && ghp-import -n -p -f docs"
static-check = "pyright"
[dependency-groups]
dev = [
"safety>=3.7.0",
]