Files
vrsub/pyproject.toml
cat-shark 52512c26e5 fix: 批量任务进度实时汇总,暂停/中断时前端不再显示 0/总数 0%
batch_jobs.done 此前只在任务整体完成时一次性汇总,处理中途(尤其被暂停)
恒为 0,导致前端显示 "0/431 完成 0%" 而实际已处理多个视频
(回归 batch_fee668175444:已处理 15 个仍显示 0/431)。

- db: 新增 sync_batch_job_progress(按明细实时重算 done=COMPLETED+SKIPPED、
  failed=FAILED 并落库)与 refresh_batch_job(对齐后返回最新任务)
- batch 引擎: 暂停返回、SKIPPED/COMPLETED continue、视频缺失、单视频异常后、
  任务收尾等边界统一调用实时对齐,替代收尾一次性 sum
- routers/batch: 列表/详情读取前实时对齐,即使引擎不在运行也返回真实进度
- tests: 新增 6 条 TDD 回归测试覆盖 db 助手、引擎暂停、SKIPPED、API 读取侧

同时按用户要求:移除 100% 行覆盖率强制门槛(pytest 不再 --cov-fail-under),
约定小改动只跑相关测试、保证功能可用即可(AGENTS.md 与 pyproject.toml)。
2026-09-06 16:57:05 +08:00

48 lines
1.6 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[project]
name = "vrsub"
version = "0.1.0"
description = "VRSub:为视频生成 VR 双眼字幕的单体应用(API、调度器与全部节点在单进程内运行)"
requires-python = ">=3.11"
dependencies = [
# Web 框架:FastAPI 负责 API 与静态前端挂载。
"fastapi",
"uvicorn",
"python-multipart",
# 转写节点:faster-whisper 及其 CUDA 动态库(同进程直接加载,无需路径注入)。
"faster-whisper>=1.2.1",
"nvidia-cublas-cu12>=12.9.2.10",
"nvidia-cudnn-cu12>=9.24.0.43",
# 提音节点:imageio-ffmpeg 提供内置 ffmpeg 兜底。
"imageio-ffmpeg>=0.6",
"python-dotenv>=1.2.2",
]
[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"httpx",
]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
# wov_sdk / wov_app 位于 src/nodes 位于仓库根,一并作为可安装包。
[tool.setuptools.packages.find]
where = ["src", "."]
include = ["wov_sdk*", "wov_app*", "nodes*"]
# pytest 配置:扫描 tests 目录并把仓库根加入 sys.path,保证 nodes 包在
# 未重新安装时也能被导入。
# 注意:默认不再强制 100% 覆盖率(开发约定:小改动只跑相关测试保证功能
# 可用即可);需要查看覆盖率时手动追加 --cov=src --cov=nodes。
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "-p no:cacheprovider"
# 集成测试标记(真实模型/真实 LLM/真实数据,默认随全套执行,缺数据自动跳过)。
markers = [
"integration: 需要真实模型/真实音频/真实 LLM API 或用户提供的真实数据,数据或环境缺失时跳过",
]