Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build(deps): Bump bids-examples from ad9db4b to 4460013 #1080

Merged
merged 7 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
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
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):
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
layout = BIDSLayout(bids_examples / dataset, derivatives=True)
files = layout.get(subject=".*", datatype=".*", regex_search = True, scope=scope)
Expand Down
13 changes: 6 additions & 7 deletions bids/layout/tests/test_validation.py
Copy link
Contributor

Choose a reason for hiding this comment

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

@effigies
shouldn't the validator tests be moved to the repo for the python bids validator?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, probably. I didn't realize this is here. It's probably redundant with our existing tests...

Copy link
Contributor

Choose a reason for hiding this comment

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

will cross check and maybe move the tests to the python bids-validator if necessary: may give me the occasion to be a bit familiar with that code base too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be a good idea. Incidentally, the problem with these tests seems to go back to the specification, where our regex generation is looser than the old hand-written ones. Thinking through how to manage this.

Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def test_is_session_level_true(testvalidator):


# checks is_session_level() function false cases
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should pass with the release of bidsschematools 0.11.0. Would you mind restoring it to verify? Then removing the tests can all be in #1081.

def test_is_session_level_false(testvalidator):
target_list = [
@pytest.mark.parametrize("item",
Copy link
Contributor

Choose a reason for hiding this comment

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

parametrization to make it easier to know which test is failing

[
"/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
Expand All @@ -138,11 +138,10 @@ def test_is_session_level_false(testvalidator):
"/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
])
def test_is_session_level_false(testvalidator, item):
result = testvalidator.is_session_level(item)
assert not result


# checks is_subject_level() function true cases
Expand Down
Loading