Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (117 loc) · 3.59 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (117 loc) · 3.59 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
[build-system]
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "nya-proxy"
version = "0.8.2"
description = "A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities."
readme = "README.md"
authors = [
{name = "Nya Foundation Team (k3scat)", email = "k3scat@gmail.com"},
]
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.139.0",
"uvicorn>=0.51.0",
"httpx[socks]>=0.28.0",
# Not imported directly: uvicorn's file-watch backend for config hot-reload
"watchfiles>=1.0.0",
"jmespath>=1.1.0",
"orjson>=3.11,<4",
"prometheus-client>=0.25.0",
"nacho-python[remote,schema,server]>=1.0.0",
]
[project.optional-dependencies]
dev = [
"build>=1.2.2",
"pytest>=8.3.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
]
lint = [
"mypy>=1.14.0",
"ruff>=0.12.0",
]
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
extend-select = ["I"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
# Legacy modules are still type-dirty; analyse them when imported but do
# not report their errors. Remove this once `files` covers all of `nya`.
follow_imports = "silent"
# Ratchet: mypy currently checks only the modules known to be type-clean.
# As legacy modules are fixed (run `mypy nya/` to see the backlog), add
# them here until the whole `nya` package is covered.
files = [
"nya/server/auth.py",
"nya/services/limit.py",
"nya/services/lb.py",
"nya/utils/formatting.py",
"nya/utils/redaction.py",
"nya/utils/substitution.py",
"nya/dashboard",
]
[tool.coverage.run]
source = ["nya"]
omit = ["tests/*"]
data_file = "reports/.coverage"
[tool.coverage.html]
directory = "reports/htmlcov"
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError"
]
[project.urls]
"Homepage" = "https://github.com/Nya-Foundation/nyaproxy"
"Bug Tracker" = "https://github.com/Nya-Foundation/nyaproxy/issues"
[project.scripts]
nyaproxy = "nya.server.app:main"
[tool.setuptools]
package-dir = {"" = "."} # Use current directory as source root
include-package-data = true
[tool.setuptools.packages.find]
where = ["."] # Root directory for discovery
include = ["nya*"] # Include nya and its subpackages
[tool.setuptools.package-data]
"nya" = ["config.yaml", "schema.json"]
"nya.html" = ["*.html", 'favicon.ico', "static/**/*"]
[tool.setuptools.exclude-package-data]
"*" = ["*.pyc", "*.pyo", "__pycache__/*"]
[tool.semantic_release]
tag_format = "v{version}"
version_toml = ["pyproject.toml:project.version"]
version_variables = ["nya/_version.py:__version__"]
build_command = "python -m pip install build && python -m build"
commit_parser = "conventional"
commit_message = "chore(release): bump version to v{version} [skip ci]"
commit_author = "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true