MAINT: Replace defusedxml with mffpy in _get_ep_info and _get_signalfname#13991
Open
PragnyaKhandelwal wants to merge 2 commits into
Open
MAINT: Replace defusedxml with mffpy in _get_ep_info and _get_signalfname#13991PragnyaKhandelwal wants to merge 2 commits into
defusedxml with mffpy in _get_ep_info and _get_signalfname#13991PragnyaKhandelwal wants to merge 2 commits into
Conversation
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference issue (if any)
Part of #13926.
Follow-up to #13932, #13945, and #13973.
What does this implement/fix?
Replaces the
defusedxml-backed implementations of_get_ep_infoand_get_signalfnameinmne/io/egi/general.pywithmffpy.xml_files.XML.from_file()._get_ep_info: now readsepochs.xmlviamffpy'sEpochsobject, accessingep.beginTime,ep.endTime,ep.firstBlock, andep.lastBlockdirectly._get_signalfname: now reads eachinfoN.xmlviamffpy'sDataInfoobject,using
get_content()['generalInformation']['channel_type']to distinguish EEGfrom PNS signal files instead of scanning raw XML tags.
Both functions produce identical output to the legacy implementations, verified
against all 7 test MFF files in the testing dataset.
Additional information
All 24 tests in
mne/io/egi/tests/test_egi.pypass locally. No changes tocallers in
egimff.py.