Skip to content

Commit

Permalink
Removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Dec 11, 2024
1 parent b08c40f commit 58dda13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
14 changes: 2 additions & 12 deletions NiChart_DLMUSE/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,9 @@
"""

import argparse
import os
import shutil
import threading

from .dlmuse_pipeline import run_pipeline

from .utils import (
collect_T1,
merge_bids_output_data,
merge_output_data,
remove_subfolders,
split_data,
)

# VERSION = pkg_resources.require("NiChart_DLMUSE")[0].version
VERSION = "1.0.7"

Expand Down Expand Up @@ -160,8 +149,9 @@ def main() -> None:
dlmuse_extra_args,
clear_cache,
bids,
cores
cores,
)


if __name__ == "__main__":
main()
10 changes: 6 additions & 4 deletions NiChart_DLMUSE/dlmuse_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
import os
from typing import Any
import shutil
import threading
from typing import Any

import pkg_resources # type: ignore

Expand All @@ -12,8 +12,8 @@
from .ReorientImage import apply_reorient_img, apply_reorient_to_init
from .SegmentImage import run_dlicv, run_dlmuse
from .utils import (
make_img_list,
collect_T1,
make_img_list,
merge_bids_output_data,
merge_output_data,
remove_subfolders,
Expand Down Expand Up @@ -44,6 +44,7 @@
logger = logging.getLogger(__name__)
logging.basicConfig(filename="pipeline.log", encoding="utf-8", level=logging.DEBUG)


def run_pipeline(
in_dir: str,
out_dir: str,
Expand All @@ -52,8 +53,8 @@ def run_pipeline(
dlmuse_extra_args: str,
clear_cache: bool,
bids: bool,
cores: str
):
cores: str,
) -> None:
"""
NiChart pipeline
Expand Down Expand Up @@ -157,6 +158,7 @@ def run_pipeline(
else: # No core parallelization
run_thread(in_dir, out_dir, device, dlmuse_extra_args, dlicv_extra_args)


def run_thread(
in_data: str,
out_dir: str,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
remove_common_suffix,
remove_subfolders,
split_data,
get_bids_prefix
)


Expand Down Expand Up @@ -73,6 +72,7 @@ def testing_get_bids_prefix() -> None:
temp_folder = "test"
assert get_bids_prefix(temp_folder, True) == "test"


def testing_collect_T1() -> None:
os.system("mkdir test_collect_T1")

Expand Down

0 comments on commit 58dda13

Please sign in to comment.