-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
199 lines (174 loc) · 5.84 KB
/
pyproject.toml
File metadata and controls
199 lines (174 loc) · 5.84 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
[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"
# ---------------------------------------------------------------------------
# Project metadata
# ---------------------------------------------------------------------------
[project]
name = "cutpilot"
version = "0.1.0"
description = "Agentic long-video to short-clip generator. NIM Whisper + Nemotron text/VL, orchestrated by NeMo Agent Toolkit."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [
{ name = "Sergey Leksikov" },
{ name = "Minjae Kim" },
]
keywords = ["video", "agent", "llm", "nemotron", "whisper", "hackathon"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
# Runtime dependencies — keep minimal; each one earns its place.
dependencies = [
# Models / validation
"pydantic>=2.8",
"pydantic-settings>=2.4",
# CLI
"typer>=0.12",
"rich>=13.7", # pretty terminal output for demo mode
# Logging
"structlog>=24.1",
# Perception — NIM Whisper-Large via OpenAI-compat /v1/audio/transcriptions
"openai>=1.51",
# Agent framework — NAT is primary; ADK wrapper available via nvidia-nat[adk]
"nvidia-nat[langchain,adk,mcp]>=1.6", # NeMo Agent Toolkit + ADK wrappers + MCP
# Media
"ffmpeg-python>=0.2", # Python bindings for ffmpeg invocation
"yt-dlp>=2024.8", # source ingestion from URLs
# Schema export / validation
"jsonschema>=4.22",
# HTTP façade — thin FastAPI wrapper around `run_pipeline` for the review UI.
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
# Required by FastAPI's UploadFile/File/Form deps. Not bundled with plain
# `fastapi`; the `fastapi[standard]` extra pulls it in along with several
# unrelated packages we don't need.
"python-multipart>=0.0.9",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-asyncio>=0.23",
"ruff>=0.6",
"mypy>=1.11",
"types-jsonschema",
]
[project.urls]
Homepage = "https://github.com/lablup/cutpilot"
"Bug Tracker" = "https://github.com/lablup/cutpilot/issues"
# CLI entry points.
# `cutpilot <source>` — offline pipeline run (CLI path).
# `cutpilot-serve` — FastAPI HTTP server for the UI.
[project.scripts]
cutpilot = "cutpilot.cli:app"
cutpilot-serve = "cutpilot.cli:serve"
# NeMo Agent Toolkit component registration. `nat` reads this table at install
# time to discover `@register_function` components. If a tool doesn't show up
# in `nat info components`, reinstall the package (`pip install -e .`).
[project.entry-points."nat.components"]
cutpilot_scout = "cutpilot.agents.scout:register"
cutpilot_cut = "cutpilot.tools.cut:register"
cutpilot_crop_9_16 = "cutpilot.tools.crop:register"
cutpilot_burn_captions = "cutpilot.tools.captions:register"
cutpilot_transcript_window = "cutpilot.tools.transcript_window:register"
cutpilot_splice = "cutpilot.tools.splice:register"
cutpilot_merge = "cutpilot.tools.merge:register"
cutpilot_save = "cutpilot.tools.save:register"
cutpilot_probe = "cutpilot.tools.probe:register"
# ---------------------------------------------------------------------------
# Build configuration
# ---------------------------------------------------------------------------
[tool.hatch.build.targets.wheel]
packages = ["src/cutpilot"]
[tool.hatch.build.targets.sdist]
include = [
"src/cutpilot",
"prompts",
"schemas",
"README.md",
]
# ---------------------------------------------------------------------------
# Linting and formatting — ruff is the SSoT for code style.
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line length handled by formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["N802", "N803"] # allow camelCase in test names if needed
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ---------------------------------------------------------------------------
# Type checking
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.13"
strict = true
warn_return_any = true
warn_unused_configs = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = [
"faster_whisper.*",
"ffmpeg.*",
"yt_dlp.*",
"nat.*",
]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
# ---------------------------------------------------------------------------
# Testing
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
pythonpath = ["src"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=cutpilot",
"--cov-report=term-missing",
]
markers = [
"integration: slow end-to-end tests (deselect with '-m \"not integration\"')",
"gpu: tests that require a GPU (deselect with '-m \"not gpu\"')",
"e2e: full-pipeline tests requiring all three NIMs (deselect with '-m \"not e2e\"')",
]
[tool.coverage.run]
source = ["src/cutpilot"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]