Skip to content

Commit

Permalink
Remove --container argument from CLIs (#394)
Browse files Browse the repository at this point in the history
* Remove --container arg from CLIs.

* Remove container steps from workflows.

* Finish removing stuff.

* Reformat with black.

* Remove utils module.

* Run isort.

* Delete utils.py

* Update cubids/workflows.py

Co-authored-by: Matt Cieslak <[email protected]>

---------

Co-authored-by: Matt Cieslak <[email protected]>
  • Loading branch information
tsalo and mattcieslak authored Jan 28, 2025
1 parent 46df25c commit 49d9e88
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 810 deletions.
12 changes: 1 addition & 11 deletions cubids/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@
The credits for the CuBIDS package.
"""

from cubids import (
cli,
config,
constants,
cubids,
metadata_merge,
utils,
validator,
workflows,
)
from cubids import cli, config, constants, cubids, metadata_merge, validator, workflows
from cubids.__about__ import __copyright__, __credits__, __packagename__, __version__

__all__ = [
Expand All @@ -55,7 +46,6 @@
"constants",
"cubids",
"metadata_merge",
"utils",
"validator",
"workflows",
]
51 changes: 0 additions & 51 deletions cubids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ def _parse_validate():
help="Run the BIDS validator sequentially on each subject.",
required=False,
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
default=None,
)
parser.add_argument(
"--ignore-nifti-headers",
action="store_true",
Expand Down Expand Up @@ -442,11 +436,6 @@ def _parse_group():
"then output files will go to the specified location."
),
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)
parser.add_argument(
"--acq-group-level",
default="subject",
Expand Down Expand Up @@ -595,11 +584,6 @@ def _parse_apply():
default=False,
help="ensure that there are no untracked changes before finding groups",
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)
parser.add_argument(
"--acq-group-level",
default="subject",
Expand Down Expand Up @@ -692,11 +676,6 @@ def _parse_datalad_save():
action="store",
help="message for this commit",
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)

return parser

Expand Down Expand Up @@ -775,11 +754,6 @@ def _parse_undo():
"sub-X directories and dataset_description.json"
),
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)

return parser

Expand Down Expand Up @@ -923,11 +897,6 @@ def _parse_copy_exemplars():
# help='only include an exemplar subject from these '
# 'listed Acquisition Groups in the exemplar dataset ',
# required=False)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)
parser.add_argument(
"--force-unlock",
action="store_true",
Expand Down Expand Up @@ -1021,11 +990,6 @@ def _parse_add_nifti_info():
default=False,
help="unlock dataset before adding nifti info ",
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)
return parser


Expand Down Expand Up @@ -1122,11 +1086,6 @@ def _parse_purge():
default=False,
help="ensure that there are no untracked changes before finding groups",
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)
return parser


Expand Down Expand Up @@ -1212,11 +1171,6 @@ def _parse_remove_metadata_fields():
default=[],
help="space-separated list of metadata fields to remove.",
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)

return parser

Expand Down Expand Up @@ -1298,11 +1252,6 @@ def _parse_print_metadata_fields():
"sub-X directories and dataset_description.json"
),
)
parser.add_argument(
"--container",
action="store",
help="Docker image tag or Singularity image file.",
)

return parser

Expand Down
3 changes: 2 additions & 1 deletion cubids/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Functions for configuring CuBIDS."""

from pathlib import Path
import importlib.resources
from pathlib import Path

import yaml


Expand Down
2 changes: 0 additions & 2 deletions cubids/tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def test_cubids_apply_intendedfor(
edited_summary_tsv=summary_tsv,
files_tsv=files_tsv,
new_tsv_prefix=None,
container=None,
)

with open(fmap_json) as f:
Expand All @@ -357,5 +356,4 @@ def test_cubids_apply_intendedfor(
edited_summary_tsv=summary_tsv,
files_tsv=files_tsv,
new_tsv_prefix=None,
container=None,
)
6 changes: 3 additions & 3 deletions cubids/tests/test_bond.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
get_data,
)
from cubids.validator import (
bids_validator_version,
build_validator_call,
extract_summary_info,
get_bids_validator_version,
parse_validator_output,
run_validator,
get_bids_validator_version,
extract_summary_info,
update_dataset_description,
bids_validator_version,
)

COMPLETE_KEY_GROUPS = [
Expand Down
2 changes: 1 addition & 1 deletion cubids/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Utility functions for CuBIDS' tests."""

import hashlib
import importlib.resources
import json
import os
import shutil
Expand All @@ -10,7 +11,6 @@
import nibabel as nb
import numpy as np
import pandas as pd
import importlib.resources

TEST_DATA = importlib.resources.files("cubids") / "tests/data"

Expand Down
36 changes: 0 additions & 36 deletions cubids/utils.py

This file was deleted.

Loading

0 comments on commit 49d9e88

Please sign in to comment.