Skip to content

Change suffix pattern to avoid matching things like "participants" in "participants.tsv" #380

@yarikoptic

Description

@yarikoptic

didn't check what would happen if I add a suffix column to participants.tsv but imho smells like a regression which caused suffix to be added where it shouldn't be... please confirm or clarify:

$> python -c 'import  bids as b; print(b.__version__); print(b.BIDSLayout(".").get_collections(level="dataset")[0].to_df().to_dict(orient="records"))'   
0.7.0
[{'language': '\xd1\x80\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9', 'gender': nan, 'age': '30-35', 'handedness': 'r', 'hearing_problems_current': 'n', 'subject': '01'}, {'language': 'english', 'gender': 'f', 'age': '20-25', 'handedness': 'r', 'hearing_problems_current': 'n', 'subject': '03'}]

now with 0.7.1 -- see "suffix" to appear:

$> python -c 'import  bids as b; print(b.__version__); print(b.BIDSLayout(".").get_collections(level="dataset")[0].to_df().to_dict(orient="records"))'
0.7.1
[{u'suffix': 'participants', 'language': '\xd1\x80\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9', 'gender': nan, 'age': '30-35', 'handedness': 'r', 'hearing_problems_current': 'n', 'subject': '01'}, {u'suffix': 'participants', 'language': 'english', 'gender': 'f', 'age': '20-25', 'handedness': 'r', 'hearing_problems_current': 'n', 'subject': '03'}]

```shell
$> cat participants.tsv 
participant_id	gender	age	handedness	hearing_problems_current	language
sub-01	n/a	30-35	r	n	русский
sub-03	f	20-25	r	n	english

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions