-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpyproject.toml
More file actions
218 lines (189 loc) · 4.37 KB
/
pyproject.toml
File metadata and controls
218 lines (189 loc) · 4.37 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
[tool.poetry]
name = "sslogs"
version = "3.1.0"
description = "企业级智能安全日志分析平台 - Enterprise-grade intelligent security log analysis platform"
authors = ["SSlogs Team"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/yourusername/SSlogs"
keywords = ["security", "log-analysis", "ai", "threat-detection", "soc"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology",
"Topic :: Security",
"Topic :: System :: Logging",
"Topic :: System :: Monitoring",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
[tool.poetry.dependencies]
python = "^3.8"
# 核心依赖
PyYAML = "^6.0.1"
requests = "^2.31.0"
urllib3 = "^1.26.18"
# 字符编码处理
charset-normalizer = "^3.3.2"
# 模板引擎
Jinja2 = "^3.1.2"
# 压缩文件处理
patool = "^1.12"
# 地理位置分析
geoip2 = "^4.7.0"
maxminddb = "^2.2.0"
# 数据处理和分析
python-dateutil = "^2.8.2"
pytz = "^2023.3"
# GUI界面依赖
PyQt6 = "^6.5.0"
# 性能监控
psutil = "^5.9.0"
# AI分析相关依赖
aiohttp = "^3.8.0"
aiofiles = "^23.0.0"
# 安全和加密相关依赖
cryptography = "^41.0.0"
[tool.poetry.group.dev.dependencies]
# 测试框架
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
pytest-asyncio = "^0.21.0"
pytest-mock = "^3.11.0"
pytest-xdist = "^3.3.0"
coverage = "^7.3.0"
# 代码质量工具
black = "^23.7.0"
flake8 = "^6.1.0"
pylint = "^2.17.0"
mypy = "^1.5.0"
# 安全扫描工具
bandit = "^1.7.5"
safety = "^2.3.0"
# 文档工具
sphinx = "^7.1.0"
sphinx-rtd-theme = "^1.3.0"
[tool.poetry.scripts]
sslogs = "core.intelligent_log_analyzer:main"
sslogs-gui = "start_optimized_gui:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| venv
| virtualenv
)/
'''
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
show_error_codes = true
show_column_numbers = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"-l",
"--durations=10",
"-n", "auto",
"-s",
"--cov=core",
"--cov-report=html:htmlcov",
"--cov-report=term-missing",
"--cov-report=xml:coverage.xml",
"--cov-fail-under=70",
"--asyncio-mode=auto",
]
markers = [
"unit: 单元测试",
"integration: 集成测试",
"slow: 慢速测试",
"security: 安全测试",
"performance: 性能测试",
"ai: AI相关测试",
"gui: GUI相关测试",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["core"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/site-packages/*",
"*/venv/*",
"*/virtualenv/*",
"*/conftest.py",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
[tool.pylint.messages_control]
disable = [
"C0111", # missing-docstring
"C0103", # invalid-name
"R0903", # too-few-public-methods
"R0913", # too-many-arguments
"W0212", # protected-access
]
[tool.pylint.format]
max-line-length = 100
[tool.pylint.basic]
good-names = ["i", "j", "k", "ex", "Run", "_"]
[tool.pylint.design]
max-args = 7
max-locals = 15
max-returns = 6
max-branches = 15
max-statements = 50
[tool.bandit]
exclude_dirs = ["/tests", "/venv", "/virtualenv"]
skips = ["B201"]