-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (107 loc) · 3.12 KB
/
pyproject.toml
File metadata and controls
120 lines (107 loc) · 3.12 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
[project]
name = "fastapi-cdn-host"
description = "Auto choose the fastest cdn host for fastapi project docs."
authors = [{name="Waket Zheng", email="waketzheng@gmail.com"}]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
dynamic = [ "version" ]
dependencies = [
"fastapi (>=0.110.0,<1.0.0)",
"httpx (>=0.23.0,<1.0.0)",
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Framework :: AsyncIO",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: FastAPI",
"Typing :: Typed",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
[project.optional-dependencies]
cli = ["typer>=0.15.2"]
all = ["fastapi-cli>=0.0.7"]
[project.scripts]
fastcdn = "fastapi_cdn_host:cli.main"
[project.urls]
homepage = "https://github.com/waketzheng/fastapi-cdn-host"
repository = "https://github.com/waketzheng/fastapi-cdn-host.git"
[dependency-groups]
dev = [
"fastdevcli-slim>=0.19.9",
"bandit>=1.8.5",
"asynctor>=0.12.0",
"trio>=0.29.0",
"pytest-mock>=3.14.0",
"flask>=3.1.1",
"a2wsgi>=1.10.10",
"loguru>=0.7.3",
"coverage>=7.13.1",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.mypy]
pretty = true
ignore_missing_imports = true
explicit_package_bases = true
check_untyped_defs = true
[tool.ruff.lint]
extend-select = [
"I", # isort
"B", # flake8-bugbear
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"FA", # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"RUF100", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["E501"]
"examples/*/main.py" = ["I001"]
"scripts/*test.py" = ["E501", "UP028","UP031"]
"scripts/*.py" = ["UP009","UP032"]
[tool.coverage.run]
branch = true
parallel=true
source = ["fastapi_cdn_host"]
omit = [
# omit anything in a .cache directory anywhere
"*/.cache/*",
# omit everything in /usr
"/usr/*",
# omit this single file
"scripts/parallel_test.py",
]
[tool.coverage.report]
omit = ["*/tests/*", "test_*"]
exclude_lines = [
"pragma: no cover",
"@overload",
'if __name__ == "__main__":',
"if TYPE_CHECKING:",
]
[tool.bandit]
exclude_dirs = ["tests", "fastapi_cdn_host/cli.py", "scripts", "examples", ".venv"]
[tool.pdm]
version = { source = "file", path = "fastapi_cdn_host/__init__.py" }
distribution = true
[tool.pdm.build]
source-includes = [
"scripts/*.py",
]
[tool.pdm.scripts]
pypi = "pdm run python scripts/uv_pypi.py {args}"
deps = "pdm run fast deps {args}"
tree = "pdm list --tree {args}"