Skip to content

Commit

Permalink
Merge pull request #11 from ArcanaFramework/develop
Browse files Browse the repository at this point in the history
Updated DicomSet -> DicomSeries to match change in fileformats
  • Loading branch information
tclose authored Nov 15, 2023
2 parents 2432f9e + 7f877ae commit 7846a07
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions arcana/xnat/cli/tests/test_cli_dataset_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import requests
from docker.errors import ContainerError
import pytest
from fileformats.medimage import DicomSet
from fileformats.medimage import DicomSeries
import medimages4tests.dummy.dicom.mri.t1w.siemens.skyra.syngo_d13c
import medimages4tests.dummy.dicom.mri.fmap.siemens.skyra.syngo_d13c
from arcana.core.cli.dataset import export
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_bids_export(
[
FileBP(
path="DICOM",
datatype=DicomSet,
datatype=DicomSeries,
filenames=["dicom/t1w/*"],
)
],
Expand All @@ -77,7 +77,7 @@ def test_bids_export(
)
original.add_source(
name="anat/T1w",
datatype=DicomSet,
datatype=DicomSeries,
path="mprage",
)
original.save()
Expand Down
4 changes: 2 additions & 2 deletions arcana/xnat/data/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import attrs
import xnat.session
from fileformats.core import FileSet, Field
from fileformats.medimage import DicomSet
from fileformats.medimage import DicomSeries
from fileformats.core.exceptions import FormatRecognitionError
from arcana.core.utils.misc import (
path2varname,
Expand Down Expand Up @@ -127,7 +127,7 @@ def populate_row(self, row: DataRow):
for xresource in xscan.resources.values():
uri = self._get_resource_uri(xresource)
if xresource.label in ("DICOM", "secondary"):
datatype = DicomSet
datatype = DicomSeries
item_metadata = self.get_dicom_header(uri)
else:
datatype = FileSet
Expand Down
6 changes: 3 additions & 3 deletions arcana/xnat/data/tests/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from functools import reduce
import itertools
import pytest
from pydra.utils.hash import hash_single, Cache
from pydra.utils.hash import hash_object
from fileformats.generic import File
from fileformats.field import Text as TextField
from arcana.common import Clinical
Expand Down Expand Up @@ -183,6 +183,6 @@ def test_provenance_roundtrip(datatype: type, value: str, simple_dataset: Datase

def test_dataset_bytes_hash(static_dataset):

hsh = hash_single(static_dataset, Cache({}))
hsh = hash_object(static_dataset)
# Check hashing is stable
assert hash_single(static_dataset, Cache({})) == hsh
assert hash_object(static_dataset) == hsh
6 changes: 3 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from arcana.core.deploy.image.base import BaseImage
from arcana.common import Clinical
from arcana.core.data.set import Dataset
from fileformats.medimage import NiftiGzX, NiftiGz, DicomSet, NiftiX
from fileformats.medimage import NiftiGzX, NiftiGz, DicomSeries, NiftiX
from fileformats.text import Plain as Text
from fileformats.image import Png
from fileformats.serialization import Json
from fileformats.application import Json
from fileformats.generic import Directory
from arcana.xnat.data.api import Xnat
from arcana.xnat.utils.testing import (
Expand Down Expand Up @@ -171,7 +171,7 @@ def arcana_home(work_dir):
resources=[
FileBP(
path="DICOM",
datatype=DicomSet,
datatype=DicomSeries,
filenames=[
"dicom/fmap/1.dcm",
"dicom/fmap/2.dcm",
Expand Down

0 comments on commit 7846a07

Please sign in to comment.