Skip to content

Commit 90d72b0

Browse files
committed
Merge branch 'feature/79-remove-qt-view-component' into feature/vis-web-app
2 parents a4de423 + d4d56e6 commit 90d72b0

4 files changed

Lines changed: 12 additions & 15 deletions

File tree

src/MoBI_View/core/data_inlet.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515

1616
class DataInlet:
17-
"""Handles data acquisition from LSL streams.
17+
"""Stores metadata and buffered samples for a single LSL stream.
18+
19+
The DataInlet validates stream configuration, normalizes channel metadata,
20+
and keeps a buffer of recent samples for downstream consumers.
1821
1922
Attributes:
2023
inlet: The LSL stream inlet for acquiring data.

src/MoBI_View/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Module providing the main entry point for the MoBI_View application.
22
33
This module discovers all available LSL streams, creates DataInlet objects for each,
4-
and prints stream information. The Qt-based desktop UI has been removed.
4+
and prints stream information.
55
Usage:
66
python -m MoBI_View.main
77
"""

tests/smoke/test_main.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ def test_data_inlet_with_real_streams(
9090
discovered_streams = resolve_streams()
9191
data_inlets = []
9292
for info in discovered_streams:
93-
try:
94-
inlet = DataInlet(info)
95-
data_inlets.append(inlet)
96-
except Exception as err:
97-
pytest.fail(f"Failed to create DataInlet: {err}")
93+
inlet = DataInlet(info)
94+
data_inlets.append(inlet)
9895
stream_names = {inlet.stream_name for inlet in data_inlets}
9996
eeg_inlet = next(i for i in data_inlets if i.stream_name == "TestEEG")
10097
accel_inlet = next(i for i in data_inlets if i.stream_name == "TestAccel")
@@ -121,10 +118,7 @@ def test_no_streams() -> None:
121118
if len(test_streams) == 0:
122119
data_inlets = []
123120
for info in discovered_streams:
124-
try:
125-
inlet = DataInlet(info)
126-
data_inlets.append(inlet)
127-
except Exception:
128-
pass
121+
inlet = DataInlet(info)
122+
data_inlets.append(inlet)
129123

130124
assert isinstance(data_inlets, list)

tests/unit/test_main_app_presenter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ def test_on_data_updated_empty_sample(mock_inlet: MagicMock) -> None:
129129
presenter = main_app_presenter.MainAppPresenter(data_inlets=[mock_inlet])
130130
sample = np.array([])
131131
channel_labels: list[Any] = []
132-
133-
result = presenter.on_data_updated("Stream1", sample, channel_labels)
134-
135132
expected_plot_data = {
136133
"stream_name": "Stream1",
137134
"data": [],
138135
"channel_labels": [],
139136
}
137+
138+
result = presenter.on_data_updated("Stream1", sample, channel_labels)
139+
140140
assert result == expected_plot_data
141141

142142

0 commit comments

Comments
 (0)