From 932952dbca07e57aa50ddc77cfd8507d62b34089 Mon Sep 17 00:00:00 2001 From: Martin Pajuste Date: Tue, 1 Dec 2020 16:16:57 +0200 Subject: [PATCH 1/6] Test Python 3.9 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7033cf8..c05faa7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8] + python-version: [3.5, 3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 From 2c2d5786c25b0b626f08d6a13821290bae45de3f Mon Sep 17 00:00:00 2001 From: Martin Pajuste Date: Tue, 1 Dec 2020 16:31:07 +0200 Subject: [PATCH 2/6] Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 99f057c..3526c39 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ) From 2efcfe7a8f095964609eba6c985d70426d2a1bc1 Mon Sep 17 00:00:00 2001 From: luozhouyang Date: Tue, 15 Dec 2020 10:40:51 +0800 Subject: [PATCH 3/6] Release v0.2.0 --- setup.py | 2 +- strsimpy/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3526c39..5b18632 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="strsimpy", - version="0.1.9", + version="0.2.0", description="A library implementing different string similarity and distance measures", long_description=long_description, long_description_content_type="text/markdown", diff --git a/strsimpy/__init__.py b/strsimpy/__init__.py index 1e10460..f897911 100644 --- a/strsimpy/__init__.py +++ b/strsimpy/__init__.py @@ -37,4 +37,4 @@ from .sift4 import SIFT4Options, SIFT4 __name__ = 'strsimpy' -__version__ = '0.1.9' +__version__ = '0.2.0' From 060e1372c2b029eb637c5c205f336b5f89374c7a Mon Sep 17 00:00:00 2001 From: Adam Horacek Date: Fri, 10 Sep 2021 08:33:41 +0200 Subject: [PATCH 4/6] fix ngram distance for strings shorter then N --- strsimpy/ngram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strsimpy/ngram.py b/strsimpy/ngram.py index c3860b7..27d4ae1 100644 --- a/strsimpy/ngram.py +++ b/strsimpy/ngram.py @@ -46,7 +46,7 @@ def distance(self, s0, s1): for i in range(min(sl, tl)): if s0[i] == s1[i]: cost += 1 - return 1.0 * cost / max(sl, tl) + return 1.0 - cost / max(sl, tl) sa = [''] * (sl + self.n - 1) From 060a51ca863ff335775ac29cb2ded186fd88062a Mon Sep 17 00:00:00 2001 From: luozhouyang Date: Fri, 10 Sep 2021 17:11:35 +0800 Subject: [PATCH 5/6] Release v0.2.1 --- setup.py | 2 +- strsimpy/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5b18632..20da3f8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="strsimpy", - version="0.2.0", + version="0.2.1", description="A library implementing different string similarity and distance measures", long_description=long_description, long_description_content_type="text/markdown", diff --git a/strsimpy/__init__.py b/strsimpy/__init__.py index f897911..1b1792f 100644 --- a/strsimpy/__init__.py +++ b/strsimpy/__init__.py @@ -37,4 +37,4 @@ from .sift4 import SIFT4Options, SIFT4 __name__ = 'strsimpy' -__version__ = '0.2.0' +__version__ = '0.2.1' From fca3b16a3e149c28cb5936eeb2a1f1e0f8f967b7 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Mon, 11 Oct 2021 11:35:49 +0000 Subject: [PATCH 6/6] Refactor deprecated unittest aliases for Python 3.11 compatibility. --- strsimpy/sift4_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strsimpy/sift4_test.py b/strsimpy/sift4_test.py index 039d8b5..1960e7b 100644 --- a/strsimpy/sift4_test.py +++ b/strsimpy/sift4_test.py @@ -14,7 +14,7 @@ def testSIFT4(self): ] for a, b, offset, res in results: - self.assertEquals(res, s.distance(a, b, maxoffset=offset)) + self.assertEqual(res, s.distance(a, b, maxoffset=offset)) if __name__ == "__main__":