-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove MNE export #120
Remove MNE export #120
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 3 -2
Lines 634 541 -93
=========================================
- Hits 634 541 -93 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for apparently being misleading in my earlier comment #119 (comment) ... the idea was originally (together with e.g., @larsoner) that all MNE-Python "export" code is mostly maintained in separate packages ... and that in mne-python there is just a "thin API wrapper"
I see, but the "thin" wrapper code should also include these helper functions IMO. I don't see a reason why pybv is supposed to maintain it. |
Hello! I was brought here because I saw the PR/discussion over at the MNE repository I have to say I find it a little strange that Just my 2 ct. |
I think pybv should expose a Ideally if there is a bug with export_bv then the fix lives exclusively in the pybv package. If it's not that way now, we should move more in that direction. This PR takes us in the other direction. |
I'd argue that we should do the exact opposite. pybv is a tool that can be used by many packages, because it only depends on NumPy. MNE-specific functionality required to convert arguments should go into MNE. |
I'd argue the same, yes But I'm not voting for or against anything here, just wanted to share my thoughts :D |
Unfortunately we decided the opposite. We had to choose "who should maintain code to take an MNE raw and write a different format" and we decided the answer was "other modules, not MNE." |
Unfortunately for this PR I mean. I think it's the right choice for MNE 😄 |
The current situation in pybv serves two purposes:
Re: "2." --> I just think we shouldn't have an
I know what you mean @hoechenberger but it's really the result of points 1. and 2. in my post here (see above).
I also think that the present choice of maintaining export code in third-party packages (like pybv or eeglabio) has its advantages. Mostly because there are so many data formats, it's impossible for MNE-Python core devs to be familiar with all of them, so it makes sense to leave that to people who know about it and care about it (e.g., pybv devs) ... and then as a boon for these people (and all end users), make it easy for everyone to use these functions from MNE-Python. Having that said, ... it is a bit weird to have all this private code and MNE-Python testing in pybv. But I don't know a better solution that wouldn't disagree with the fundamental MNE-Python "export choice". |
I find it not just a bit weird, but just plain silly. The fundamental export choice of MNE-Python still stands if it included helper functions that convert MNE objects to the format expected by the export packages. This is also what is currently being done for EEGLAB, EDF, and MFF. Let's maybe continue the discussion at mne-tools/mne-python#12450 and see if we can get to an agreement. |
👍 |
Please do not merge until the next MNE release v1.7.0 (which I think should be around the corner). Or at least pybv should not create a new release until then. |
MNE v1.7.0 is out, so this is ready for merge. |
Cool, one final check though: It seems to me that we lost the roundtrip tests, as they weren't added here: mne-tools/mne-python#12450 do you think they are unnecessary? |
MNE already has a similar roundtrip test here: https://github.com/mne-tools/mne-python/blob/main/mne/export/tests/test_export.py#L56 Should we replace this with the test from pybv? I'm not sure how to best combine both tests so as to not lose anything important. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some inspection, I think there is not a lot that we'll be missing:
- some checks that warnings are being raised (for overwrite param, and for containing "vhdr" in fname)
- single vs double data
- temperature channel in Celsius
I am going to merge this, as I consider this fine. Feel free to add these features to the mne test (whoever cares about it) in the future :-)
Thanks @cbrnr
MNE export should be handled by MNE, so I'm removing related functions and tests (and will be including them in MNE in a separate PR). Fixes #119.