Skip to content

feat: generate videos that play a clip of the source video - #275

Closed
saraburns1 wants to merge 1 commit into
openedx:mainfrom
saraburns1:video-clip-times
Closed

saraburns1 wants to merge 1 commit into
openedx:mainfrom
saraburns1:video-clip-times

Conversation

@saraburns1

Copy link
Copy Markdown
Contributor

Description

Video blocks can be set to play only a clip of the source video (start/end time in Studio). The edx-platform video player then reports length as the clip duration (endTime - startTime) but time against the full source video, which made Aspects show positions past the end of the video.

This generates that case so load and test data cover it:

  • About 25% of generated videos are clips: start between 10–60s, at least 60s long, ending within the 195s source video (VIDEO_CLIP_* in constants.py).
  • Video events for clipped videos report the clip length, and positions between the clip start and end in the source video, as the real player does. Unclipped videos are unchanged.
  • Course block data for every video includes video_start_time and video_end_time (0.0 when not clipped), matching what the course block sink sends.

Related:

Testing

  • Added tests for clipped and unclipped video events and block data, and for the generated clip bounds. The full suite passes (76 tests), and pylint, pycodestyle, pydocstyle, mypy and isort are clean.
  • Manually: load data into an Aspects instance with aspects-dbt#179 applied. Video positions and watched segments for clipped videos should stay within the clip length.

🤖 Generated with Claude Code

About a quarter of generated videos now have a start and end time, like
videos configured in Studio to play only part of the source video. As
with the real video player, their events report the length of the clip
but positions in the full source video, and their course block data
includes video_start_time and video_end_time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.67%. Comparing base (9f7cac1) to head (2a4149f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   85.54%   85.67%   +0.12%     
==========================================
  Files          29       29              
  Lines        1986     2004      +18     
  Branches      175      175              
==========================================
+ Hits         1699     1717      +18     
  Misses        260      260              
  Partials       27       27              
Flag Coverage Δ
unittests 85.67% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saraburns1 saraburns1 closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant