bumped version to 0.2.1 and updated HISTORY
This commit is contained in:
parent
fa5c9c591f
commit
77fe129c50
11
HISTORY.rst
11
HISTORY.rst
|
@ -3,6 +3,17 @@
|
||||||
History
|
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)
|
0.1.0 (2013-11-12)
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Example:
|
||||||
"""
|
"""
|
||||||
__author__ = 'Tal Einat'
|
__author__ = 'Tal Einat'
|
||||||
__email__ = 'taleinat@gmail.com'
|
__email__ = 'taleinat@gmail.com'
|
||||||
__version__ = '0.2.0'
|
__version__ = '0.2.1'
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'find_near_matches_with_ngrams',
|
'find_near_matches_with_ngrams',
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -19,7 +19,7 @@ history = open('HISTORY.rst').read().replace('.. :changelog:', '')
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='fuzzysearch',
|
name='fuzzysearch',
|
||||||
version='0.2.0',
|
version='0.2.1',
|
||||||
description='fuzzysearch is useful for finding approximate subsequence matches',
|
description='fuzzysearch is useful for finding approximate subsequence matches',
|
||||||
long_description=readme + '\n\n' + history,
|
long_description=readme + '\n\n' + history,
|
||||||
author='Tal Einat',
|
author='Tal Einat',
|
||||||
|
|
|
@ -102,7 +102,6 @@ class TestFuzzySearchBase(object):
|
||||||
def test_substring(self):
|
def test_substring(self):
|
||||||
substring = 'PATTERN'
|
substring = 'PATTERN'
|
||||||
text = 'aaaaaaaaaaPATTERNaaaaaaaaa'
|
text = 'aaaaaaaaaaPATTERNaaaaaaaaa'
|
||||||
idx = text.find(substring)
|
|
||||||
expected_match = Match(start=10, end=17, dist=0)
|
expected_match = Match(start=10, end=17, dist=0)
|
||||||
|
|
||||||
self.assertEquals(
|
self.assertEquals(
|
||||||
|
@ -265,6 +264,36 @@ class TestFuzzySearchBase(object):
|
||||||
self.search(pattern, text, max_l_dist=2),
|
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):
|
class TestFindNearMatchesWithNgrams(TestFuzzySearchBase, unittest.TestCase):
|
||||||
def search(self, subsequence, sequence, max_l_dist):
|
def search(self, subsequence, sequence, max_l_dist):
|
||||||
|
|
Loading…
Reference in New Issue