Skip to content

Commit 1dad7e2

Browse files
authored
Merge pull request #1739 from zm711/fix-datetime-util
NeuralynxIO: Add `python-dateutil` dependency
2 parents 8e04a16 + 2625ca7 commit 1dad7e2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
_spike_channel_dtype,
5454
_event_channel_dtype,
5555
)
56-
from operator import itemgetter
5756
import numpy as np
5857
import os
5958
import pathlib

neo/rawio/neuralynxrawio/nlxheader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import dateutil
21
from packaging.version import Version
32
import os
43
import re
@@ -317,7 +316,7 @@ def _setTimeDate(self, txt_header):
317316
"""
318317
Read time and date from text of header
319318
"""
320-
319+
import dateutil
321320
# opening time
322321
sr = NlxHeader._openDatetime1_pat.search(txt_header)
323322
if not sr: sr=NlxHeader._openDatetime2_pat.search(txt_header)

neo/test/rawiotest/test_neuralynxrawio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import datetime
2-
import dateutil
32
import unittest
43

54
import os
@@ -390,6 +389,7 @@ def test_neuraview2(self):
390389

391390
# left in for possible future header tests
392391
def check_dateutil_parse(self, hdrTxt, openPat, closePat, openDate, closeDate):
392+
import dateutil
393393
mtch = openPat.search(hdrTxt)
394394
self.assertIsNotNone(mtch)
395395
dt = mtch.groupdict()

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ maxwell = ["h5py"]
103103
biocam = ["h5py"]
104104
med = ["dhn_med_py<2.0"] # ci failing with 2.0 test future version when stable
105105
plexon2 = ["zugbruecke>=0.2; sys_platform!='win32'", "wenv; sys_platform!='win32'"]
106+
neuralynx = ["python-dateutil"]
106107

107108
all = [
108109
"coverage",
@@ -126,6 +127,7 @@ all = [
126127
"tqdm",
127128
"wenv; sys_platform!='win32'",
128129
"zugbruecke>=0.2; sys_platform!='win32'",
130+
"python-dateutil",
129131
]
130132
# we do not include 'stfio' in 'all' as it is not pip installable
131133

0 commit comments

Comments
 (0)