Skip to content

Commit

Permalink
Update version check for Mountainsort5 in is_installed method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rkim48 committed Oct 29, 2023
1 parent 109b5b3 commit 51a1e48
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/spikeinterface/sorters/external/mountainsort5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51a1e48

Please sign in to comment.