Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace OTIO Core with python-wrapped C++ #540

Merged
merged 140 commits into from Jul 22, 2019
Merged

Replace OTIO Core with python-wrapped C++ #540

merged 140 commits into from Jul 22, 2019

Conversation

@ssteinbach
Copy link
Member

@ssteinbach ssteinbach commented Jul 17, 2019

This PR replaces the pure-python core of OpenTimelineIO with python wrapped C++. The functionality should be the same. There are some differences:

  • RationalTime enforces float types for its values. Serialized otio files will see a lot of .0s added if files are compared before/after this change.
  • the Name field defaults to "" instead of None
  • The .metadata dictionaries are of type AnyDictionary, so OrderedDicts and other similar classes will lose their type when being added to the metadata immediately (instead of being lost on serialization).
  • There is no longer a .children attribute on container classes.
  • The tox.ini file was collapsed into the setup.cfg file, along with some tuning of the lint settings.

Note that the C++ core does not include support for any of the plugins. Those are still entirely implemented in python. Non-plugin features are present in C++:

  • Reading/writing .otio files
  • Iterating over objects
  • Manipulating OTIO objects

Much like the core python project, the C++ is split into two libraries: opentime for manipulating time objects, and opentimelineio, which has all the functionality of the OpenTimelineIO data structures.

This adds some dependencies to the project (managed through Git submodules in the src/deps directory). When you sync after this change you'll need to use the git submodule init command to sync the dependencies. These dependencies include:

  • CMake (note that pip install . should still work and invoke cmake correctly under the hood for python only users)
  • Rapidjson
  • AnyDictionary
  • Optional-lite
  • pybind11

This PR also includes some preliminary Swift bindings as well (see src/swift-opentimelineio).

Huge thanks to @davidbaraff who did the port to C++, as well as the python and swift bindings.

David Baraff and others added 30 commits Apr 8, 2019
@ssteinbach ssteinbach added this to the 1.0 Release milestone Jul 17, 2019
@ssteinbach ssteinbach added this to To Do in C++ API via automation Jul 17, 2019
@ssteinbach ssteinbach mentioned this pull request Jul 17, 2019
@codecov-io
Copy link

@codecov-io codecov-io commented Jul 17, 2019

Codecov Report

Merging #540 into master will decrease coverage by 7.38%.
The diff coverage is 81.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #540      +/-   ##
==========================================
- Coverage   88.66%   81.28%   -7.39%     
==========================================
  Files          69       72       +3     
  Lines        7502     2731    -4771     
==========================================
- Hits         6652     2220    -4432     
+ Misses        850      511     -339
Flag Coverage Δ
#py27 81.29% <81.29%> (?)
#py36 81.29% <81.29%> (?)
#py37 81.29% <81.29%> (?)
Impacted Files Coverage Δ
src/opentimelineio/stringUtils.h 0% <0%> (ø)
src/opentimelineio/unknownSchema.h 0% <0%> (ø)
src/opentimelineio/timeline.h 100% <100%> (ø)
src/opentimelineio/track.h 100% <100%> (ø)
src/opentimelineio/marker.h 100% <100%> (ø)
src/opentimelineio/timeEffect.cpp 100% <100%> (ø)
src/opentimelineio/item.h 100% <100%> (ø)
...eio/opentimelineio-bindings/otio_anyDictionary.cpp 100% <100%> (ø)
src/opentimelineio/freezeFrame.cpp 100% <100%> (ø)
src/opentimelineio/gap.cpp 100% <100%> (ø)
... and 134 more

Continue to review full report at Codecov.

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

@ssteinbach ssteinbach merged commit ba04951 into master Jul 22, 2019
2 checks passed
C++ API automation moved this from To Do to Done Jul 22, 2019
@ssteinbach ssteinbach removed this from the 1.0 Release milestone Jul 22, 2019
@ssteinbach ssteinbach added this to the Public Beta 12 milestone Jul 22, 2019
@ssteinbach ssteinbach deleted the cxx branch Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
C++ API
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants