diff --git a/xnat_ingest/cli/stage.py b/xnat_ingest/cli/stage.py index d184401..05d74fb 100644 --- a/xnat_ingest/cli/stage.py +++ b/xnat_ingest/cli/stage.py @@ -6,9 +6,8 @@ from tqdm import tqdm from xnat_ingest.cli.base import cli from xnat_ingest.session import ImagingSession -from frametree.xnat import Xnat +from frametree.xnat import Xnat # type: ignore[import-untyped] from xnat_ingest.utils import ( - DicomField, AssociatedFiles, logger, LogFile, @@ -39,7 +38,7 @@ type=str, metavar="", multiple=True, - default="medimage/dicom-series", + default=["medimage/dicom-series"], envvar="XNAT_INGEST_STAGE_DATATYPE", help="The datatype of the primary files to to upload", ) diff --git a/xnat_ingest/session.py b/xnat_ingest/session.py index 468522f..a95914e 100644 --- a/xnat_ingest/session.py +++ b/xnat_ingest/session.py @@ -5,15 +5,18 @@ import os.path import subprocess as sp from functools import cached_property -from typing_extensions import Self import shutil +import random +import string +import platform from copy import deepcopy -import yaml -from tqdm import tqdm -import attrs from itertools import chain from collections import defaultdict, Counter from pathlib import Path +from typing_extensions import Self +import attrs +from tqdm import tqdm +import yaml import pydicom from fileformats.generic import File from fileformats.application import Dicom @@ -29,9 +32,6 @@ from .exceptions import ImagingSessionParseError, StagingError from .utils import add_exc_note, transform_paths, AssociatedFiles from .dicom import dcmedit_path -import random -import string -import platform logger = logging.getLogger("xnat-ingest")