-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (147 loc) · 3.99 KB
/
pyproject.toml
File metadata and controls
162 lines (147 loc) · 3.99 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
[project]
name = "videocaptioner"
dynamic = ["version"]
description = "AI-powered video captioning tool — ASR, subtitle optimization, translation, and synthesis"
readme = "README.md"
license = { text = "GPL-3.0" }
authors = [{ name = "Weifeng" }]
requires-python = ">=3.10,<3.13"
keywords = ["video", "caption", "subtitle", "asr", "llm", "translation", "cli"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Video",
]
# Base dependencies (CLI-only, no PyQt)
dependencies = [
"requests>=2.32.4",
"openai>=1.97.1",
"diskcache>=5.6.3",
"yt-dlp>=2025.7.21",
"json-repair>=0.49.0",
"langdetect>=1.0.9",
"pydub>=0.25.1",
"tenacity>=8.2.0",
"pillow>=12.0.0",
"fonttools>=4.61.1",
"platformdirs>=4.0.0",
"tomli>=2.0.0; python_version < '3.11'",
]
[project.optional-dependencies]
gui = [
"PyQt5==5.15.11",
"PyQt-Fluent-Widgets==1.8.4",
"modelscope>=1.32.0",
"psutil>=7.0.0",
"GPUtil>=1.4.0",
]
[project.urls]
Homepage = "https://github.com/WEIFENG2333/VideoCaptioner"
Repository = "https://github.com/WEIFENG2333/VideoCaptioner"
Issues = "https://github.com/WEIFENG2333/VideoCaptioner/issues"
[project.scripts]
videocaptioner = "videocaptioner.cli.main:main"
# videocaptioner (no args) auto-launches GUI if [gui] extras are installed
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0-dev"
[tool.hatch.build.hooks.vcs]
version-file = "videocaptioner/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"resource/fonts/",
"docs/",
"legacy-docs/",
"work-dir/",
"AppData/",
"output/",
"scripts/",
"tests/",
".github/",
]
[tool.hatch.build.targets.wheel]
packages = ["videocaptioner"]
[tool.uv]
environments = [
"sys_platform == 'win32'",
"sys_platform == 'darwin'",
"sys_platform == 'linux'",
]
override-dependencies = [
"PyQt5-Qt5==5.15.2; sys_platform == 'win32'",
"PyQt5-Qt5>=5.15.11; sys_platform != 'win32'",
]
dev-dependencies = [
"pyright>=1.1.0",
"ruff>=0.4.0",
"pytest>=8.0.0",
# GUI deps for development
"PyQt5==5.15.11",
"PyQt-Fluent-Widgets==1.8.4",
"modelscope>=1.32.0",
"psutil>=7.0.0",
"GPUtil>=1.4.0",
]
[tool.pyright]
venvPath = "."
venv = ".venv"
pythonVersion = "3.12"
typeCheckingMode = "basic"
include = ["videocaptioner"]
exclude = [
"**/__pycache__",
"**/.pytest_cache",
".venv",
"venv",
"build",
"dist",
"work-dir",
"AppData",
"resource",
"**/node_modules"
]
reportMissingImports = "warning"
reportMissingTypeStubs = false
reportGeneralTypeIssues = false
reportOptionalOperand = "warning"
reportOptionalMemberAccess = false
reportArgumentType = "warning"
reportCallIssue = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportUnusedImport = "warning"
reportUnusedVariable = "warning"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --strict-markers --tb=short --disable-warnings"
markers = [
"integration: Integration tests that require external services",
"slow: Slow running tests",
"llm: Tests that require LLM API access",
"translator: Tests for translation modules",
]
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = ["E501"]