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

Add function to explicitly load SchemaDef plugins #511

Merged

Conversation

Projects
None yet
4 participants
@ssteinbach
Copy link
Member

commented Apr 25, 2019

  • Currently, schemadefs are only loaded implicitly, either by reading a file that contains the schemadef or by calling ActiveManifest() or otio.schema.schemadef.from_name().module().
  • This PR adds a function otio.schema.schemadef.module_from_name() that makes it easy to explicitly load a plugin.
  • This also clarifies the unit tests around how schemadefs get loaded and adds some documentation about how to use this function.

@ssteinbach ssteinbach requested review from jminor and peachey Apr 25, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Apr 25, 2019

Codecov Report

Merging #511 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage   88.37%   88.45%   +0.07%     
==========================================
  Files          68       68              
  Lines        6969     6972       +3     
==========================================
+ Hits         6159     6167       +8     
+ Misses        810      805       -5
Impacted Files Coverage Δ
opentimelineio/schema/schemadef.py 100% <100%> (+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...c3538c6. Read the comment docs.

ssteinbach added some commits May 6, 2019

Add module_from_name to schemadef
- An easy way to force loading a schemadef plugin
- returns the module object from the plugin
- Also clarifies that from_name returns the plugin
	object itself
Add unit tests for explicitly loading schemadef
- Add testing for both the module_from_name() path and implicit loading
  by reading a file containing the schemadef.
- Clarify the existing tests by manually loading the plugin.

@ssteinbach ssteinbach force-pushed the ssteinbach:autoload_schemadefs branch from 4fbba77 to 6332b31 May 6, 2019

@ssteinbach ssteinbach changed the title Add schemadef wrapper module class Add function to explicitly load SchemaDef plugins May 6, 2019

@ssteinbach ssteinbach requested a review from mikemahony May 6, 2019

@ssteinbach ssteinbach added this to the Public Beta 11 milestone May 6, 2019

@jminor

jminor approved these changes May 7, 2019

@ssteinbach ssteinbach merged commit 929149e into PixarAnimationStudios:master May 7, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@ssteinbach ssteinbach deleted the ssteinbach:autoload_schemadefs branch May 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.