Skip to content

Conversation

@mscheltienne
Copy link

From mne-lsl, slightly stepped down in term of error checking on the input, this PR adds the methods:

  • get_channel_labels
  • get_channel_types
  • get_channel_units
  • set_channel_labels
  • set_channel_types
  • set_channel_units

to a StreamInfo, to easily interact and add those basic informations to the XMLElement object.


Also ran black, isort, and codespell to improve and standardize the code-style. Those commits can be reverted if you prefer.

@cboulay
Copy link
Contributor

cboulay commented May 7, 2024

I'm sorry I slept on this. It looks good, thank you!
I personally prefer properties over getters and setters, but I think it works in this case the getter is better because the XML access is fairly slow and we don't want auto-inspection of these properties. Also using a method hints to the user that it will not return immediately, unlike a property where that might be expected.

@cboulay cboulay merged commit 78122e9 into labstreaminglayer:master May 7, 2024
@mscheltienne mscheltienne deleted the dev branch May 7, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants