Tyzer34 / plexMusicPlayer

Playback music with Alexa from your Plex Server!
https://medium.com/@Tyzer34/plex-alexa-the-perfect-wedding-38b14b41faf0#.b71cd6lsn
GNU General Public License v3.0
35 stars 19 forks source link

Suggest to loosen the dependency on fuzzywuzzy #37

Open Agnes-U opened 1 year ago

Agnes-U commented 1 year ago

Hi, your project plexMusicPlayer requires "fuzzywuzzy==0.14.0" in its dependency. After analyzing the source code, we found that some other versions of fuzzywuzzy can also be suitable without affecting your project, i.e., fuzzywuzzy 0.15.0. Therefore, we suggest to loosen the dependency on fuzzywuzzy from "fuzzywuzzy==0.14.0" to "fuzzywuzzy>=0.14.0,<=0.15.0" to avoid any possible conflict for importing more packages or for downstream projects that may use plexMusicPlayer.

May I pull a request to loosen the dependency on fuzzywuzzy?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



For your reference, here are details in our analysis.

Your project plexMusicPlayer(commit id: 8b4b4dac35d6ba7ba8719d0d86d7f3cb331b70d6) directly uses 1 APIs from package fuzzywuzzy.

fuzzywuzzy.process.extractOne

From which, 2 functions are then indirectly called, including 1 fuzzywuzzy's internal APIs and 1 outsider APIs, as follows (neglecting some repeated function occurrences).

[/Tyzer34/plexMusicPlayer]
+--fuzzywuzzy.process.extractOne
|      +--fuzzywuzzy.process.extractWithoutOrder
|      |      +--logging.warning

We scan fuzzywuzzy's versions among [0.15.0] and 0.14.0, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 0.14.0(original) 0.15.0
['fuzzywuzzy.utils.validate_string', 'fuzzywuzzy.fuzz.WRatio', 'fuzzywuzzy.fuzz.QRatio', 'fuzzywuzzy.fuzz.UQRatio']

As for other packages, the APIs of @outside_package_name are called by fuzzywuzzy in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on fuzzywuzzy from "fuzzywuzzy==0.14.0" to "fuzzywuzzy>=0.14.0,<=0.15.0". This will improve the applicability of plexMusicPlayer and reduce the possibility of any further dependency conflict with other projects/packages.