Skip to content

[ENH] Update participant.tsv - #391

Merged
SamGuay merged 4 commits into
devfrom
add_participant
Jul 29, 2026
Merged

[ENH] Update participant.tsv#391
SamGuay merged 4 commits into
devfrom
add_participant

Conversation

@arnaudbore

Copy link
Copy Markdown
Contributor

No description provided.

@arnaudbore
arnaudbore changed the base branch from master to dev July 29, 2026 13:25
@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.04%. Comparing base (6b970ee) to head (9f0b4ac).

Files with missing lines Patch % Lines
dcm2bids/utils/io.py 84.21% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #391      +/-   ##
==========================================
+ Coverage   75.91%   76.04%   +0.13%     
==========================================
  Files          17       17              
  Lines        1557     1578      +21     
  Branches      264      270       +6     
==========================================
+ Hits         1182     1200      +18     
- Misses        298      299       +1     
- Partials       77       79       +2     
Flag Coverage Δ
pytest 76.04% <86.36%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arnaudbore
arnaudbore requested a review from SamGuay July 29, 2026 13:27
Comment thread dcm2bids/utils/io.py Outdated
Comment on lines +75 to +80
if participants_file.exists():
with open(participants_file, "r") as f:
lines = f.readlines()
# Skip header line (participant_id)
if len(lines) > 1:
existing_participants = {line.strip() for line in lines[1:]}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This checks whether whole lines contain sub-* ONLY to match it with the participant_name. However, if a line contains other details, it will treat that participant_name as a new one and add another row. For example, when I try it using the dcm2bids_scaffold default participants.tsv pre-filled data, it output this after 2 runs of dcm2bids with the same participant ID. Note that I also tested by manually added the 88 for the second run:

sub-01
sub-01  88
sub-01  34      M       control
sub-02  12      F       control
sub-03  33      F       patient

I think it should check whether the first column matches or not, not the whole row.

@SamGuay
SamGuay merged commit 951f6e1 into dev Jul 29, 2026
31 checks passed
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.

3 participants