-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
234 lines (220 loc) · 4.94 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.25",
]
[project]
name = "django-admin-sync"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "sax", email = "[email protected]" },
]
requires-python = ">=3.9"
classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = [
"version",
]
dependencies = [
"django-admin-extra-buttons",
"django-concurrency",
"django-stubs",
"requests",
]
[dependency-groups]
dev = [
"check-manifest",
"django-factory-boy",
"django-reversion",
"django-smart-admin",
"django-webtest",
"freezegun",
"mock",
"pre-commit",
"psycopg2-binary",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-echo",
"pytest-pythonpath",
"pytest-responses",
"tox",
]
docs = [
"markdown-include>=0.8.1",
"mdx-gh-links>=0.4",
"mkdocs>=1.6.1",
"mkdocs-autolinks-plugin>=0.7.1",
"mkdocs-autorefs>=1.3.1",
"mkdocs-awesome-pages-plugin>=2.10.1",
"mkdocs-ezlinks-plugin>=0.1.14",
"mkdocs-glightbox>=0.4",
"mkdocs-include-markdown-plugin>=6.2.2",
"mkdocs-macros-plugin>=1.3.7",
"mkdocs-markdownextradata-plugin>=0.2.6",
"mkdocs-material>=9.6.5",
"mkdocs-material-extensions>=1.3.1",
"mkdocstrings>=0.28.1",
"mkdocstrings-python>=1.16.1",
]
dj = [
"django",
]
type-check = [
"mypy",
]
[tool.hatch]
build.hooks.vcs.version-file = "src/admin_sync/version.py"
version.source = "vcs"
raw-options = { root = "../.." }
[tool.hatch.build.targets.sdist]
ignore-vcs = true
include = [
"src/admin_sync/**/*.*",
]
[tool.hatch.build.targets.wheel]
packages = [ "src/admin_sync" ]
[tool.ruff]
target-version = "py39"
line-length = 120
exclude = [
"docs",
"manage.py",
"tests",
]
format.preview = true
format.docstring-code-line-length = 120
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"ANN401", # Dynamically typed expressions
"COM812",
"CPY", # Missing copyright notice
"D", # docstring
"DOC", # docstring
"E731", # Do not assign a `lambda` expression,
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use a f-string literal, assign to variable first
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"N806", # Variable `...` in function should be lowercase
"S308", # Use of `mark_safe` may expose cross-site scripting vulnerabilities
"SLF001", # Private member accessed: `...`
"TRY003", # Avoid specifying long messages outside the exception class
"TRY301", # Abstract `raise` to an inner function
"TRY401", # Redundant exception object included in `logging.exception` call
"UP037", #
]
lint.per-file-ignores."docs/conf.py" = [
"A001", #
"D100", #
"ERA001", #
"INP001", #
]
lint.per-file-ignores."src/admin_sync/version.py" = [
"UP006",
"UP035",
]
lint.per-file-ignores."tests/**/*.py" = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"D",
"DJ",
"DTZ",
"ERA",
"F",
"FBT",
"FURB",
"INP",
"N",
"PGH",
"PLC",
"PLR",
"PLW",
"PT",
"PTH",
"PYI",
"RUF",
"S",
"SIM",
"TC",
"UP",
]
lint.isort = { known-first-party = [ "admin_extra_buttons" ] }
lint.pylint.max-args = 7
lint.pylint.max-branches = 14
lint.pylint.max-nested-blocks = 8
lint.preview = true
[tool.pyproject-fmt]
max_supported_python = "3.13"
[tool.pytest.ini_options]
django_find_project = false
pythonpath = [ "./tests/demo/", "./src" ]
DJANGO_SETTINGS_MODULE = "demoapp.settings"
norecursedirs = [ "demo", ".tox" ]
addopts = [
"--tb=short",
"--capture=no",
"--echo-version=django",
"--echo-attr=django.conf.settings.DATABASES.default.ENGINE",
"--cov=admin_sync",
"--cov-report=html",
"--cov-report=xml",
"--cov-config=tests/.coveragerc",
]
python_files = "tests/test_*.py tests/**/test_*.py src/*.py"
markers = [
"functional: mark a test as functional",
"selenium: selenium test",
"skip: skip test",
]
[tool.coverage]
run.source = [
"admin_sync",
]
run.dynamic_context = "test_function"
run.branch = true
run.parallel = true
run.omit = [
"**/create_extra_permissions.py",
]
run.plugins = [
"covdefaults",
]
report.fail_under = 80
report.show_missing = true
report.exclude_lines = [
"pragma: no cover",
]
html.show_contexts = true
html.skip_covered = false
paths.source = [
"src",
".tox*/*/lib/python*/site-packages",
".tox*/pypy*/site-packages",
".tox*\\*\\Lib\\site-packages",
"*/src",
"*\\src",
]
[tool.uv]
package = true