Skip to content

Commit 9c5dd22

Browse files
committed
FIX: Fixes
1 parent c551e4d commit 9c5dd22

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

examples/io/read_bci2k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
In this example, we use MNE-Python to read a BCI2000 ``.dat`` file.
77
BCI2000 is a general-purpose brain-computer interface (BCI) system widely
88
used in EEG research. The file is downloaded from the MNE testing data
9-
repository using :mod:`pooch`.
9+
repository using ``pooch``.
1010
1111
""" # noqa: D205 D400
1212

mne/datasets/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
# update the checksum in the MNE_DATASETS dict below, and change version
8888
# here: ↓↓↓↓↓↓↓↓
8989
RELEASES = dict(
90-
testing="0.172",
90+
testing="0.173",
9191
misc="0.27",
9292
phantom_kit="0.2",
9393
ucl_opm_auditory="0.2",
@@ -115,7 +115,7 @@
115115
# Testing and misc are at the top as they're updated most often
116116
MNE_DATASETS["testing"] = dict(
117117
archive_name=f"{TESTING_VERSIONED}.tar.gz",
118-
hash="md5:9d031f1a91d2bd903a9464ca2cd7dc09",
118+
hash="md5:0973c25cd0e3ca43a75ea6953ace1daa",
119119
url=(
120120
"https://codeload.github.com/mne-tools/mne-testing-data/"
121121
f"tar.gz/{RELEASES['testing']}"

mne/io/_read_raw.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def _get_supported():
2626
from . import (
2727
read_raw_ant,
2828
read_raw_artemis123,
29+
read_raw_bci2k,
2930
read_raw_bdf,
3031
read_raw_boxy,
3132
read_raw_brainvision,
@@ -79,7 +80,10 @@ def _get_supported():
7980
".ds": dict(CTF=read_raw_ctf),
8081
".txt": dict(BOXY=read_raw_boxy),
8182
# Curry
82-
".dat": dict(CURRY=read_raw_curry),
83+
".dat": dict(
84+
CURRY=read_raw_curry,
85+
BCI2K=read_raw_bci2k,
86+
),
8387
".dap": dict(CURRY=read_raw_curry),
8488
".rs3": dict(CURRY=read_raw_curry),
8589
".cdt": dict(CURRY=read_raw_curry),
@@ -130,6 +134,7 @@ def read_raw(fname, *, preload=False, verbose=None, **kwargs) -> BaseRaw:
130134
131135
* `~mne.io.read_raw_ant`
132136
* `~mne.io.read_raw_artemis123`
137+
* `~mne.io.read_raw_bci2k`
133138
* `~mne.io.read_raw_bdf`
134139
* `~mne.io.read_raw_boxy`
135140
* `~mne.io.read_raw_brainvision`

mne/io/tests/test_read_raw.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
base = Path(__file__).parents[1]
1717
test_base = Path(testing.data_path(download=False))
18+
bci2k_fname = test_base / "BCI2k" / "bci2k_test.dat"
1819

1920

2021
@pytest.mark.parametrize("fname", ["x.xxx", "x"])
@@ -129,7 +130,7 @@ def test_all_reader_documented():
129130
missing_from_doc = set(functions) - set(reader_lines)
130131
if len(missing_from_doc) != 0 or len(missing_from_read_raw) != 0:
131132
raise AssertionError(
132-
"Functions missing from documentation:\n\t"
133+
"Functions missing from documentation of mne.io.read_raw:\n\t"
133134
+ "\n\t".join(missing_from_doc)
134135
+ "\n\nFunctions missing from read_raw:\n\t"
135136
+ "\n\t".join(missing_from_read_raw)
@@ -156,3 +157,9 @@ def test_all_reader_documented_in_docstring():
156157
)
157158
if sorted(documented) != documented:
158159
raise AssertionError("Functions in docstring are not sorted.")
160+
161+
162+
def test_bci2k():
163+
"""Test reading BCI2k files with read_raw."""
164+
raw = read_raw(bci2k_fname, preload=True)
165+
assert "RawBCI2k" in repr(raw)

0 commit comments

Comments
 (0)