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 a --version flag to otiopluginfo + otioconvert #880

Conversation

ssteinbach
Copy link
Collaborator

@ssteinbach ssteinbach commented Feb 9, 2021

Adds a --version flag to otiopluginfo and otioconvert. This:

  • prints out the __version__ string
  • searches for pkg_resource installed plugins, and prints out their dist info (which includes their version numbers)

Question for the community: After seeing this I kind of wish there was a way to also burn the git commit hash into the repo some how. Not sure if thats useful, but it something we could potentially do when we burn the version numbers in.

Output looks like this:

> otioconvert --version
OpenTimelineIO version: 0.14.0.dev1
No pkg_resource plugins installed.

@codecov-io
Copy link

codecov-io commented Feb 10, 2021

Codecov Report

Merging #880 (d919575) into master (2a33b58) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #880   +/-   ##
=======================================
  Coverage   84.36%   84.36%           
=======================================
  Files          74       74           
  Lines        3090     3090           
=======================================
  Hits         2607     2607           
  Misses        483      483           
Flag Coverage Δ
unittests 84.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 2a33b58...d919575. Read the comment docs.

@ssteinbach ssteinbach added this to the Public Beta 14 milestone Feb 10, 2021
Copy link
Collaborator

@reinecke reinecke left a comment

Choose a reason for hiding this comment

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

Just the one behavior question to make sure there isn't a missing exit, otherwise looks good!

for plugin in pkg_resource_plugins:
print(" {}".format(plugin.dist))
else:
print("No pkg_resource plugins installed.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the intent to not exit after printing version info and continue printing the usual info?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct. The thought was that this program is just dumping information about the installation anyway, so --version is an additive option and doesn't prevent printing everything else. Happy to change that if you think its too much of a break from expected behavior though.

@ssteinbach ssteinbach merged commit 3c1e28e into AcademySoftwareFoundation:master Mar 5, 2021
@ssteinbach ssteinbach deleted the otio_version_in_pluginfo branch March 5, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants