-
Notifications
You must be signed in to change notification settings - Fork 503
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (161 loc) · 5.8 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (161 loc) · 5.8 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
#
# PySceneDetect: Python-Based Video Scene Detector
# ---------------------------------------------------------------
# [ Site: http://www.bcastell.com/projects/PySceneDetect/ ]
# [ Github: https://github.com/Breakthrough/PySceneDetect/ ]
# [ Documentation: http://www.scenedetect.com/docs/ ]
#
# Copyright (C) 2014 Brandon Castellano <http://www.bcastell.com>.
#
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "scenedetect-core"
dynamic = ["version"]
description = "The detection pipeline for PySceneDetect (core library, minimal dependencies)."
readme = { file = "packaging/package-info.rst", content-type = "text/x-rst" }
license = "BSD-3-Clause"
license-files = ["LICENSE"]
requires-python = ">=3.10"
authors = [{ name = "Brandon Castellano", email = "brandon248@gmail.com" }]
keywords = ["video", "computer-vision", "analysis"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Console :: Curses",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Video",
"Topic :: Multimedia :: Video :: Conversion",
"Topic :: Multimedia :: Video :: Non-Linear Editor",
"Topic :: Utilities",
]
# OpenCV is required at runtime but intentionally NOT declared: any of the four
# opencv-python* variants satisfies the library, and downstream projects must be
# able to pick their own (https://scenedetect.com/issues/558). The `scenedetect`
# and `scenedetect-headless` packages (packaging/variants/) ship the same code
# with a concrete OpenCV variant plus the CLI dependencies.
dependencies = [
"numpy",
]
[project.optional-dependencies]
opencv = ["opencv-python"]
opencv-headless = ["opencv-python-headless"]
pyav = ["av>=9.2"]
moviepy = ["moviepy"]
dev = [
"av>=9.2",
# click 8.3.0 specifically is excluded per https://scenedetect.com/issues/521; 8.3.1+ are fine.
"click~=8.0,!=8.3.0",
"moviepy",
"opencv-python",
"platformdirs",
"pytest>=7.0",
"pytest-rerunfailures",
"tqdm",
]
docs = ["Sphinx==7.0.1", "sphinx-copybutton==0.5.2"]
website = ["mkdocs==1.5.2", "jinja2>=3.1.6"]
[project.urls]
Homepage = "https://www.scenedetect.com"
Documentation = "https://www.scenedetect.com/docs/"
Source = "https://github.com/Breakthrough/PySceneDetect"
Issues = "https://github.com/Breakthrough/PySceneDetect/issues"
# No [project.scripts]: the `scenedetect` console script is declared by the
# scenedetect/scenedetect-headless variants (packaging/variants/) so a core
# install stays library-only. Use `python -m scenedetect` from a core-only install.
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["scenedetect*"]
[tool.setuptools.dynamic]
version = { attr = "scenedetect.__version__" }
[tool.pytest.ini_options]
markers = [
"release: opt-in release-validation tests; excluded by default (run with `pytest -m release`)",
]
addopts = "-m 'not release'"
filterwarnings = [
"ignore:TODO.*Update caller to handle VFR:UserWarning",
# Promote unraisable (finalizer) and unhandled-thread exceptions to named test
# failures. A CI run on windows-latest once exited 1 with every test passing and
# no output - the failure mode pytest 9.1+ reports for unraisable exceptions
# collected at shutdown. These filters turn any recurrence into an attributable
# traceback instead of a bare exit code.
"error::pytest.PytestUnraisableExceptionWarning",
"error::pytest.PytestUnhandledThreadExceptionWarning",
]
[tool.ruff]
line-length = 100
indent-width = 4
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# pycodestyle
"E",
"W",
# Pyflakes
"F",
# isort
"I",
# pyupgrade
"UP",
# flake8-simplify
"SIM",
# ruff-native checks
"RUF",
]
ignore = [
# TODO: Audit re-exports in __init__.py files. Add `__all__` (note: must be kept in sync as
# new public symbols are added) or use redundant-alias form (`from x import Y as Y`).
"F401",
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
# Vendored third-party code: don't rewrite/modernize upstream source.
"scenedetect/_thirdparty/*" = ["UP"]
# CLI help text and validation messages are intentionally long.
"scenedetect/_cli/*" = ["E501"]
# Test data tables and golden output strings are clearer unwrapped.
"tests/*" = ["E501"]
# Doc generators and benchmark scripts mirror the CLI strings.
"docs/*" = ["E501"]
"benchmark/*" = ["E501"]
[tool.pyright]
include = ["scenedetect", "tests", "scripts", "packaging"]
exclude = [
# Pyright built-in defaults
"**/node_modules",
"**/__pycache__",
"**/.*",
".venv",
# Vendored third-party code
"scenedetect/_thirdparty",
# Release tests pull in extra deps (opentimelineio, psutil) that aren't in [dev]
"tests/release",
# User-local scripts (gitignored)
"scripts/local",
]
# Modes: "off" | "basic" | "standard" | "strict". The 0.7 codebase is clean
# at "basic". When tightening to "standard" or "strict" in the future, the
# cv2 / av / numpy / moviepy noise rules (reportUnknown*, reportMissingTypeStubs)
# will likely need to be re-added with "none" or scoped per-file.
typeCheckingMode = "basic"
# Analyze against the minimum supported Python so 3.11+-only APIs get flagged
# regardless of which interpreter runs pyright.
pythonVersion = "3.10"