Skip to content

Commit 5ac5051

Browse files
committed
Merge branch 'hotfix/2.0.5'
2 parents a58560a + d95958b commit 5ac5051

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

ibllib/pipes/ephys_preprocessing.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class SpikeSorting(tasks.Task):
9393
"Documents/PYTHON/iblscripts/deploy/serverpc/kilosort2/run_pykilosort.sh"
9494
)
9595
SPIKE_SORTER_NAME = 'pykilosort'
96-
PYKILOSORT_REPO = '~/Documents/PYTHON/SPIKE_SORTING/pykilosort'
96+
PYKILOSORT_REPO = Path.home().joinpath('Documents/PYTHON/SPIKE_SORTING/pykilosort')
9797

9898
@staticmethod
9999
def _sample2v(ap_file):
@@ -113,7 +113,7 @@ def _fetch_pykilosort_version(repo_path):
113113
version = line.split('=')[-1].strip().replace('"', '').replace("'", '')
114114
except Exception:
115115
pass
116-
return version
116+
return f"pykilosort_{version}"
117117

118118
@staticmethod
119119
def _fetch_ks2_commit_hash(repo_path):
@@ -137,7 +137,7 @@ def _run_pykilosort(self, ap_file):
137137
session_path/spike_sorters/{self.SPIKE_SORTER_NAME}/probeXX folder
138138
:return: path of the folder containing ks2 spike sorting output
139139
"""
140-
140+
self.version = self._fetch_pykilosort_version(self.PYKILOSORT_REPO)
141141
label = ap_file.parts[-2] # this is usually the probe name
142142
if ap_file.parent.joinpath(f"spike_sorting_{self.SPIKE_SORTER_NAME}.log").exists():
143143
_logger.info(f"Already ran: spike_sorting_{self.SPIKE_SORTER_NAME}.log"
@@ -194,7 +194,6 @@ def _run_pykilosort(self, ap_file):
194194

195195
shutil.copytree(temp_dir.joinpath('output'), sorter_dir, dirs_exist_ok=True)
196196
shutil.rmtree(temp_dir, ignore_errors=True)
197-
self.version = self._fetch_ks2_commit_hash(self.PYKILOSORT_REPO)
198197
return sorter_dir
199198

200199
def _run(self, overwrite=False):
@@ -225,7 +224,7 @@ def _run(self, overwrite=False):
225224
logfile = ks2_dir.joinpath(f"spike_sorting_{self.SPIKE_SORTER_NAME}.log")
226225
if logfile.exists():
227226
shutil.copyfile(logfile, probe_out_path.joinpath(
228-
f"ibl_log.info_{self.SPIKE_SORTER_NAME}.log"))
227+
f"_ibl_log.info_{self.SPIKE_SORTER_NAME}.log"))
229228
out, _ = spikes.sync_spike_sorting(ap_file=ap_file, out_path=probe_out_path)
230229
out_files.extend(out)
231230
# convert ks2_output into tar file and also register

release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- pykilosort bugfix after low yield results
88
### Release Notes 2.0.4 2021-09-10
99
- ephys trials extraction when audio FPGA starts on up state
10+
### Release Notes 2.0.5 2021-03-13
11+
- pykilosort pipeline: output correct version number / fix log file name
1012

1113
### Release Notes 2.0.0 2021-08-04
1214
- ONE2 released on the master branch

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
setup(
2626
name='ibllib',
27-
version='2.0.4',
27+
version='2.0.5',
2828
python_requires='>={}.{}'.format(*REQUIRED_PYTHON),
2929
description='IBL libraries',
3030
license="MIT",

0 commit comments

Comments
 (0)