Skip to content
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

[MRG] add ieeg tests #118

Merged
merged 9 commits into from
Nov 12, 2018
Merged

Conversation

sappelhoff
Copy link
Member

closes #79

@codecov-io
Copy link

codecov-io commented Oct 18, 2018

Codecov Report

Merging #118 into master will increase coverage by 0.84%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   93.38%   94.23%   +0.84%     
==========================================
  Files          14       14              
  Lines         922      971      +49     
==========================================
+ Hits          861      915      +54     
+ Misses         61       56       -5
Impacted Files Coverage Δ
mne_bids/tests/test_io.py 100% <100%> (ø) ⬆️
mne_bids/tests/test_utils.py 100% <100%> (ø) ⬆️
mne_bids/mne_bids.py 93.67% <100%> (+0.79%) ⬆️
mne_bids/utils.py 92.73% <100%> (+1.35%) ⬆️
mne_bids/tests/test_mne_bids.py 100% <100%> (ø) ⬆️
mne_bids/io.py 89.28% <100%> (+1.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de54d7b...e8accaf. Read the comment docs.

@sappelhoff sappelhoff changed the title [WIP] add ieeg tests [MRG] add ieeg tests Oct 18, 2018
@sappelhoff
Copy link
Member Author

@jasmainak see here.

really simple approach, but adds some iEEG coverage and should be a good starting point for more thorough work on our iEEG parts.

mne_bids/io.py Outdated Show resolved Hide resolved
mne_bids/mne_bids.py Outdated Show resolved Hide resolved
Copy link
Member

@jasmainak jasmainak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I like the approach. Thanks for taking a stab at it

@jasmainak
Copy link
Member

gain in coverage appears to be really tiny. Why is that @sappelhoff ?

@sappelhoff
Copy link
Member Author

I'll do some more work tomorrow, looking at Travis CI, my fears have come true ;-) iEEG is not really implemented yet

@jasmainak
Copy link
Member

okay if it's really a pain to fix, maybe we should do this after release ...

I think we should update the landing page of our website to indicate what modalities we support (saying iEEG is experimental) and the file formats supported (and those that aren't yet ... ?). Just a nice way to show off all the work we have put in.

@jasmainak jasmainak changed the title [MRG] add ieeg tests [WIP] add ieeg tests Oct 19, 2018
@jasmainak
Copy link
Member

@sappelhoff I'm setting the PR back to WIP since Travis is not happy.

@sappelhoff
Copy link
Member Author

I think we should update the landing page of our website to indicate what modalities we support (saying iEEG is experimental) and the file formats supported (and those that aren't yet ... ?). Just a nice way to show off all the work we have put in.

+1

but regarding file formats, only MEF3 and NWB are not supported yet ... and these fall under "experimental iEEG" anyways, so I'd limit the paragraph to mentioning the modalities.

@sappelhoff sappelhoff force-pushed the add_ieeg_tests branch 2 times, most recently from 03a2285 to 0828af6 Compare October 19, 2018 16:17
@sappelhoff
Copy link
Member Author

this will not pass due to:

3: [ERR] The column names of the channels file must begin with ['name', 'type', 'units', 'sampling_frequency', 'low_cutoff', 'high_cutoff', 'notch', 'reference'] (code: 72 - MISSING_TSV_COLUMN_IEEG_CHANNELS)

see here: https://github.com/bids-standard/bids-validator/blob/cbcb0d31c5a945ef8be9e5c2b4e380b6d7a01a58/validators/tsv/tsv.js#L237-L249

Fixing this would require some change to our current channels.tsv files --> more columns.

We could add these columns and fill them with n/a until we have the time to write functions that extract the actual information.

Opinions?

mne_bids/io.py Outdated Show resolved Hide resolved
@jasmainak
Copy link
Member

Fixing this would require some change to our current channels.tsv files --> more columns.

But this would be only for iEEG or is it also for EEG and MEG?

@sappelhoff
Copy link
Member Author

But this would be only for iEEG or is it also for EEG and MEG?

it would be convenient to have it for all, but I think the reason that we have this error from the validator is because @choldgraf wrote these lines quite a while ago, and they are probably subject to change soon ... so I wouldn't want to change MNE-BIDS so much just contingent on this error.

So yes, perhaps we can use it just for iEEG?

@sappelhoff
Copy link
Member Author

btw, the other error

1: [ERR] Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder. (code: 1 - NOT_INCLUDED)

will hopefully be fixed soon, see my attempts at clarification here: bids-standard/bids-validator#510 (comment)

@jasmainak
Copy link
Member

So yes, perhaps we can use it just for iEEG?

fine by me. But maybe if we can extract some minimal information rather than have 'n/a' that would be nice if it does not involve too many changes.

Btw, I'd prefer to get #106 merged first because it touches upon many parts of the code base and rebasing it is a pain.

@sappelhoff
Copy link
Member Author

Btw, I'd prefer to get #106 merged first because it touches upon many parts of the code base and rebasing it is a pain.

+1, reviewing it right now

mne_bids/mne_bids.py Outdated Show resolved Hide resolved
mne_bids/mne_bids.py Outdated Show resolved Hide resolved
mne_bids/tests/test_utils.py Show resolved Hide resolved
mne_bids/tests/test_mne_bids.py Outdated Show resolved Hide resolved
@@ -205,6 +201,15 @@ def test_vhdr():
overwrite=True)
assert len([f for f in os.listdir(data_path) if op.isfile(f)]) == 0

# Also cover iEEG
# We use the same data and pretend that eeg channels are ecog
raw.set_channel_types({'FP1': 'ecog'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@jasmainak
Copy link
Member

Once these changes are also released and installable, this present PR should pass (at least all changes related to it).

amazing! sounds great to me

@jasmainak
Copy link
Member

why is CircleCI failing?

@sappelhoff
Copy link
Member Author

why is CircleCI failing?

after the merge of #129 it should be green again.

@jasmainak
Copy link
Member

@sappelhoff can you remove the merge commit so that we have a clean history?

@sappelhoff
Copy link
Member Author

@sappelhoff can you remove the merge commit so that we have a clean history?

I did, but does it matter if we use "squash and merge" anyways?

@jasmainak
Copy link
Member

I did, but does it matter if we use "squash and merge" anyways?

I don't know. Do we have an official policy of "squash and merge" now? cc @teonbrooks ? I'm fine with anything that merges on tip of master ...

@sappelhoff
Copy link
Member Author

@jasmainak this PR is ready from my side. Feel free to merge if you are happy :-)

@sappelhoff sappelhoff changed the title [WIP] add ieeg tests [MRG] add ieeg tests Nov 11, 2018
Copy link
Member

@jasmainak jasmainak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, looks good to me.

mne_bids/utils.py Outdated Show resolved Hide resolved
mne_bids/utils.py Outdated Show resolved Hide resolved
@jasmainak
Copy link
Member

@teonbrooks or @choldgraf merge if you are happy

@teonbrooks
Copy link
Member

lgtm, thanks @sappelhoff!

@teonbrooks teonbrooks merged commit 629f5eb into mne-tools:master Nov 12, 2018
@sappelhoff sappelhoff deleted the add_ieeg_tests branch November 13, 2018 07:47
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.

tests for iEEG
5 participants