Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (117 loc) · 5.01 KB
/
Copy pathpyproject.toml
File metadata and controls
131 lines (117 loc) · 5.01 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
# 说明:
# 1. 主依赖来源统一收敛到 pyproject.toml。
# 2. 运行环境通过 uv.lock 固定,避免不同机器解析出不同版本组合。
[build-system]
requires = ["hatchling>=1.27.0"]
build-backend = "hatchling.build"
[project]
name = "mpt"
version = "1.3.11"
description = "Official MoneyPrinterTurbo package with WebUI and CLI, maintained by harry0703."
readme = "docs/pypi-description.md"
requires-python = ">=3.11"
license = { text = "MIT" }
dependencies = [
"moviepy==2.2.1",
"streamlit==1.66.1",
# Keep the media-response compatibility test passing with the patched stack.
"starlette==1.3.1",
"streamlit-tour==1.1.0",
"edge-tts==7.3.1",
"fastapi==0.136.3",
"uvicorn==0.32.1",
"openai==2.24.0",
"faster-whisper==1.1.0",
# 与 requirements.txt 保持一致:PyAV 19 移除了 Whisper 使用的参数。
"av<19",
"toml==0.10.2",
"imageio-ffmpeg==0.6.0",
"loguru==0.7.3",
"dashscope==1.20.14",
"azure-cognitiveservices-speech==1.41.1",
"redis==5.2.0",
"python-multipart==0.0.31",
"pyyaml==6.0.3",
"requests==2.33.1",
"packaging==24.2",
"socksio==1.0.0",
"pydub==0.25.1",
"audioop-lts==0.2.2; python_version >= '3.13'",
"litellm==1.103.1",
"google-genai==2.11.0",
"pyjwt[crypto]>=2.10.1,<3",
"filelock>=4.2.1,<5",
# 阿拉伯字母字幕的整形与绘制(HarfBuzz + FreeType,wheel 自带,无需系统库)。
"khatt[video]==0.4.0",
]
[project.scripts]
mpt = "app.launcher:main"
[project.urls]
Homepage = "https://github.com/harry0703/MoneyPrinterTurbo"
Issues = "https://github.com/harry0703/MoneyPrinterTurbo/issues"
[project.optional-dependencies]
# Optional TwelveLabs (https://twelvelabs.io) video-understanding/embedding
# integration. Only needed when `twelvelabs_api_keys` is configured; install
# with `uv sync --extra twelvelabs`.
twelvelabs = [
"twelvelabs>=1.2.8",
]
[dependency-groups]
dev = [
"coverage==7.15.1",
"pytest==9.1.1",
"ruff==0.15.21",
]
[tool.ruff.lint.per-file-ignores]
# WebUI 需要先把项目根目录加入 sys.path,随后才能导入 app 包。
"webui/Main.py" = ["E402"]
[tool.pytest.ini_options]
testpaths = ["test"]
[tool.coverage.run]
# 统计分支覆盖率可以识别“代码行执行了,但条件的另一条分支从未验证”的情况,
# 比只统计行覆盖率更适合作为 CI 质量基线。CLI 和 WebUI 都属于生产入口,
# 因此与 app 服务层、服务启动入口和面向 Agent 用户发布的 Skill 脚本一起
# 纳入统计,避免覆盖率只反映局部模块。
branch = true
source = ["app", "cli", "webui", "main", "docs/skill"]
[tool.coverage.report]
# Python 3.11 和 3.13 完整测试的实测分支覆盖率均超过 70.4%。以 70%
# 作为稳定底线,可以固化失败状态、异步发布恢复和 Redis 原子更新测试,
# 同时为不同 Python 版本与操作系统的少量分支差异保留余量。
fail_under = 70
show_missing = true
skip_covered = true
[tool.hatch.build.targets.wheel]
packages = ["app", "webui"]
# 字体保留中英文默认字体和越南语字体。两个大体积备用字重不进入安装包,
# 避免 wheel 超过 PyPI 默认文件大小限制;源码版的字体文件保持原样。
[tool.hatch.build.targets.wheel.force-include]
"cli.py" = "app/cli.py"
"config.example.toml" = "app/_assets/config.example.toml"
"resource/fonts/STHeitiMedium.ttc" = "app/_assets/resource/fonts/STHeitiMedium.ttc"
"resource/fonts/MicrosoftYaHeiBold.ttc" = "app/_assets/resource/fonts/MicrosoftYaHeiBold.ttc"
"resource/fonts/BeVietnamPro-Bold.ttf" = "app/_assets/resource/fonts/BeVietnamPro-Bold.ttf"
"resource/fonts/BeVietnamPro-Medium.ttf" = "app/_assets/resource/fonts/BeVietnamPro-Medium.ttf"
"resource/fonts/Charm-Bold.ttf" = "app/_assets/resource/fonts/Charm-Bold.ttf"
"resource/fonts/Charm-Regular.ttf" = "app/_assets/resource/fonts/Charm-Regular.ttf"
"resource/fonts/UTM Kabel KT.ttf" = "app/_assets/resource/fonts/UTM Kabel KT.ttf"
"resource/songs" = "app/_assets/resource/songs"
"resource/public" = "app/_assets/resource/public"
[tool.hatch.build]
exclude = ["**/.DS_Store", "**/__pycache__", "**/*.pyc", "**/.streamlit"]
[tool.hatch.build.targets.sdist]
# 使用白名单,禁止本机配置、凭据、storage、AGENTS.md 等混入源码发行包。
include = [
"/app", "/cli.py", "/webui", "/config.example.toml", "/pyproject.toml",
"/uv.lock", "/LICENSE", "/docs/pypi-description.md", "/docs/packaging.md",
"/test/services/test_packaging.py", "/resource/songs", "/resource/public",
"/resource/fonts/STHeitiMedium.ttc", "/resource/fonts/MicrosoftYaHeiBold.ttc",
"/resource/fonts/BeVietnamPro-Bold.ttf", "/resource/fonts/BeVietnamPro-Medium.ttf",
"/resource/fonts/Charm-Bold.ttf", "/resource/fonts/Charm-Regular.ttf",
"/resource/fonts/UTM Kabel KT.ttf",
]
[tool.uv]
package = true
# MoviePy 2.2.1 caps Pillow below 12; patched Pillow is required for image decoding.
# Keep this in sync with requirements-security.txt for container/legacy installs.
override-dependencies = ["pillow>=13.0.0,<14"]