Skip to content

Commit 2a742e6

Browse files
committed
pyopenephys import workaround
1 parent d5b9586 commit 2a742e6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

element_array_ephys/readers/openephys.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,23 @@
44
import re
55

66
import numpy as np
7-
import pyopenephys
7+
import packaging
88

9-
logger = logging.getLogger(__name__)
9+
pyopenephys_warning = (
10+
"It is recommended that you use DataJoint's fork of pyopenephys.\n"
11+
+ "Please install with the following command:\n"
12+
+ "pip install git+https://github.com/datajoint-company/pyopenephys.git"
13+
)
1014

15+
try:
16+
import pyopenephys
17+
except ImportError:
18+
raise ImportError(pyopenephys_warning)
19+
20+
logger = logging.getLogger("datajoint")
21+
22+
if packaging.version.parse(pyopenephys.__version__) < packaging.version.parse("1.1.6"):
23+
logger.warning(pyopenephys_warning)
1124

1225
"""
1326
The Open Ephys Record Node saves Neuropixels data in binary format according to the following the directory structure:

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ datajoint>=0.13
22
element-interface>=0.4.0
33
openpyxl
44
plotly
5-
pyopenephys @ git+https://github.com/datajoint-company/pyopenephys.git
65
seaborn

0 commit comments

Comments
 (0)