Skip to content

Commit

Permalink
Fix typo in BidsValidator plugin
Browse files Browse the repository at this point in the history
Had `bids_dirs` where it should be `bids_dir`
  • Loading branch information
pvandyken committed Sep 15, 2023
1 parent 3a25e99 commit c5bb8c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit c5bb8c6

Please sign in to comment.