Skip to content

Add python bindings for the edit functions - #2077

Open
darbyjohnston wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
darbyjohnston:edit-python-bindings
Open

darbyjohnston wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
darbyjohnston:edit-python-bindings

Conversation

@darbyjohnston

@darbyjohnston darbyjohnston commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds Python bindings for the editing functions: src/opentimelineio/algo/editAlgorithm.h

Assisted-by: Claude Code / Claude Opus 5.5

@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.86503% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.46%. Comparing base (eee67fd) to head (2d72e54).

Files with missing lines Patch % Lines
...eio/opentimelineio-bindings/otio_editAlgorithm.cpp 90.24% 8 Missing ⚠️
tests/test_edit_algo.py 96.96% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2077      +/-   ##
==========================================
+ Coverage   83.61%   85.46%   +1.84%     
==========================================
  Files         183      186       +3     
  Lines       13579    13742     +163     
  Branches     1261     1254       -7     
==========================================
+ Hits        11354    11744     +390     
+ Misses       2052     1824     -228     
- Partials      173      174       +1     
Flag Coverage Δ
py-unittests 85.46% <93.86%> (+1.84%) ⬆️

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

Files with missing lines Coverage Δ
...melineio/opentimelineio-bindings/otio_bindings.cpp 98.64% <100.00%> (+<0.01%) ⬆️
...entimelineio/opentimelineio/algorithms/__init__.py 100.00% <100.00%> (ø)
...y-opentimelineio/opentimelineio/algorithms/edit.py 100.00% <100.00%> (ø)
tests/test_edit_algo.py 96.96% <96.96%> (ø)
...eio/opentimelineio-bindings/otio_editAlgorithm.cpp 90.24% <90.24%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eee67fd...2d72e54. Read the comment docs.

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

The functions in algo/editAlgorithm.h (overwrite, insert, trim, slice,
slip, slide, ripple, roll, fill and remove) and the ReferencePoint enum
are available as otio.algorithms.edit. The tests check that each one can
be called from Python; the algorithms are tested in C++.

Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
@darbyjohnston

Copy link
Copy Markdown
Collaborator Author

Fixes from the original PR split out here:
#2079

@jhodges10

Copy link
Copy Markdown
Collaborator

@darbyjohnston is it worth setting up a CI job that checks the coverage of the C++ functions for python coverage going forwards, similar to the one that checks for test coverage and posting that as a comment?

@darbyjohnston

Copy link
Copy Markdown
Collaborator Author

I think the edit functions didn't have Python bindings because they were considered experimental:
#1654

They have been in C++ API for a few years now, so it seems reasonable to also include them with Python.

@jhodges10

Copy link
Copy Markdown
Collaborator

I think the edit functions didn't have Python bindings because they were considered experimental: #1654

They have been in C++ API for a few years now, so it seems reasonable to also include them with Python.

I would agree with that assessment.

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.

3 participants