Skip to content

Commit 3632eca

Browse files
committed
[project] Update TODO style to be clickable
1 parent b83789b commit 3632eca

File tree

11 files changed

+28
-25
lines changed

11 files changed

+28
-25
lines changed

scenedetect/_cli/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def save_otio(
504504
frame_rate = context.video_stream.frame_rate
505505

506506
# List of track mapping to resource type.
507-
# TODO(#497): Allow exporting without an audio track.
507+
# TODO(https://scenedetect.com/issues/497): Allow OTIO export without an audio track.
508508
track_list = {"Video 1": "Video"}
509509
if audio:
510510
track_list["Audio 1"] = "Audio"

scenedetect/_cli/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _detect(context: CliContext) -> ty.Optional[ty.Tuple[SceneList, CutList]]:
120120
)
121121

122122
# Handle case where video failure is most likely due to multiple audio tracks (#179).
123-
# TODO(#380): Ensure this does not erroneusly fire.
123+
# TODO(https://scenedetect.com/issues/380): Ensure this does not erroneusly fire.
124124
if num_frames <= 0 and isinstance(context.video_stream, VideoStreamCv2):
125125
logger.critical(
126126
"Failed to read any frames from video file. This could be caused by the video"

scenedetect/backends/moviepy.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ def seek(self, target: ty.Union[FrameTimecode, float, int]):
185185
)
186186
success = True
187187
except OSError as ex:
188-
# TODO(#380): Other backends do not currently throw an exception if attempting to seek
189-
# past EOF. We need to ensure consistency for seeking past end of video with respect to
190-
# errors and behaviour, and should probably gracefully stop at the last frame instead
191-
# of throwing an exception.
188+
# TODO(https://scenedetect.com/issues/380): Other backends do not currently throw an
189+
# exception if attempting to seek past EOF.
190+
#
191+
# We need to ensure consistency for seeking past end of video with respect to errors and
192+
# behaviour, and should probably gracefully stop at the last frame instead of throwing.
192193
if target >= self.duration:
193194
raise SeekError("Target frame is beyond end of video!") from ex
194195
raise

scenedetect/backends/opencv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ def _open_capture(self, framerate: ty.Optional[float] = None):
324324
cap.set(cv2.CAP_PROP_ORIENTATION_AUTO, 1.0) # https://github.com/opencv/opencv/issues/26795
325325

326326

327-
# TODO(#168): Support non-monotonic timing for `position`. VFR timecode support is a
328-
# prerequisite for this. Timecodes are currently calculated by multiplying the framerate
329-
# by number of frames. Actual elapsed time can be obtained via `position_ms` for now.
327+
# TODO(https://scenedetect.com/issues/168): Support non-monotonic timing for `position`. VFR timecode
328+
# support is a prerequisite for this. Timecodes are currently calculated by multiplying the
329+
# framerate by number of frames. Actual elapsed time can be obtained via `position_ms` for now.
330330
class VideoCaptureAdapter(VideoStream):
331331
"""Adapter for existing VideoCapture objects. Unlike VideoStreamCv2, this class supports
332332
VideoCaptures which may not support seeking.

scenedetect/backends/pyav.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def __init__(
7070
"""
7171
self._container = None
7272

73-
# TODO(#258): See what self._container.discard_corrupt = True does with corrupt videos.
73+
# TODO(https://scenedetect.com/issues/258): See what `self._container.discard_corrupt = True`
74+
# does with corrupt videos.
7475
super().__init__()
7576

7677
# Ensure specified framerate is valid if set.

scenedetect/detectors/adaptive_detector.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ def get_metrics(self) -> ty.List[str]:
100100
def process_frame(
101101
self, timecode: FrameTimecode, frame_img: np.ndarray
102102
) -> ty.List[FrameTimecode]:
103-
# TODO(#283): Merge this with ContentDetector and turn it on by default.
104-
105103
super().process_frame(timecode=timecode, frame_img=frame_img)
106104

107105
# Initialize last scene cut point at the beginning of the frames of interest.

scenedetect/scene_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ def _process_frame(
387387
"""Add any cuts detected with the current frame to the cutting list. Returns True if any new
388388
cuts were detected, False otherwise."""
389389
new_cuts = False
390-
# TODO(#283): This breaks with AdaptiveDetector as cuts differ from the frame number
391-
# being processed. Allow detectors to specify the max frame lookahead they require
392-
# (i.e. any event will never be more than N frames behind the current one).
390+
# TODO(https://scenedetect.com/issues/283): This breaks with AdaptiveDetector as cuts differ
391+
# from the frame number being processed. Allow detectors to specify the max frame lookahead
392+
# they require (i.e. any event will never be more than N frames behind the current one).
393393
self._frame_buffer.append(frame_im)
394394
# frame_buffer[-1] is current frame, -2 is one behind, etc
395395
# so index based on cut frame should be [event_frame - (frame_num + 1)]

scenedetect/stats_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def register_metrics(self, metric_keys: ty.Iterable[str]) -> None:
118118
"""Register a list of metric keys that will be used by the detector."""
119119
self._metric_keys = self._metric_keys.union(set(metric_keys))
120120

121-
# TODO(#507): This interface is difficult to use, we should support the dictionary protocol.
122-
# Ideally this should work with Panadas. This could be done with the v0.7 API change.
121+
# TODO(https://scenedetect.com/issues/507): We should support the dictionary protocol instead
122+
# of using this bespoke interface. It would be useful for Pandas compatibility as well.
123123
def get_metrics(
124124
self, timecode: FrameTimecode, metric_keys: ty.Iterable[str]
125125
) -> ty.List[ty.Any]:

tests/test_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ def test_cli_save_images_path_handling(tmp_path: Path):
520520
assert image.shape == (544, 1280, 3)
521521

522522

523-
# TODO(#134): This works fine with OpenCV currently, but needs to be supported for PyAV and MoviePy.
523+
# TODO(https://scenedetect.com/issues/134): This works fine with OpenCV currently, but needs to be
524+
# supported for PyAV and MoviePy.
524525
def test_cli_save_images_rotation(rotated_video_file, tmp_path: Path):
525526
"""Test that `save-images` command rotates images correctly with the default backend."""
526527
assert (

tests/test_detectors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141

4242
ALL_DETECTORS: ty.Tuple[ty.Type[SceneDetector]] = (*FAST_CUT_DETECTORS, ThresholdDetector)
4343

44-
# TODO(#53): Add a test that verifies algorithms output relatively consistent frame scores
45-
# regardless of resolution. This will ensure that threshold values will hold true for different
46-
# input sources. Most detectors already provide this guarantee, so this is more to prevent any
47-
# regressions in the future.
44+
# TODO(https://scenedetect.com/issues/53): Add a test that verifies algorithms output relatively
45+
# consistent frame scores regardless of resolution. This will ensure that threshold values will hold
46+
# true for different input sources. Most detectors already provide this guarantee, so this is more
47+
# to prevent any regressions in the future.
4848

4949

5050
# TODO: Reduce code duplication here and in `conftest.py`

0 commit comments

Comments
 (0)