Skip to content

Commit

Permalink
Merge pull request #1080 from bids-standard/dependabot/submodules/bid…
Browse files Browse the repository at this point in the history
…s-examples-4460013

Build(deps): Bump bids-examples from `ad9db4b` to `4460013`
  • Loading branch information
Remi-Gau authored Aug 15, 2024
2 parents 56d98d8 + 284ac2b commit d66be75
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/
cov.xml

# Translations
*.mo
Expand Down
2 changes: 1 addition & 1 deletion bids-examples
2 changes: 1 addition & 1 deletion bids/layout/tests/test_layout_on_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_layout_on_examples_with_derivatives(dataset, nb_files, bids_examples):
("asl005", 10),
("ds001", 134), # with anat and func data
("eeg_cbm", 104),
("ds000246", 54), # with meg data
("ds000246", 19), # with meg data (excludes all files in .ds folders)
("genetics_ukbb", 96), # with dwi data
("ieeg_visual_multimodal", 148), # also with fmap data; ignore stimmuli folder
("pet001", 12),
Expand Down
18 changes: 1 addition & 17 deletions bids/layout/tests/test_path_building.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,7 @@ def test_path_building_in_raw_scope(dataset, bids_examples):
assert path == bf.path

@pytest.mark.parametrize("scope", ["raw"])
@pytest.mark.parametrize(
"dataset",
[
pytest.param(
"ds000247",
marks=pytest.mark.xfail(strict=True,
reason="meg ds folder"
),
),
pytest.param(
"ds000246",
marks=pytest.mark.xfail(strict=True,
reason="meg ds folder"
),
),
],
)
@pytest.mark.parametrize("dataset", ["ds000247", "ds000246"])
def test_path_building_on_examples_with_derivatives_meg_ds_folder(dataset, scope, bids_examples):
layout = BIDSLayout(bids_examples / dataset, derivatives=True)
files = layout.get(subject=".*", datatype=".*", regex_search = True, scope=scope)
Expand Down
34 changes: 0 additions & 34 deletions bids/layout/tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,40 +111,6 @@ def test_is_session_level_true(testvalidator):
assert result


# checks is_session_level() function false cases
def test_is_session_level_false(testvalidator):
target_list = [
"/sub-01/ses-ses/sub-01_dwi.bval", # redundant dir /ses-ses/
"/sub-01/01_dwi.bvec", # missed subject suffix
"/sub-01/sub_dwi.json", # missed subject id
"/sub-01/sub-01_23_run-01_dwi.bval", # wrong _23_
"/sub-01/sub-01_run-01_dwi.vec", # wrong extension
"/sub-01/sub-01_run-01_dwi.jsn", # wrong extension
"/sub-01/sub-01_acq_dwi.bval", # missed suffix value
"/sub-01/sub-01_acq-23-singleband_dwi.bvec", # redundant -23-
"/sub-01/anat/sub-01_acq-singleband_dwi.json", # redundant /anat/
"/sub-01/sub-01_recrod-record_acq-singleband_run-01_dwi.bval", # redundant record-record_
"/sub_01/sub-01_acq-singleband_run-01_dwi.bvec", # wrong /sub_01/
"/sub-01/sub-01_acq-singleband__run-01_dwi.json", # wrong __
"/sub-01/ses-test/sub-01_ses_test_dwi.bval", # wrong ses_test
"/sub-01/ses-test/sb-01_ses-test_dwi.bvec", # wrong sb-01
"/sub-01/ses-test/sub-01_ses-test_dw.json", # wrong modality
"/sub-01/ses-test/sub-01_ses-test_run-01_dwi.val", # wrong extension
"/sub-01/ses-test/sub-01_run-01_dwi.bvec", # missed session in the filename
"/sub-01/ses-test/ses-test_run-01_dwi.json", # missed subject in the filename
"/sub-01/ses-test/sub-01_ses-test_acq-singleband.bval", # missed modality
"/sub-01/ses-test/sub-01_ses-test_acq-singleband_dwi", # missed extension
"/ses-test/sub-01/sub-01_ses-test_acq-singleband_dwi.json", # wrong dirs order
"/sub-01/ses-test/sub-02_ses-test_acq-singleband_run-01_dwi.bval", # wrong sub id in the filename
"/sub-01/sub-01_ses-test_acq-singleband_run-01_dwi.bvec", # ses dir missed
"/ses-test/sub-01_ses-test_acq-singleband_run-01_dwi.json" # sub id dir missed
]

for item in target_list:
result = testvalidator.is_session_level(item)
assert not result


# checks is_subject_level() function true cases
def test_is_subject_level_true(testvalidator):
target_list = [
Expand Down

0 comments on commit d66be75

Please sign in to comment.