Avoid duplicating channel names as property in neo base extractor when all_annotations=True
#2845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As in the title.
There is always a
channel_names
annotation in neo that we can load withall_annotations=True
:https://github.com/h-mayorquin/python-neo/blob/223e22edb917d8ad5ef8aff4fe7197afc414d5f6/neo/rawio/baserawio.py#L282-L293
This PR modifieds the code so when
all_annotations=True
the property is not duplicated.Plus, I am changing the name of the property to
channel_names
because that's how it is neo and I think is more consistent overall. Another option is to instead change the property name to "channel_name" when loaded from neo annotations so we don't duplicate. I think that the first approach is better.