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

Suggest to loosen the dependency on fuzzywuzzy #35

Open
Agnes-U opened this issue Jul 17, 2022 · 0 comments
Open

Suggest to loosen the dependency on fuzzywuzzy #35

Agnes-U opened this issue Jul 17, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Jul 17, 2022

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

May I pull a request to further 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?



We also give our detailed analysis as follows for your reference:

Your project geonames-reconcile directly uses 1 APIs from package fuzzywuzzy.

fuzzywuzzy.fuzz.token_sort_ratio

Beginning from the 1 APIs above, 19 functions are then indirectly called, including 15 fuzzywuzzy's internal APIs and 4 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/cmharlow/geonames-reconcile]
+--fuzzywuzzy.fuzz.token_sort_ratio
|      +--fuzzywuzzy.fuzz._token_sort
|      |      +--fuzzywuzzy.fuzz._process_and_sort
|      |      |      +--fuzzywuzzy.utils.full_process
|      |      |      |      +--fuzzywuzzy.utils.asciidammit
|      |      |      |      |      +--fuzzywuzzy.utils.asciionly
|      |      |      |      |      +--fuzzywuzzy.utils.asciidammit
|      |      |      |      +--fuzzywuzzy.string_processing.StringProcessor.replace_non_letters_non_numbers_with_whitespace
|      |      +--fuzzywuzzy.fuzz.partial_ratio
|      |      |      +--fuzzywuzzy.utils.make_type_consistent
|      |      |      +--difflib.SequenceMatcher
|      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.__init__
|      |      |      |      +--warnings.warn
|      |      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher._reset_cache
|      |      |      +--difflib.SequenceMatcher.get_matching_blocks
|      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.get_matching_blocks
|      |      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.get_opcodes
|      |      |      +--difflib.SequenceMatcher.ratio
|      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.ratio
|      |      |      +--fuzzywuzzy.utils.intr
|      |      +--fuzzywuzzy.fuzz.ratio
|      |      |      +--fuzzywuzzy.utils.make_type_consistent
|      |      |      +--difflib.SequenceMatcher
|      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.__init__
|      |      |      +--fuzzywuzzy.utils.intr
|      |      |      +--difflib.SequenceMatcher.ratio
|      |      |      +--fuzzywuzzy.StringMatcher.StringMatcher.ratio

We scan fuzzywuzzy's versions and observe that during its evolution between any version from [0.17.0] and 0.18.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.18.0(original) 0.17.0
['fuzzywuzzy.process.extractWithoutOrder']

As for other packages, the APIs of difflib and warnings 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.18.0" to "fuzzywuzzy>=0.17.0,<=0.18.0". This will improve the applicability of geonames-reconcile and reduce the possibility of any further dependency conflict with other projects.

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

No branches or pull requests

1 participant