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: Don't store invalid weight and height in info['subject_info']; write weight and height to participants.tsv #1031

Merged
merged 11 commits into from
Aug 1, 2022

Conversation

hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Jul 30, 2022

Fixes #1027

@eort this should fix your problem.

  • We now guarantee that info['subject_info'] always exists after reading, and that it's always a dict
  • We now always clear info['subject_info'] before injecting the info from participants.tsv. Previously, we simply altered / amended the existing data structure, which could've led to a melange of BIDS and non-BIDS data.

PR Description

Describe your PR here

Merge checklist

Maintainer, please confirm the following before merging:

  • All comments resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • PR description includes phrase "closes <#issue-number>"

@hoechenberger hoechenberger marked this pull request as ready for review July 30, 2022 18:27
@hoechenberger hoechenberger changed the title Don't write invalid weight and height to info['subject_info'] MRG: Don't write invalid weight and height to info['subject_info'] Jul 30, 2022
@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #1031 (3009a5d) into main (158df44) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1031      +/-   ##
==========================================
+ Coverage   95.18%   95.19%   +0.01%     
==========================================
  Files          25       25              
  Lines        3778     3787       +9     
==========================================
+ Hits         3596     3605       +9     
  Misses        182      182              
Impacted Files Coverage Δ
mne_bids/read.py 96.02% <100.00%> (+0.09%) ⬆️
mne_bids/write.py 97.14% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@hoechenberger hoechenberger changed the title MRG: Don't write invalid weight and height to info['subject_info'] MRG: Don't store invalid weight and height in info['subject_info'] Jul 30, 2022
mne_bids/write.py Outdated Show resolved Hide resolved
@hoechenberger hoechenberger changed the title MRG: Don't store invalid weight and height in info['subject_info'] MRG: Don't store invalid weight and height in info['subject_info']; write weight and height to participants.tsv Jul 30, 2022
@hoechenberger hoechenberger enabled auto-merge (squash) August 1, 2022 05:57
@hoechenberger hoechenberger merged commit b90dde8 into mne-tools:main Aug 1, 2022
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.

[BUG] invalid info added to raw.info upon reading
3 participants