From 51a1e4870727452cf246a8d954ee7cb1ba81a1df Mon Sep 17 00:00:00 2001 From: Windows Home Date: Sat, 28 Oct 2023 22:41:35 -0500 Subject: [PATCH 1/2] Update version check for Mountainsort5 in is_installed method This commit updates the version checking logic in the is_installed class method to allow the use of Mountainsort5 versions 0.3 and newer. Previously, only version 0.3.x was accepted, but testing has shown that version 0.4.1 is also compatible. The warning message has been updated to reflect this change. --- src/spikeinterface/sorters/external/mountainsort5.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spikeinterface/sorters/external/mountainsort5.py b/src/spikeinterface/sorters/external/mountainsort5.py index a88c59d688..04a4061e68 100644 --- a/src/spikeinterface/sorters/external/mountainsort5.py +++ b/src/spikeinterface/sorters/external/mountainsort5.py @@ -80,16 +80,15 @@ class Mountainsort5Sorter(BaseSorter): def is_installed(cls): try: import mountainsort5 - HAVE_MS5 = True except ImportError: HAVE_MS5 = False if HAVE_MS5: vv = parse(mountainsort5.__version__) - if vv < parse("0.3") or vv >= parse("0.4"): + if vv < parse("0.3"): print( - f"WARNING: This version of SpikeInterface expects Mountainsort5 version 0.3.x. " + f"WARNING: This version of SpikeInterface expects Mountainsort5 version 0.3.x or newer. " f"You have version {mountainsort5.__version__}" ) HAVE_MS5 = False From e7dcdad5698b452f8540e22b43b36362e4aac1b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:06:07 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/spikeinterface/sorters/external/mountainsort5.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spikeinterface/sorters/external/mountainsort5.py b/src/spikeinterface/sorters/external/mountainsort5.py index 04a4061e68..0162e6c943 100644 --- a/src/spikeinterface/sorters/external/mountainsort5.py +++ b/src/spikeinterface/sorters/external/mountainsort5.py @@ -80,6 +80,7 @@ class Mountainsort5Sorter(BaseSorter): def is_installed(cls): try: import mountainsort5 + HAVE_MS5 = True except ImportError: HAVE_MS5 = False