-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
190 lines (171 loc) · 4.91 KB
/
pyproject.toml
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
[project]
name = "mosaico"
version = "0.1.0rc4"
description = "Open-source video generation framework"
authors = [
{ name = "Leonardo Diegues", email = "leonardo.diegues@grupofolha.com.br" },
{ name = "Lucas Golino", email = "lucas@golinux.space" },
]
readme = "README.md"
requires-python = ">=3.10,<3.13"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Topic :: Multimedia",
"Topic :: Multimedia :: Video :: Non-Linear Editor",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Topic :: Multimedia :: Sound/Audio :: Sound Synthesis",
"Topic :: Text Processing :: Fonts",
]
dependencies = [
"pydantic",
"pyyaml",
"moviepy>=2.0.0.dev2",
"opencv-python>=4.10.0.84",
"findsystemfontsfilename>=0.3.0",
"pydub>=0.25.1",
"pydantic-extra-types>=2.9.0",
"pycountry>=24.6.1",
"tinytag>=1.10.1",
"fsspec>=2024.10.0",
]
[project.scripts]
mosaico = "mosaico.cli:entrypoint"
[project.optional-dependencies]
cli = ["click>=8.1.7"]
assemblyai = ["assemblyai>=0.34.0"]
langchain = ["langchain>=0.3.7"]
haystack = ["haystack-ai>=2.6.1"]
elevenlabs = ["elevenlabs>=1.9.0"]
news = ["instructor>=1.6.4", "litellm>=1.52.9"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
"pytest-mock>=3.14.0",
"types-pyyaml>=6.0.12.20240808",
"typing-extensions>=4.12.2",
"ruff>=0.6.2",
"mypy>=1.11.2",
"pre-commit>=4.0.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.5.39",
"mkdocstrings-python>=1.11.1",
"griffe>=1.3.2",
"mkdocs-redirects>=1.2.1",
"mike>=2.1.3",
"mkdocstrings>=0.26.1",
"black>=24.10.0",
"mkdocs-print-site-plugin>=2.6.0",
"mkdocs-static-i18n>=1.2.3",
]
[tool.ruff]
fix = true
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"ASYNC", # flake8-async
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"E501", # Long lines
"EXE", # flake8-executable
"F", # Pyflakes
"INT", # flake8-gettext
"PERF", # Perflint
"PL", # Pylint
"Q", # flake8-quotes
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"TID", # flake8-tidy-imports
"W", # pycodestyle
"YTT", # flake8-2020
"I", # isort
# built-in shadowing
"A001", # builtin-variable-shadowing
"A002", # builtin-argument-shadowing
"A003", # builtin-attribute-shadowing
# docstring rules
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D209", # Closing triple quotes go to new line
"D205", # 1 blank line required between summary line and description
"D213", # summary lines must be positioned on the second physical line of the docstring
"D417", # undocumented-parameter
"D419", # undocumented-returns
]
ignore = [
"PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # Use a list comprehension to create a transformed list
"PLR1714", # repeated-equality-comparison
"PLR5501", # collapsible-else-if
"PLW0603", # global-statement
"PLW1510", # subprocess-run-without-check
"PLW2901", # redefined-loop-name
"SIM108", # if-else-block-instead-of-if-exp
"SIM115", # open-file-with-context-handler
"SIM118", # in-dict-keys
]
[tool.ruff.lint.per-file-ignores]
"src/mosaico/config.py" = ["ARG003", "S104", "D102", "D106"]
"src/mosaico/assets/factory.py" = ["A002"]
"src/mosaico/video/project_builder.py" = ["C901", "PLR0912"]
"src/mosaico/speech_synthesizers/*.py" = ["D102"]
"cookbook/*.py" = ["F821"]
"tests/*.py" = ["S101", "D", "ARG001", "PLR2004"]
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.isort]
known-first-party = ["mosaico"]
lines-after-imports = 2
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
addopts = [
"-vv",
"--cov=mosaico",
"--cov-report=term-missing",
"--cov-report=xml",
"--junitxml=report.xml",
]
[tool.coverage.paths]
mosaico = ["src/mosaico"]
[tool.coverage.run]
source = ["src/mosaico"]
omit = [
"src/mosaico/__main__.py",
"src/mosaico/cli.py",
"src/mosaico/version.py",
"src/mosaico/**/protocol.py",
]
branch = true
parallel = true
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"def __init__",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@overload",
]