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

Include ecog and seeg #281

Merged
merged 10 commits into from Jul 23, 2022
Merged

Include ecog and seeg #281

merged 10 commits into from Jul 23, 2022

Conversation

chapochn
Copy link
Contributor

the function get_rejection_threshold now also works when the data is ecog or seeg

@chapochn
Copy link
Contributor Author

chapochn commented Jul 20, 2022

I don't really understand the error in the checks

@chapochn
Copy link
Contributor Author

chapochn commented Jul 20, 2022

related to #276 and #198

@jasmainak
Copy link
Member

the error is unrelated. Maybe @hoechenberger or @sappelhoff knows what's up?

@sappelhoff
Copy link
Collaborator

No idea ... I was hoping this was a temporary issue. But it seems to persist. Somebody will have to dig into this :-)

@hoechenberger
Copy link
Collaborator

Seems like yet another issue with OpenNeuro. We'll have to
file a bug report...

@sappelhoff
Copy link
Collaborator

@chapochn would you mind filing a bug report about this on https://github.com/OpenNeuroOrg/openneuro/ ?

@chapochn
Copy link
Contributor Author

@sappelhoff I have no experience with OpenNeuro.
This is the error from circleci:


Sphinx-Gallery successfully executed 6 out of 7 files subselected by:

    gallery_conf["filename_pattern"] = '/plot'
    gallery_conf["ignore_pattern"]   = '__init__\\.py'

after excluding 0 files that had previously been run (based on MD5).


Traceback (most recent call last):
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/sphinx/application.py", line 331, in build
    self.events.emit('build-finished', None)
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/sphinx/events.py", line 94, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/sphinx_gallery/gen_gallery.py", line 732, in summarize_failing_examples
    raise ExtensionError(fail_message)
sphinx.errors.ExtensionError: Here is a summary of the problems encountered when running the examples

Unexpected failing examples:
/home/circleci/project/examples/plot_visualize_bad_epochs.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/circleci/project/examples/plot_visualize_bad_epochs.py", line 33, in <module>
    openneuro.download(dataset=dataset, target_dir=target_dir,
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 684, in download
    asyncio.run(_download_files(**kwargs))
  File "/opt/circleci/.pyenv/versions/3.9.7/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/circleci/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 468, in _download_files
    await asyncio.gather(*download_tasks)
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 330, in _download_file
    raise RuntimeError(
RuntimeError: Error 404 when trying to download /home/circleci/project/autoreject/../examples/ds000117/dataset_description.json from https://s3.amazonaws.com/openneuro.org/ds000117/dataset_description.json?versionId=vbCEkbZtCL26q._PCPmrCJK_KngbQ_dT


-------------------------------------------------------------------------------

Extension error:
Here is a summary of the problems encountered when running the examples

Unexpected failing examples:
/home/circleci/project/examples/plot_visualize_bad_epochs.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/circleci/project/examples/plot_visualize_bad_epochs.py", line 33, in <module>
    openneuro.download(dataset=dataset, target_dir=target_dir,
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 684, in download
    asyncio.run(_download_files(**kwargs))
  File "/opt/circleci/.pyenv/versions/3.9.7/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/circleci/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 468, in _download_files
    await asyncio.gather(*download_tasks)
  File "/home/circleci/autoreject_env/lib/python3.9/site-packages/openneuro/download.py", line 330, in _download_file
    raise RuntimeError(
RuntimeError: Error 404 when trying to download /home/circleci/project/autoreject/../examples/ds000117/dataset_description.json from https://s3.amazonaws.com/openneuro.org/ds000117/dataset_description.json?versionId=vbCEkbZtCL26q._PCPmrCJK_KngbQ_dT


-------------------------------------------------------------------------------
make: *** [Makefile:20: html] Error 2

Exited with code exit status 2

CircleCI received exit code 2

What is the command that is causing the error?

@hoechenberger
Copy link
Collaborator

I've field a bug report at OpenNeuroOrg/openneuro#2635

@sappelhoff
Copy link
Collaborator

and apparently already solved -- I'll restart CI

@chapochn
Copy link
Contributor Author

I added 2 tests, but I can see that some checks failed. I'm not sure how to see the error, do I need to be able to access Azure? I don't seem to have access. Please let me know.

@sappelhoff
Copy link
Collaborator

yeah, I need to sign in with my microsoft account -- and I don't have access to the logs:
image

@jasmainak
Copy link
Member

Can you just change the channel type of a regular EEG channel so as to not add a dependency on mne_bids for the test? There is nothing specific about sEEG in your test at the moment.

@@ -364,3 +364,60 @@ def test_fnirs():
assert reject["hbo"] < 0.001 # This is a very high value as sanity check
assert reject["hbr"] < 0.001
assert reject["hbr"] > 0.0


def test_ecog():
Copy link
Member

Choose a reason for hiding this comment

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

we follow PEP 257. See how docstrings should be formatted: https://peps.python.org/pep-0257/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure to which place you're referring to, but I changed something, see in the next commit

Copy link
Member

Choose a reason for hiding this comment

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

see: "Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok thanks, pushed a new version

epochs.load_data()
n1 = len(epochs)
reject = get_rejection_threshold(epochs)
print(reject)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
print(reject)

no print statements in tests ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I copied that from a test that was already there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pushed

@jasmainak
Copy link
Member

Can you update whats_new.rst so we can give you credit in the next release?

@chapochn
Copy link
Contributor Author

ok, updated changelog, thanks for suggesting!

@jasmainak
Copy link
Member

looks like you need to rebase with respect to the latest master branch:

$ git fetch upstream master:master
$ git rebase master
$ git push -f origin include-ecog

@chapochn
Copy link
Contributor Author

Should be ok now

@jasmainak
Copy link
Member

image

I still can't merge ...

@jasmainak jasmainak merged commit 653160a into autoreject:master Jul 23, 2022
@jasmainak
Copy link
Member

I went ahead and squashed your commits. Thanks @chapochn ! 🥳

@chapochn
Copy link
Contributor Author

Great, thank you!

@chapochn chapochn deleted the include-ecog branch July 25, 2022 17:32
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.

None yet

4 participants