This is an archive of the discontinued Mercurial Phabricator instance.

releasenotes: make the import of fuzzywuzzy optional
ClosedPublic

Authored by pulkit on Oct 15 2017, 11:14 AM.

Details

Summary

If fuzzywuzzy is note present, we will not be having the capability to merge
existing releasenotes with the new releasenotes on the similarity basis.
The merging will still work good for exact same releasenotes entries.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Oct 15 2017, 11:14 AM
yuja requested changes to this revision.Oct 16 2017, 9:05 AM
yuja added a subscriber: yuja.
yuja added inline comments.
hgext/releasenotes.py
222

Needs to evaluate the fuzz module to get around the demandimport.

e.g.

try:
    from fuzzywuzzy import fuzz
    fuzz.token_set_ratio
except ImportError
224

Perhaps it should return True.

Any maybe it should show warning, status or debug message?

This revision now requires changes to proceed.Oct 16 2017, 9:05 AM
pulkit added inline comments.Oct 16 2017, 10:18 AM
hgext/releasenotes.py
224

Yes it should return True and I think the doc of this function is wrong. Nice catch.

pulkit added inline comments.Oct 16 2017, 10:24 AM
hgext/releasenotes.py
224

Also, whatever message we will use here, warning, status or debug, it will be repeated a lot of times as the function is called a lot of times. This extension need some cleanup. :(

pulkit marked 2 inline comments as done.Oct 16 2017, 2:30 PM
yuja accepted this revision.Oct 17 2017, 9:44 AM
This revision is now accepted and ready to land.Oct 17 2017, 9:44 AM
This revision was automatically updated to reflect the committed changes.