AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.45k stars 287 forks source link

Replaced usages of deprecated pkg_resources module #1675

Closed reinecke closed 11 months ago

reinecke commented 11 months ago

Summarize your change.

pkg_resources is now deprecated. This PR removes references to that module.

Refactored plugin.manifest module to factor the pip installed package discovery into a separate function. Made otiopluginfo and otioconvert use that function rather than doing their own plugin discovery.

Reference associated tests.

I did not add new tests, but I validated the output of otiopluginfo --version and otioconvert --version to validate they're nearly identical. The only difference is that the string Plugins from pkg_resources: is now Plugins from installed packages:.

codecov-commenter commented 11 months ago

Codecov Report

Merging #1675 (2a62132) into main (bd7ae17) will increase coverage by 0.02%. The diff coverage is 33.33%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675/graphs/tree.svg?width=650&height=150&src=pr&token=mfnfUB4h7u&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation)](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) ```diff @@ Coverage Diff @@ ## main #1675 +/- ## ========================================== + Coverage 79.83% 79.86% +0.02% ========================================== Files 197 197 Lines 21769 21764 -5 Branches 4355 4353 -2 ========================================== + Hits 17379 17381 +2 + Misses 2236 2230 -6 + Partials 2154 2153 -1 ``` | [Flag](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) | Coverage Δ | | |---|---|---| | [py-unittests](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) | `79.86% <33.33%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) | Coverage Δ | | |---|---|---| | [...-opentimelineio/opentimelineio/plugins/manifest.py](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation#diff-c3JjL3B5LW9wZW50aW1lbGluZWlvL29wZW50aW1lbGluZWlvL3BsdWdpbnMvbWFuaWZlc3QucHk=) | `91.66% <71.42%> (+0.16%)` | :arrow_up: | | [...entimelineio/opentimelineio/console/otioconvert.py](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation#diff-c3JjL3B5LW9wZW50aW1lbGluZWlvL29wZW50aW1lbGluZWlvL2NvbnNvbGUvb3Rpb2NvbnZlcnQucHk=) | `77.89% <0.00%> (+1.60%)` | :arrow_up: | | [...ntimelineio/opentimelineio/console/otiopluginfo.py](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation#diff-c3JjL3B5LW9wZW50aW1lbGluZWlvL29wZW50aW1lbGluZWlvL2NvbnNvbGUvb3Rpb3BsdWdpbmZvLnB5) | `75.22% <16.66%> (+2.18%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation). Last update [bd7ae17...2a62132](https://app.codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/pull/1675?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AcademySoftwareFoundation).