-
Notifications
You must be signed in to change notification settings - Fork 30
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
WIP: Revamps pyprep. An effort by NeurodataDesign at Johns Hopkins U #6
Conversation
estimate of reference to median
Turn reference into class form
MRG: A common PR of Prep pipeline 1. Ports pyprep into Python3 2. Integrates full functionality of PREP 3. adds modularized sub-pipeline functions to run each part of PREP separately 4. Uses sklearn "fit()" function pattern
Remove read_montage function Use DigMontage instead of montage_kind in Prep class
Update MNE version requirement to 19.2 Replace read_montage function with make_standard_montage
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
- Coverage 100% 98.31% -1.69%
==========================================
Files 2 12 +10
Lines 322 1006 +684
==========================================
+ Hits 322 989 +667
- Misses 0 17 +17
Continue to review full report at Codecov.
|
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.
Thanks!
I played around a bit with the changes by pulling your branch and making a new conda environment for it.
Please note that all of my comments are only "nice-to-have", because I lack the time to actually help with the requests :)
- The
prep_demo.ipynb
does not run "out of the box" because it has a wrong path for the example file- would be nice to link to this example from the website in the form of a sphinx gallery like on MNE-BIDS. https://github.com/mne-tools/mne-bids/blob/0aff75c0d02a1c84925a7a212659cff1c01d3f29/doc/conf.py#L119 ... in the future we could then even make this example interactive using binder (similar to how it's done on mne-bids)
- Running the test suite, I get 39 warnings, most of which are deprecation warnings. It would be worth looking into resolving these warnings
- the
Makefile
contains some non-working commands ... e.g., thebuild-doc
command. I suggest to remove all unnecessary commands, keep the file minimal, and fix what's broken - Travis does not seem to run on this PR - any idea why?
Yes I agree, the datasets should be sort of "imported" via MNE API. Should be easily fixed here. Can you advise what you mean for linking it in the sphinx gallery? Is all that is necessary, an explicit reference in that
Agreed. I think these are mainly from the montage API being overhauled in the MNE versions.
Can erase as necessary.
I believe this should be a setting on your end? I am not a maintainer on this repo, so I can't access the travis, but I think there's a setting that enables PRs/branches to have travis run? If not, I'm not sure... |
I just checked, and Travis is running the PR ... it's just not showing on GitHub somehow. Perhaps that'll be fixed automatically once one more commit is pushed.
I just made you a maintainer, thanks again for contributing together with Aamna and Liang.
yes, the conf.py file needs to be edited to contain a sphinx-gallery import and the settings ... and more importantly, the ipynb example would have to be converted to a py file. Some links to show you what I mean:
|
@sappelhoff besides codecov, things are working out. I converted the jupyter notebook to .py files, and did some adaptation of the conf.py files per your suggestion. I'm not too experienced w/ making docs the way you all do at MNE, but if there are still things missing, let me know! Happy holidays ;) |
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.
hi @adam2392 thanks for your patience :-)
If you could:
- make the CIs pass
- update what's new (https://github.com/sappelhoff/pyprep/blob/master/docs/source/whats_new.rst)
then I can merge this PR and deal with the rest.
Fixed the bug that pings users for input in the pytest. Updated the testing to make use of some fixtures that get thrown back and forth (e.g. mne.io.Raw and mne.Montage). |
and it's in! Thanks a lot everybody! :-) May it help future researchers! |
@adam2392 I now fully integrated the code and updated the docs (see bottom of examples page: https://pyprep.readthedocs.io/en/latest/examples.html) I decided against using binder + sphinx gallery for now, and instead I just ran the notebook on my machine, uploaded the ipynb output and provided a link to a notebook viewer: https://nbviewer.jupyter.org/github/sappelhoff/pyprep/blob/master/examples/prep_demo.ipynb Interestingly, the results now don't match so well anymore. Check the "results" section of the notebook, comparing the pyprep output and the "Matlab output". I did not change any crucial code. What I did was:
Anyhow, before we can make a release, we should check the full prep pipeline's output again. Until that happens, I think it's okay to have this as an unreleased "work in progress" feature, which is also fine :-) |
Addresses: #5
Fixes include:
fit()
patternblack
formattingTODO:
@sappelhoff hope to get your initial feedback before tackling some of these "house-keeping" issues. Aamna and Liang are also done w/ the course at this point, so they may or may not help in this last endeavor. So I think between the two of us though, we can get this to however you want it to look :)