Skip to content

Commit

Permalink
Drop skip_bids_validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Aug 13, 2024
1 parent 67e72ad commit b4a8011
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
17 changes: 0 additions & 17 deletions qsirecon/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,23 +462,6 @@ def parse_args(args=None, namespace=None):
"Please modify the output path."
)

# Validate inputs
if not opts.skip_bids_validation:
if opts.recon_input is not None:
build_log.info("Skipping BIDS validation because inputs are BIDS derivatives")
else:
from ..utils.bids import validate_input_dir

build_log.info(
"Making sure the input data is BIDS compliant (warnings can be ignored in most "
"cases)."
)
validate_input_dir(
config.environment.exec_env,
opts.bids_dir,
opts.participant_label,
)

# Setup directories
config.execution.log_dir = config.execution.output_dir / "logs"
# Check and create output and working directories
Expand Down
13 changes: 0 additions & 13 deletions tests/opts_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,3 @@ def test_set_freesurfer_license(tmpdir):
opts = get_parser().parse_args(fsarg.split(' '))
set_freesurfer_license(opts)
assert os.getenv('FS_LICENSE') == f'{lic3}'


@pytest.mark.parametrize("will_validate,opts_str", (
(True, base_args), # run if base args
(False, base_args + " --skip_bids_validation"), # not if skipped
(False, base_args + " --recon-only"), # or recon all
(False, base_args + " --skip_bids_validation --recon-only") # or both
))
def test_validate_bids(monkeypatch, opts_str, will_validate):
# from ..utils.bids import validate_input_dir
monkeypatch.setattr("qsirecon.utils.bids.validate_input_dir", lambda *kargs: True)
opts = get_parser().parse_args(opts_str.split(' '))
assert will_validate == validate_bids(opts)

0 comments on commit b4a8011

Please sign in to comment.