diff --git a/cubids/cli.py b/cubids/cli.py index 40c2eca84..a55cecb0d 100644 --- a/cubids/cli.py +++ b/cubids/cli.py @@ -61,16 +61,6 @@ def _parse_validate(): help="Disregard NIfTI header content during validation", required=False, ) - parser.add_argument( - "--ignore_subject_consistency", - action="store_true", - default=True, - help=( - "Skip checking that any given file for one " - "subject is present for all other subjects" - ), - required=False, - ) parser.add_argument( "--sequential-subjects", action="store", diff --git a/cubids/validator.py b/cubids/validator.py index 40a130b8c..ea6265441 100644 --- a/cubids/validator.py +++ b/cubids/validator.py @@ -11,15 +11,16 @@ logger = logging.getLogger("cubids-cli") -def build_validator_call(path, ignore_headers=False, ignore_subject=True): +def build_validator_call(path, ignore_headers=False): """Build a subprocess command to the bids validator.""" # build docker call command = ["bids-validator", "--verbose", "--json"] if ignore_headers: command.append("--ignoreNiftiHeaders") - if ignore_subject: - command.append("--ignoreSubjectConsistency") + + # CuBIDS automatically ignores subject consistency. + command.append("--ignoreSubjectConsistency") command.append(path) diff --git a/cubids/workflows.py b/cubids/workflows.py index eea9bfa50..37793981a 100644 --- a/cubids/workflows.py +++ b/cubids/workflows.py @@ -37,7 +37,6 @@ def validate( sequential, sequential_subjects, ignore_nifti_headers, - ignore_subject_consistency, ): """Run the bids validator. @@ -49,7 +48,6 @@ def validate( sequential sequential_subjects ignore_nifti_headers - ignore_subject_consistency """ # check status of output_prefix, absolute or relative? abs_path_output = True @@ -69,7 +67,6 @@ def validate( call = build_validator_call( str(bids_dir), ignore_nifti_headers, - ignore_subject_consistency, ) ret = run_validator(call) @@ -148,8 +145,7 @@ def validate( # run the validator nifti_head = ignore_nifti_headers - subj_consist = ignore_subject_consistency - call = build_validator_call(tmpdirname, nifti_head, subj_consist) + call = build_validator_call(tmpdirname, nifti_head) ret = run_validator(call) # parse output if ret.returncode != 0: @@ -228,9 +224,6 @@ def validate( if ignore_nifti_headers: cmd.append("--ignore_nifti_headers") - if ignore_subject_consistency: - cmd.append("--ignore_subject_consistency") - elif container_type == "singularity": cmd = [ "singularity", @@ -250,9 +243,6 @@ def validate( if ignore_nifti_headers: cmd.append("--ignore_nifti_headers") - if ignore_subject_consistency: - cmd.append("--ignore_subject_consistency") - if sequential: cmd.append("--sequential")