bumped version to 0.2.1 and updated HISTORY

This commit is contained in:
Tal Einat 2014-03-14 12:49:47 +02:00
parent fa5c9c591f
commit 77fe129c50
4 changed files with 43 additions and 3 deletions

View File

@ -3,6 +3,17 @@
History
-------
0.2.1 (2014-03-14)
++++++++++++++++++
* Fixed major match grouping bug
0.2.0 (2013-03-13)
++++++++++++++++++
* New utility function `find_near_matches()` for easier use
* Additional documentation
0.1.0 (2013-11-12)
++++++++++++++++++

View File

@ -13,7 +13,7 @@ Example:
"""
__author__ = 'Tal Einat'
__email__ = 'taleinat@gmail.com'
__version__ = '0.2.0'
__version__ = '0.2.1'
__all__ = [
'find_near_matches_with_ngrams',

View File

@ -19,7 +19,7 @@ history = open('HISTORY.rst').read().replace('.. :changelog:', '')
setup(
name='fuzzysearch',
version='0.2.0',
version='0.2.1',
description='fuzzysearch is useful for finding approximate subsequence matches',
long_description=readme + '\n\n' + history,
author='Tal Einat',

View File

@ -102,7 +102,6 @@ class TestFuzzySearchBase(object):
def test_substring(self):
substring = 'PATTERN'
text = 'aaaaaaaaaaPATTERNaaaaaaaaa'
idx = text.find(substring)
expected_match = Match(start=10, end=17, dist=0)
self.assertEquals(
@ -265,6 +264,36 @@ class TestFuzzySearchBase(object):
self.search(pattern, text, max_l_dist=2),
)
def test_protein_search1(self):
# see: BioPython archives from March 14th, 2014
text = ''.join('''\
XXXXXXXXXXXXXXXXXXXGGGTTVTTSSAAAAAAAAAAAAAGGGTTLTTSSAAAAAAAAAAAA
AAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBGGGTTLTTSS
'''.split())
pattern = "GGGTTLTTSS"
self.assertItemsEqual(
[Match(start=19, end=29, dist=1),
Match(start=42, end=52, dist=0),
Match(start=99, end=109, dist=0)],
self.search(pattern, text, max_l_dist=2),
)
def test_protein_search2(self):
# see: BioPython archives from March 14th, 2014
text = ''.join('''\
XXXXXXXXXXXXXXXXXXXGGGTTVTTSSAAAAAAAAAAAAAGGGTTVTTSSAAAAAAAAAAA
AAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBGGGTTLTTSS
'''.split())
pattern = "GGGTTLTTSS"
self.assertItemsEqual(
[Match(start=19, end=29, dist=1),
Match(start=42, end=52, dist=1),
Match(start=99, end=109, dist=0)],
self.search(pattern, text, max_l_dist=2),
)
class TestFindNearMatchesWithNgrams(TestFuzzySearchBase, unittest.TestCase):
def search(self, subsequence, sequence, max_l_dist):