-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
191 lines (155 loc) · 3.88 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
[project]
name = "pytest-copier"
description = "A pytest plugin to help testing Copier templates"
authors = [
{name = "Axel Haustant", email = "[email protected]"},
]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.8"
keywords = []
dynamic = ["version"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Typing :: Typed",
]
dependencies = [
"pytest>=7.3.2",
"copier>=9.0.0",
"pytest-dir-equal>=0.2",
"pytest-gitconfig>=0.4",
]
[project.urls]
Homepage = "https://github.com/noirbizarre/pytest-copier"
Documentation = "https://github.com/noirbizarre/pytest-copier#readme"
Repository = "https://github.com/noirbizarre/pytest-copier"
Issues = "https://github.com/noirbizarre/pytest-copier/issues"
[project.entry-points.pytest11]
copier = "pytest_copier.plugin"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.version]
source = "scm"
write_to = "pytest_copier/VERSION"
[tool.pdm.resolution.overrides]
pyyaml = ">=6.0.1" # For Python 3.12 support
[tool.pdm.dev-dependencies]
test = [
"pytest-sugar>=0.9.5",
"coverage[toml]>=4",
]
lint = [
"black>=23.10.0",
"mypy>=1.7.0",
"ruff>=0.1.7",
"codespell",
"types-PyYAML",
]
tox = [
"tox",
"tox-pdm>=0.5",
]
release = [
"emotional",
]
[tool.pdm.scripts]
test.help = "Run the test suite"
test.cmd = "pytest"
lint.help = "Lint all tracked files using pre-commit"
lint.cmd = "pre-commit run --all-files"
format.help = "Format the code according to known rules"
format.composite = [
"codespell --write-changes",
"ruff --fix-only --show-fixes src tests",
"black src tests",
]
typing.help = "Full typing linting (includes imported packages and uncommmited files)"
typing.cmd = "mypy src tests --warn-unused-ignores"
cover.help = "Run the test suite with coverage"
pre_cover = "coverage erase"
cover.composite = [
"coverage run --append -m pytest {args} --junitxml=reports/tests.xml",
"coverage report",
"coverage html -d reports/coverage",
"coverage xml -o reports/coverage.xml",
]
"cover:all".help = "Run the test suite against all supported Python version"
"pre_cover:all" = "coverage erase"
"cover:all".cmd = "tox --parallel"
changelog.help = "Update the changelog"
changelog.cmd = "cz changelog"
[tool.commitizen]
name = "emotional"
github = "noirbizarre/pytest-copier"
order_by_scope = true
version_provider = "scm"
major_version_zero = true # Remove this line for the first 1.x release
[tool.pdm.ide]
linters = ["ruff"]
formatter = "black"
testing = "pytest"
[tool.pytest.ini_options]
addopts = "-ra"
norecursedirs = ".git build dist"
testpaths = [
"src/",
"tests/",
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"tests/*",
]
[tool.coverage.report]
exclude_also = [
'def __repr__',
'if TYPE_CHECKING:',
]
ignore_errors = true
[tool.black]
# Black adds 10% tolernace which makes it to 110
# See:
# https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
line-length = 100
[tool.ruff]
line-length = 110
respect-gitignore = true
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# McCabe # fake8-comprehension
"C",
# Pyupgrade
"UP",
# isort
"I001"
]
src = ["src", "tests"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"] # Facade pattern
[tool.ruff.isort]
known-first-party = ["pytest_copier"]
known-third-party = ["pytest"]
lines-between-types = 1
[tool.mypy]
exclude = [
"docs",
"build",
"dist",
]
[tool.codespell]
skip = "./reports"