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

Fix for SerializableCollection::children_if #1404

Merged

Conversation

darbyjohnston
Copy link
Contributor

Signed-off-by: Darby Johnston [email protected]

Fixes #1400

Fixes an issue where SerializableCollection::children_if doesn't recurse into timelines. I'm marking this as a draft for now since it doesn't address all of the items in the issue (Python tests and missing arguments).

Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2022

Codecov Report

Merging #1404 (5c1f721) into main (cbef407) will increase coverage by 0.07%.
The diff coverage is 96.62%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1404      +/-   ##
==========================================
+ Coverage   85.99%   86.06%   +0.07%     
==========================================
  Files         200      201       +1     
  Lines       20934    21062     +128     
  Branches     2459     2461       +2     
==========================================
+ Hits        18002    18127     +125     
- Misses       2331     2333       +2     
- Partials      601      602       +1     
Flag Coverage Δ
py-unittests 86.06% <96.62%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
...c/py-opentimelineio/opentimelineio/schema/stack.py 66.66% <50.00%> (ø)
src/opentimelineio/serializableCollection.h 85.71% <80.00%> (-1.79%) ⬇️
...entimelineio-bindings/otio_serializableObjects.cpp 91.57% <88.88%> (ø)
tests/test_track.py 95.34% <95.34%> (ø)
...o/opentimelineio/schema/serializable_collection.py 100.00% <100.00%> (ø)
...y-opentimelineio/opentimelineio/schema/timeline.py 100.00% <100.00%> (ø)
...c/py-opentimelineio/opentimelineio/schema/track.py 100.00% <100.00%> (ø)
tests/test_serializable_collection.py 97.40% <100.00%> (+3.28%) ⬆️
tests/test_timeline.py 94.84% <100.00%> (+0.97%) ⬆️

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 cbef407...5c1f721. Read the comment docs.

Signed-off-by: Darby Johnston <[email protected]>
@darbyjohnston
Copy link
Contributor Author

I think I have addressed all the items from the issue as well as adding more consistent use of the "shallow_search" parameter to the various functions. @rogernelson has some interesting thoughts on a more efficient implementation of the "children_if" function, but maybe we need to decide whether the recursive searching functionality is actually appropriate for SerializableCollection.

@darbyjohnston darbyjohnston marked this pull request as ready for review September 22, 2022 17:03
@ssteinbach
Copy link
Collaborator

I think we should probably not do a major functionality switch on SerializableCollection right now, since we're in a release process. That is a conversation we can have for beta 16. Lets review this PR with its current functionality, and circle back to that other discussion later.

Thanks @darbyjohnston! I'll take a look at the code.

Copy link
Collaborator

@ssteinbach ssteinbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Saw (maybe) a copy paste typo in the unit tests? I probably missed some but I might just be misunderstanding the use of assertTrue, too. Let me know what you think!

src/opentimelineio/serializableCollection.h Show resolved Hide resolved
tests/test_timeline.cpp Outdated Show resolved Hide resolved
tests/test_timeline.cpp Outdated Show resolved Hide resolved
tests/test_timeline.cpp Outdated Show resolved Hide resolved
tests/test_track.cpp Outdated Show resolved Hide resolved
tests/test_track.cpp Outdated Show resolved Hide resolved
tests/test_track.cpp Outdated Show resolved Hide resolved
tests/test_track.cpp Outdated Show resolved Hide resolved
tests/test_track.py Outdated Show resolved Hide resolved
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
@ssteinbach ssteinbach added this to the Public Beta 15 milestone Sep 22, 2022
Copy link
Collaborator

@ssteinbach ssteinbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more assertTrue still in there

tests/test_serializable_collection.py Outdated Show resolved Hide resolved
tests/test_serializable_collection.py Outdated Show resolved Hide resolved
tests/test_serializable_collection.py Outdated Show resolved Hide resolved
tests/test_track.py Outdated Show resolved Hide resolved
tests/test_track.py Outdated Show resolved Hide resolved
Signed-off-by: Darby Johnston <[email protected]>
Copy link
Collaborator

@ssteinbach ssteinbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, this looks great. Thanks @darbyjohnston

@ssteinbach ssteinbach merged commit b9c2aa2 into AcademySoftwareFoundation:main Sep 23, 2022
@darbyjohnston darbyjohnston deleted the children_if_fix branch December 7, 2022 00:14
MichaelPlug pushed a commit to MichaelPlug/OpenTimelineIO that referenced this pull request Aug 5, 2023
…n#1404)

* Fix for children_if
* Missing shallow_search parameter fixes
* Refactor test_children_if tests
* Lint fixes
* Add Python tests

Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Michele Spina <[email protected]>
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.

SerializableCollection::children_if doesn't recurse correctly
5 participants