-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
172 lines (147 loc) · 3.49 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/wtforms_html5"]
[project]
name = "wtforms-html5"
description = "Generates render keywords for widgets of WTForms HTML5 fields."
readme = "README.md"
license = "GPL-3.0-or-later"
authors = [
{name = "Brutus", email = "[email protected]"},
]
maintainers = [
{name = "Brutus", email = "[email protected]"},
]
classifiers = [
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
]
requires-python = ">=3.9"
version = "0.6.1"
dependencies = [
"wtforms",
]
[project.urls]
Source = "https://github.com/brutus/wtforms-html5"
Documentation = "https://github.com/brutus/wtforms-html5/README.md"
Issues = "https://github.com/brutus/wtforms-html5/issues/"
# LINTING
[tool.hatch.envs.lint]
detached = true
dependencies = [
"pre-commit",
"pyupgrade",
"ruff",
]
[tool.hatch.envs.lint.scripts]
pc = "pre-commit run --all-files {args}"
check = [
"ruff check --no-fix {args:.}",
"ruff check --fix-only --diff {args:.}",
"ruff format --check --diff {args:.}",
]
fix = [
"ruff check --fix {args:.}",
"ruff format {args:.}",
]
upgrade = "git ls-files -- '*.py' | xargs -r pyupgrade --py39-plus"
[tool.ruff]
src = ['.', 'src', 'tests']
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.ruff.lint.isort]
known-first-party = ["wtforms_html5"]
force-single-line = true
# TESTING
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.13", "3.12", "3.11", "3.10", "3.9"]
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"beautifulsoup4",
"werkzeug",
"xdoctest[colors]",
]
[tool.pytest.ini_options]
addopts = "-ra --strict-markers --import-mode=importlib"
testpaths = [
"tests",
]
[tool.coverage.run]
branch = true
parallel = true
source_pkgs = ["wtforms_html5"]
omit = [
"src/wtforms_html5/__about__.py",
]
[tool.coverage.paths]
wtforms_html5 = ["src/wtforms_html5"]
tests = ["tests", "*/wtforms_html5/tests"]
[tool.coverage.report]
fail_under = 80
precision = 2
skip_covered = true
skip_empty = true
show_missing = true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
# PROJECT MANAGEMENT
[tool.hatch.envs.project]
detached = true
dependencies = [
"bumpver",
"towncrier",
]
[tool.bumpver]
current_version = "0.6.1"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "chore: bump version `{old_version}` -> `{new_version}`"
tag_message = "v{new_version}"
commit = true
tag = true
push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'^version = "{version}"',
'^current_version = "{version}"',
]
"src/wtforms_html5/__init__.py" = [
'__version__ = "{version}"',
]
"tests/conftest.py" = [
'EXP_VERSION = "{version}"',
]
"README.md" = [
'**VERSION**: `{version}`',
]
[tool.towncrier]
directory = "changes"
filename = "CHANGELOG.md"
title_format = "## {version} ({project_date})"
issue_format = "[#{issue}](https://github.com/brutus/wtforms-html5/issues/{issue})"
wrap = true
[[tool.towncrier.type]]
directory = "rm"
name = "Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "fix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "feat"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "change"
name = "Changes"
showcontent = true