Skip to content

Fix participants.tsv parsing when metadata contains spaces - #86

Merged
bbuchsbaum merged 1 commit into
masterfrom
fix/84-participants-tsv-spaces
Oct 29, 2026
Merged

bbuchsbaum merged 1 commit into
masterfrom
fix/84-participants-tsv-spaces

Conversation

@bbuchsbaum

@bbuchsbaum bbuchsbaum commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

bids_project() splits participant metadata on arbitrary whitespace, so valid values such as homo sapiens can cause “more columns than column names”. Specify sep = "\t" in the participant reader to preserve spaces within TSV fields.

Adds an integration regression test that opens a minimal dataset with multiword species and group values and verifies the exact metadata, participant ID, column names, row count, and numeric age.

Validation: reviewed the change against the current reader and existing test fixture. R/Rscript is not installed in the editing environment, so the test suite and R CMD check have not been run locally; this draft awaits GitHub CI validation.

Fixes #84.


Note

Low Risk
Single-line parsing change in participant metadata loading with a targeted regression test; no auth or security impact.

Overview
Fixes bids_project() failing on valid participants.tsv rows when metadata values contain spaces (e.g. homo sapiens, healthy control). The loader now passes sep = "\t" to read.table() in .bidser_load_participants_df, so columns split only on tabs instead of arbitrary whitespace.

Adds a regression test that overwrites participants.tsv with multi-word species / group fields and checks part_df column names, string values, row count, and numeric age.

Addresses #84.

Reviewed by Cursor Bugbot for commit 4bc3749. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Oct 29, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 919761f7-17f2-4c94-919f-b72bb5fe748c)

@bbuchsbaum
bbuchsbaum marked this pull request as ready for review October 29, 2026 20:15
@bbuchsbaum
bbuchsbaum merged commit 796104f into master Oct 29, 2026
10 checks passed
@cursor

cursor Bot commented Oct 29, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: e5337d15-42fa-463b-a77d-8d9aca6120b4)

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.

bids_project() fails when participants.tsv contains white spaces

1 participant