-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (107 loc) · 2.95 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (107 loc) · 2.95 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
[project]
name = "livesecbench"
version = "0.1.1"
description = "LiveSecBench - 大模型动态安全基准测试框架"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "Apache License 2.0"}
authors = [
{name = "liyudong", email = "liyudong@tsinghua.edu.cn"},
{name = "wangkecheng", email = "wangkecheng@intokentech.cn"}
]
keywords = ["security", "benchmark", "testing", "llm", "evaluation"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Topic :: Security",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
# 核心运行依赖
dependencies = [
"httpx[http2]>=0.28.1",
"json-repair>=0.53.0",
"numpy>=2.2.6",
"pandas>=2.3.3",
"python-dotenv>=1.2.1",
"PyYAML>=6.0.3",
"openpyxl>=3.1.0",
"pymysql>=1.0.2",
"DBUtils>=3.0.3",
"transformers>=4.57.3",
]
[project.optional-dependencies]
# 测试依赖
test = [
"pytest>=9.0.1",
"pytest-cov>=7.0.0",
"pytest-asyncio>=0.24.0",
]
# 开发依赖(包含测试)
dev = [
"livesecbench[test]",
]
[project.scripts]
livesecbench = "livesecbench.run_livesecbench:main"
[project.urls]
Homepage = "https://github.com/ydli-ai/LiveSecBench"
Repository = "https://github.com/ydli-ai/LiveSecBench.git"
Documentation = "https://github.com/ydli-ai/LiveSecBench/-/tree/main/docs"
# 构建系统配置
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
# ============================================================================
# 工具配置
# ============================================================================
# setuptools 最小配置
[tool.setuptools]
packages = ["livesecbench"]
# pytest 配置
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"--disable-warnings",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"asyncio: marks tests as async (pytest-asyncio)",
]
minversion = "6.0"
asyncio_mode = "auto"
# 覆盖率选项说明:
# 需要安装 pytest-cov 后手动指定覆盖率参数:
# pytest --cov=livesecbench --cov-report=html --cov-report=term-missing
# 覆盖率配置
[tool.coverage.run]
source = ["livesecbench"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true