Files
HeXi/pyproject.toml
T
sansenhoshiandClaude Code 4badcfcf32 feat(video-analysis): 群策略 v3 / 群文件投递通道 / Web 管理页
- policy.py:per-group 正交策略(自动解析 / 自动策略 / 禁用策略 / 存储 A·B·C /
  公网 / 链接 / 群文件 + 平台限定),list.json v1/v2 → v3 自动迁移,
  写入统一走 PolicyStore(加锁 + .tmp 原子替换 + 字段归一)
- 群文件并行通道 group_file.py:打包 zip(可选 pyzipper AES-256)后优先走 S3 预签名、
  本地直传兜底;设了密码但 pyzipper 不可用就放弃上传,不退化成明文
- list_proc.py 收敛到「视频策略」统一入口,权限判定改走 policy
- Web 管理页 /hub/video_analysis(群策略 + 链接解析面板)与 services/web_jobs.py
  (只复用纯函数层,Web 上下文不发消息;内存任务表 + 并发闸门 + 超时)
- 媒体命名统一到 utils.py({作者}_{作者id}/{作品名}[_短码]),cleanup 回收空目录
- 测试:policy / 命名 / 群文件 / web_jobs 四组

顺带 pyproject 的 pytest 加 testpaths=tests(避免收进 debug/ 下的调试脚本)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 14:23:32 +08:00

120 lines
3.0 KiB
TOML

[tool.poetry]
authors = ["sansenhoshi <sansenhoshi@outlook.com>"]
description = "基于 NoneBot2 的机器人"
license = "None"
name = "hexi"
readme = "README.md"
repository = ""
version = "0.0.1"
[tool.poetry.dependencies]
python = "^3.10"
eorzeaenv = "^2.2.8"
matplotlib = "^3.7.1"
expiringdict = "^1.2.2"
playwright = "^1.50.0"
nonebot2 = { extras = ["httpx", "fastapi", "websockets"], version = "^2.1.0" }
nb-cli = "^1.2.3"
nonebot-adapter-onebot = "2.2.4"
nonebot-plugin-datastore = "^1.1.2"
nonebot-plugin-wordcloud = "^0.5.2"
nonebot-plugin-user = "^0.0.1"
nonebot-plugin-apscheduler = "^0.3.0"
nonebot-plugin-send-anything-anywhere = "^0.3.1"
nonebot-plugin-alconna = "^0.24.0"
nonebot-plugin-session = "^0.1.0"
nonebot-plugin-userinfo = "^0.1.0"
bilibili-api-python = "^17.0.0"
nonebot-plugin-sentry = "^0.4.0"
nonebot-plugin-memes = "~0.8.1"
nonebot-bison = "0.8.2"
nonebot-plugin-gscode = "0.2.1"
nonebot-plugin-status = "0.7.1"
nonebot-plugin-bawiki = "0.9.3"
# --- 运行时补充依赖(与 requirements.txt 同步维护)---
aiohttp = ">=3.9.5"
beautifulsoup4 = ">=4.13.3"
boto3 = ">=1.39.11"
cjk-textwrap = ">=0.1.0"
cloudscraper = ">=1.2.71"
curl-cffi = ">=0.14.0"
jieba = ">=0.42.1"
lxml = ">=5.4.0"
nonebot-plugin-htmlrender = ">=0.6.7"
numpy = ">=2.2.2"
opencv-contrib-python = ">=4.10.0.84"
psutil = ">=5.9.5"
py-cpuinfo = ">=9.0.0"
pyzipper = ">=0.3.6"
pytz = ">=2025.1"
ruamel.yaml = ">=0.17.40"
yt-dlp = ">=2026.6.9"
taskgroup = { version = ">=0.2.2", markers = "python_version < '3.11'" }
[tool.poetry.group.dev.dependencies]
nonebug = "^0.3.3"
pytest-cov = "^4.0.0"
pytest-mock = "^3.6.1"
pytest-xdist = "^3.0.2"
pytest-asyncio = "^0.21.0"
respx = "^0.20.1"
freezegun = "^1.2.2"
nonebug-saa = { git = "https://github.com/MountainDash/nonebug-saa.git" }
[tool.nonebot]
adapters = [
{ name = "OneBot V11", module_name = "nonebot.adapters.onebot.v11" },
{ name = "OneBot V12", module_name = "nonebot.adapters.onebot.v12" },
]
plugin_dirs = ["hexi/plugins", "test"]
plugins = [
"nonebot_plugin_apscheduler",
"nonebot_plugin_saa",
"nonebot_plugin_alconna",
"nonebot_plugin_session",
"nonebot_plugin_userinfo",
"nonebot_plugin_user",
"nonebot_plugin_wordcloud",
"nonebot_plugin_memes",
"nonebot_plugin_multincm",
"nonebot_plugin_random_stereotypes",
"nonebot_plugin_fix_qq_img_ssl",
"nonebot_plugin_datastore",
"nonebot_plugin_orm",
"nonebot_plugin_rollpig",
]
[tool.black]
line-length = 88
[tool.isort]
profile = "black"
line_length = 88
skip_gitignore = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
# 只收 tests/:根目录 debug/ 下有历史调试脚本(test_group_analysis.py 等),
# 默认从 rootdir 全量收集会在导入期就报错中断整轮测试
testpaths = ["tests"]
[tool.pyright]
typeCheckingMode = "basic"
[tool.ruff]
select = ["E", "W", "F", "UP", "C", "T", "PYI", "Q"]
ignore = ["E402", "E501", "E711", "C901", "UP037"]
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]