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

Fix typo in BidsValidator plugin #337

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion snakebids/plugins/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __call__(self, app: SnakeBidsApp) -> None:
temp.flush()
try:
subprocess.check_call(
["bids-validator", app.config["bids_dirs"], "-c", temp.name]
["bids-validator", app.config["bids_dir"], "-c", temp.name]
)

# If successfully bids-validation performed
Expand Down
8 changes: 4 additions & 4 deletions snakebids/tests/test_validate_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_validation_successful(self, app: SnakeBidsApp, mocker: MockerFixture):
# Test successful validation
mocker.patch("subprocess.check_call", return_value=0)

app.config["bids_dirs"] = "path/to/bids/dir"
app.config["bids_dir"] = "path/to/bids/dir"
app.config["plugins.validator.skip"] = False

validator = BidsValidator()
Expand All @@ -48,7 +48,7 @@ def test_missing_bids_validator(
# Test fall back to Pybids validation
mocker.patch("subprocess.check_call", side_effect=FileNotFoundError)

app.config["bids_dirs"] = "path/to/bids/dir"
app.config["bids_dir"] = "path/to/bids/dir"
app.config["plugins.validator.skip"] = False

validator = BidsValidator()
Expand All @@ -68,7 +68,7 @@ def test_raise_validation_error(self, app: SnakeBidsApp, mocker: MockerFixture):
"subprocess.check_call", side_effect=subprocess.CalledProcessError(1, "")
)

app.config["bids_dirs"] = "path/to/bids/dir"
app.config["bids_dir"] = "path/to/bids/dir"
app.config["plugins.validator.skip"] = False

# Check error raised
Expand All @@ -85,7 +85,7 @@ def test_ignore_validation_error(self, app: SnakeBidsApp, mocker: MockerFixture)
"subprocess.check_call", side_effect=subprocess.CalledProcessError(1, "")
)

app.config["bids_dirs"] = "path/to/bids/dir"
app.config["bids_dir"] = "path/to/bids/dir"
app.config["plugins.validator.skip"] = False

# Check if error is skipped on invalid
Expand Down