Skip to content

Commit

Permalink
Remove --ignore_subject_consistency param.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jan 17, 2024
1 parent 8e90140 commit e91b612
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
10 changes: 0 additions & 10 deletions cubids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 4 additions & 3 deletions cubids/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
12 changes: 1 addition & 11 deletions cubids/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def validate(
sequential,
sequential_subjects,
ignore_nifti_headers,
ignore_subject_consistency,
):
"""Run the bids validator.
Expand All @@ -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
Expand All @@ -69,7 +67,6 @@ def validate(
call = build_validator_call(
str(bids_dir),
ignore_nifti_headers,
ignore_subject_consistency,
)
ret = run_validator(call)

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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",
Expand All @@ -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")

Expand Down

0 comments on commit e91b612

Please sign in to comment.