-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
78 lines (66 loc) · 1.58 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
[project]
name = "python-rye-template"
version = "0.1.0"
description = "A Project Template of Python with Rye"
authors = [{ name = "杜世橋 Du Shiqiao", email = "[email protected]" }]
dependencies = ["fastapi>=0.110.1"]
requires-python = ">=3.11"
[project.optional-dependencies]
server = ["uvicorn[standard]>=0.29.0"]
[project.scripts]
app = "app.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/app"]
[tool.rye]
managed = true
dev-dependencies = [
"pyright>=1.1.358",
"pytest-cov>=5.0.0",
"uvicorn>=0.29.0",
"pytest-xdist>=3.5.0",
]
[tool.rye.scripts]
pyright_lint = "pyright ."
rye_format = "rye format ."
rye_lint = "rye lint ."
rye_fix = "rye lint --fix ."
test = "pytest tests -n auto --cov=app --cov-report=term --cov-report=xml"
format = { chain = ["rye_fix", "rye_format"] }
lint = { chain = ["rye_lint", "pyright_lint"] }
check = { chain = ["format", "lint", "test"] }
[tool.pytest.ini_options]
filterwarnings = ["ignore::FutureWarning"]
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = [
"E",
"F",
"W",
"I",
"B",
"RUF",
"UP",
"N",
"SIM",
"A",
"S",
"COM",
"DTZ",
"PIE",
"PLE",
]
# add directory names to exclude from analysis
exclude = ["tests/**/*", "deps/**/*"]
[tool.ruff.lint.per-file-ignores]
"*/__init__.py" = ['F401']
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "basic"
# add directory names to exclude from analysis
ignore = ["deps"]