-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (155 loc) · 5.03 KB
/
pyproject.toml
File metadata and controls
180 lines (155 loc) · 5.03 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
174
175
176
177
178
179
180
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "packaging<26"]
[project]
name = "servestatic"
description = "Production-grade static file server for Python WSGI & ASGI."
readme = "README.md"
keywords = ["asgi", "django", "http", "server", "static", "staticfiles", "wsgi"]
license = "MIT"
authors = [{ name = "Mark Bakhit", email = "archiethemonger@gmail.com" }]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"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",
"Programming Language :: Python :: 3.14",
"Topic :: Communications :: File Sharing",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
]
dependencies = ["asgiref"]
dynamic = ["version"]
optional-dependencies.brotli = ["brotli"]
optional-dependencies.minify = ["rcssmin", "rjsmin"]
urls.Changelog = "https://archmonger.github.io/ServeStatic/latest/changelog/"
urls.Documentation = "https://archmonger.github.io/ServeStatic/"
urls.Source = "https://github.com/Archmonger/ServeStatic"
scripts.servestatic = "servestatic.cli:main"
[tool.hatch.version]
path = "src/servestatic/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/src/"]
[tool.hatch.build.targets.wheel]
packages = ["src/servestatic"]
[tool.hatch.metadata]
license-files = { paths = ["LICENSE.md"] }
[tool.hatch.envs.default]
installer = "uv"
# >>> Hatch Test Suite <<<
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"pytest-sugar",
"httpx",
"brotli",
"pytest-timeout",
"brotli",
"rcssmin",
"rjsmin",
]
randomize = true
matrix-name-format = "{variable}-{value}"
timeout = 15
# Django 4.2
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12"]
django = ["4.2"]
# Django 5.0
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12"]
django = ["5.0"]
# Django 5.1
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
django = ["5.1"]
[tool.hatch.envs.hatch-test.overrides]
matrix.django.dependencies = [
{ if = [
"4.2",
], value = "django~=4.2" },
{ if = [
"5.0",
], value = "django~=5.0" },
{ if = [
"5.1",
], value = "django~=5.1" },
]
# >>> Hatch Documentation Scripts <<<
[tool.hatch.envs.docs]
template = "docs"
detached = true
dependencies = [
"mkdocs<2.0", # Mkdocs has some breaking changes planned that would brick mkdocs-material
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-material",
"mkdocs-include-markdown-plugin",
"linkcheckmd",
"mkdocs-spellcheck[all]",
"mkdocs-git-authors-plugin",
"mkdocs-minify-plugin",
"mike",
"click==8.2.1", # Newer versions of click do not work with mkdocs<2.0
]
[tool.hatch.envs.docs.scripts]
serve = ["cd docs && mkdocs serve"]
build = ["cd docs && mkdocs build --strict"]
linkcheck = [
"linkcheckMarkdown docs/ -v -r",
"linkcheckMarkdown README.md -v -r",
"linkcheckMarkdown CHANGELOG.md -v -r",
]
deploy_latest = ["cd docs && mike deploy --push --update-aliases {args} latest"]
deploy_develop = ["cd docs && mike deploy --push develop"]
# >>> Hatch pre-commit <<<
[tool.hatch.envs.precommit]
template = "pre-commit"
detached = true
dependencies = ["pre-commit>=3,<4"]
[tool.hatch.envs.precommit.scripts]
check = ["pre-commit run --all-files"]
update = ["pre-commit autoupdate"]
# >>> Hatch Python Scripts <<<
[tool.hatch.envs.python]
extra-dependencies = ["django-stubs", "pyright", "brotli"]
[tool.hatch.envs.python.scripts]
type_check = ["pyright src"]
# >>> Generic Tools <<<
[tool.ruff]
line-length = 120
extend-exclude = [".eggs/*", ".nox/*", ".venv/*", "build/*"]
format.preview = true
lint.extend-ignore = [
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"ARG004", # Unused static method argument
"DOC201", # Missing return documentation in docstring
"DOC402", # Missing yield documentation in docstring
"DOC501", # Missing exception documentation in docstring
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"PLR2004", # Magic value used in comparison
"SIM115", # Use context handler for opening files
"SLF001", # Private member accessed
"ARG005", # Unused lambda argument
"PT011", # Pytest exception is too broad
"RUF012", # Mutable class attributes should have `typing.ClassVar` annotations.
"PLC0415", # Imports should always be at the top of a file
"BLE001", # Do not catch `Exception`
]
lint.preview = true
[tool.pytest.ini_options]
addopts = ["--strict-config", "--strict-markers"]
[tool.coverage]
run.relative_files = true
run.branch = true
run.parallel = true
run.source = ["src/"]
paths.source = ["src/"]
report.show_missing = true