forked from codingjoe/django-select2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
173 lines (157 loc) · 4.31 KB
/
pyproject.toml
File metadata and controls
173 lines (157 loc) · 4.31 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
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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "django-tomselect2"
dynamic = ["version"]
description = "Django integration for Tom Select autocomplete widget"
readme = "README.rst"
license = "MIT"
authors = [
{ name = "Krystof Beuermann", email = "krystof@blackbox.ms" },
]
keywords = ["Django", "tom-select", "autocomplete", "typeahead"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Environment :: Web Environment",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Topic :: Software Development",
]
requires-python = ">=3.10"
dependencies = ["django>=4.2", "django-appconf>=0.6.0"]
[project.urls]
Homepage = "https://github.com/krystofbe/django-tomselect2"
Documentation = "https://django-tomselect2.rtfd.io/"
Repository = "https://github.com/krystofbe/django-tomselect2"
Changelog = "https://github.com/krystofbe/django-tomselect2/releases"
"Issue Tracker" = "https://github.com/krystofbe/django-tomselect2/issues"
[project.optional-dependencies]
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-django>=4.5",
"playwright>=1.40",
"pytest-playwright>=0.4",
]
dev = [
"django-tomselect2[test]",
"ruff>=0.6.0",
"pre-commit>=3.6",
"django-stubs>=4.2",
"twine>=4.0",
"djlint>=1.36.4",
]
docs = [
"sphinx>=7.0",
"myst-parser>=2.0",
"sphinx-rtd-theme>=2.0",
"sphinx-autobuild>=2024.2",
]
example = [
"redis>=5.0",
"django-crispy-forms>=2.0",
"crispy-bootstrap5>=2024.2",
]
# Hatch version configuration
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "django_tomselect2/_version.py"
# Ruff configuration (replaces black, isort, flake8, bandit)
[tool.ruff]
target-version = "py310"
line-length = 88
fix = true
[tool.ruff.lint]
# Add these modern rule sets
select = [
"E",
"W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"S", # bandit (security)
"DJ", # flake8-django
"PIE", # flake8-pie
"T20", # flake8-print
"SIM", # flake8-simplify
"ASYNC", # async-related
"PERF", # performance hints
"FURB", # refurb (modernization)
]
ignore = [
"E203", # whitespace before ':'
"E501", # line too long (handled by line-length)
"S101", # use of assert (OK in tests)
"S311", # random generator not cryptographically secure
]
[tool.ruff.format]
# Modern formatting options
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
exclude = ["**/migrations/**/*.py"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert allowed in tests
"T20", # print allowed in tests
]
"example/**/*.py" = [
"T20", # print allowed in examples
]
[tool.ruff.lint.isort]
known-first-party = ["django_tomselect2"]
force-single-line = false
combine-as-imports = true
[tool.django-stubs]
django_settings_module = "tests.testapp.settings"
# Pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"--cov=django_tomselect2",
"--cov-report=html",
"--cov-report=term-missing",
"--tb=short",
"-rxs",
"--strict-markers",
]
testpaths = ["tests"]
DJANGO_SETTINGS_MODULE = "tests.testapp.settings"
filterwarnings = ["ignore::PendingDeprecationWarning", "error::RuntimeWarning"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"playwright: marks tests that require Playwright browser automation",
]
# Coverage configuration
[tool.coverage.run]
source = ["django_tomselect2"]
omit = ["**/migrations/**", "**/tests/**", "**/venv/**", "**/.venv/**"]
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]