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

MAINT: Ensure we dont download without permission #1073

Merged
merged 12 commits into from
Sep 29, 2022

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Sep 29, 2022

Lots of failures locally with this.

Okay for me to put download=False in a bunch of data_path() calls and add requires_testing_data calls where necessary?

@hoechenberger
Copy link
Member

Good enough for me!

@larsoner
Copy link
Member Author

larsoner commented Sep 29, 2022

A few things I found and fixed along the way:

  1. Don't create data = np.empty(...) for RawArray in tests. The array can contain junk and lead to casting errors (e.g., to float32 when writing).
  2. Don't use bare np.random.random(...) for the same reason. It can contain numbers that fit in float64 but not float32 leading to overflow errors when casting.
  3. Added a bad_frame_xfail that we can remove once BUG: Add estimated fiducials when missing / assumed head coords mne-python#11212 is merged and any necesary changes are made here, in the meantime it allows tests here to be green
  4. Added to CIs a run that executes tests without the testing data. This should be quick (locally takes 6 sec) and pass, and ensure that requires_testing_data decorators are used properly.

Pushing a commit now that hopefully will pass!

@larsoner
Copy link
Member Author

... I also added dataset caching, and removed one use of sample data where we could just as easily use testing.

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #1073 (888dfa7) into main (7be49cf) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1073   +/-   ##
=======================================
  Coverage   94.87%   94.87%           
=======================================
  Files          24       24           
  Lines        3845     3845           
=======================================
  Hits         3648     3648           
  Misses        197      197           
Impacted Files Coverage Δ
mne_bids/write.py 96.79% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

python -m pip install -e ./mne-python

- name: Install MNE (main)
if: "matrix.mne-version == 'mne-main'"
run: |
git clone --depth 1 https://github.com/mne-tools/mne-python.git -b main
git clone --depth 1 --single-branch --branch main https://github.com/mne-tools/mne-python.git -b main
Copy link
Member

Choose a reason for hiding this comment

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

shall we keep this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it's just more specific/explicit and a tiny bit faster

Copy link
Member

Choose a reason for hiding this comment

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

but we should probably remove the trailing -b main, right? that's just a single flag specified twice?

@larsoner
Copy link
Member Author

All green, ready for review/merge from my end

@agramfort agramfort merged commit 6624276 into mne-tools:main Sep 29, 2022
@agramfort
Copy link
Member

thanks a lot @larsoner 🙏

@larsoner larsoner deleted the checkdl branch September 29, 2022 20:36
@sappelhoff
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants