Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion src/bids/layout/tests/test_layout_on_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,42 @@ def test_layout_on_examples_with_derivatives(dataset, nb_files, bids_examples):
("mrs_fmrs", 169),
("mrs_biggaba", 172),
("mrs_2dmrsi", 67),
("emg_ConcurrentIndependentUnits", 18),
("emg_CustomBipolar", 7),
("emg_CustomBipolarFace", 11),
("emg_IndependentMod", 7),
("emg_MultiBodyParts", 10),
("emg_Multimodal", 21),
("emg_TwoHDsEMG", 12),
("emg_TwoWristbands", 10),
("eyetracking_binocular", 21),
("eyetracking_fmri", 30),
Comment on lines +64 to +73
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am a bit more confused as to why those pass given that some files from those datasets have entities, suffixes that do not appear in the config

I must be missing something obvious

I am tired

Copy link
Collaborator

Choose a reason for hiding this comment

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

They should pass because the validator is now schema based.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ha yes you mentioned

but what becomes of the config file then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose we could make those tests contingent on the bidsschematools version?

The config file needs updating to give you access to new entities (or you can use @astewartau's recent contribution in #1215),

],
)
def test_layout_on_examples_no_derivatives(dataset, nb_files, bids_examples):
layout = BIDSLayout(bids_examples / dataset)
files = layout.get()
assert len(files) == nb_files
assert len(files) == nb_files

@pytest.mark.xfail(reason="atlas datasets are not fully supported in pybids")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

those currently fail: I would expect that given the current configs we have

@pytest.mark.parametrize(
"dataset, nb_files",
[

("atlas-4S", 48),
("atlas-AAL", 7),
("atlas-Destrieux", 7),
("atlas-DiFuMo", 19),
("atlas-HarvardOxford", 9),
("atlas-HOSPA", 27),
("atlas-Juelich", 9),
("atlas-Schaefer", 10),
("atlas-suit", 18),
("atlas-Talairach", 19),
],
)
def test_layout_on_examples_derivatives(dataset, nb_files, bids_examples):
"""Check n files found in derivative dataset."""
layout = BIDSLayout(bids_examples / dataset, config="derivatives")
files = layout.get()
assert len(files) == nb_files
Loading