-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
156 lines (132 loc) · 3.95 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
name = "servestatic"
description = "Production-grade static file server for Python web apps."
readme = "README.md"
keywords = ["asgi", "django", "http", "server", "static", "staticfiles", "wsgi"]
license = "MIT"
authors = [{ name = "Mark Bakhit" }]
requires-python = ">=3.9"
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.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications :: File Sharing",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
]
dependencies = ["asgiref"]
dynamic = ["version"]
optional-dependencies.brotli = ["brotli"]
urls.Changelog = "https://archmonger.github.io/ServeStatic/latest/changelog/"
urls.Documentation = "https://archmonger.github.io/ServeStatic/"
urls.Source = "https://github.com/Archmonger/ServeStatic"
[tool.hatch.version]
path = "src/servestatic/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/src"]
[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", "requests", "brotli"]
randomize = true
matrix-name-format = "{variable}-{value}"
# Django 4.2
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "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"]
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",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-material",
"mkdocs-include-markdown-plugin",
"linkcheckmd",
"mkdocs-spellcheck[all]",
"mkdocs-git-authors-plugin",
"mkdocs-minify-plugin",
"mike",
]
[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"]
# >>> 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
"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
]
lint.preview = true
[tool.pytest.ini_options]
addopts = """\
--strict-config
--strict-markers
"""
[tool.coverage.run]
branch = true
parallel = true
source = ["src/", "tests/"]
[tool.coverage.paths]
source = ["src/"]
[tool.coverage.report]
show_missing = true