Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove container support #289

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions cubids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,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 @@ -171,11 +165,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 @@ -267,11 +256,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 @@ -325,11 +309,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 @@ -362,11 +341,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 @@ -449,11 +423,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.",
)
return parser


Expand Down Expand Up @@ -501,11 +470,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 @@ -551,11 +515,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 @@ -593,12 +552,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 @@ -632,12 +585,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
25 changes: 0 additions & 25 deletions cubids/tests/test_bond.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,31 +1028,6 @@ def test_validator(tmp_path):
assert isinstance(parsed, pd.DataFrame)


def test_docker():
"""Verify that docker is installed and the user has permission to run docker images.

Returns
-------
-1 Docker can't be found
0 Docker found, but user can't connect to daemon
1 Test run OK
"""
try:
return_status = 1
ret = subprocess.run(["docker", "version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError as e:
from errno import ENOENT

if e.errno == ENOENT:
print("Cannot find Docker engine!")
return_status = 0
raise e
if ret.stderr.startswith(b"Cannot connect to the Docker daemon."):
print("Cannot connect to Docker daemon!")
return_status = 0
assert return_status


# def test_image(image='pennlinc/bond:latest'):
# """Check whether image is present on local system."""
# ret = subprocess.run(['docker', 'images', '-q', image],
Expand Down
33 changes: 0 additions & 33 deletions cubids/utils.py

This file was deleted.

1 change: 0 additions & 1 deletion cubids/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

def build_validator_call(path, ignore_headers=False):
"""Build a subprocess command to the bids validator."""
# build docker call
# CuBIDS automatically ignores subject consistency.
command = ["bids-validator", "--verbose", "--json", "--ignoreSubjectConsistency"]

Expand Down
Loading