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

AAF Writer: Making precheck() more robust #512

Merged

Conversation

freesonluxo
Copy link
Contributor

This addresses #484 (not fixing it, but making the failure more elegant).

The validate_metadata() function requires access and verification of certain fields in objects that may or not be there. I thought that using a "promise" like pattern led to a much more elegant, robust result. Hopefully this isn't too much overkill, it does allow our precheck to be a lot more expressive.

@freesonluxo freesonluxo marked this pull request as ready for review May 7, 2019 00:16
@codecov-io
Copy link

codecov-io commented May 7, 2019

Codecov Report

Merging #512 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
+ Coverage   88.37%   88.54%   +0.16%     
==========================================
  Files          68       68              
  Lines        6969     6981      +12     
==========================================
+ Hits         6159     6181      +22     
+ Misses        810      800      -10
Impacted Files Coverage Δ
...elineio_contrib/adapters/tests/test_aaf_adapter.py 98.44% <100%> (+0.03%) ⬆️
...elineio_contrib/adapters/aaf_adapter/aaf_writer.py 97.23% <100%> (+1.24%) ⬆️
opentimelineio/schema/schemadef.py 100% <0%> (+26.31%) ⬆️

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 d77adfe...b3682a9. Read the comment docs.

@freesonluxo
Copy link
Contributor Author

Perhaps I should add a negative test that actually fails the precheck here.

@freesonluxo
Copy link
Contributor Author

Hm. I'd like to check some more things before pushing this. Can we pause on this for now?

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 great, thanks @freesonluxo!

@freesonluxo
Copy link
Contributor Author

Actually, I think I might have jumped the gun thinking my code was causing issues. It was user error. This is ready to be pushed!

@ssteinbach ssteinbach merged commit c35f6a1 into AcademySoftwareFoundation:master May 8, 2019
@freesonluxo freesonluxo deleted the freeson-otio-484 branch May 24, 2019 21:58
ssteinbach pushed a commit to ssteinbach/OpenTimelineIO that referenced this pull request Jun 20, 2019
)

* Adds better error messages for when the AAF Writer's precheck fails
* Adding precheck failer negative test
@ssteinbach ssteinbach added this to the Public Beta 11 milestone Jul 19, 2019
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.

4 participants