Skip to content

Commit

Permalink
Only support Python >= 3.9 for DICOMweb
Browse files Browse the repository at this point in the history
Unfortunately, the newer versions of wsidicom, which we need to support
certain data formats for DICOMweb, require Python 3.9 or greater.

So we are going to only allow the DICOMweb plugin to be loaded for
Python >= 3.9.

The regular DICOM reader will still work with wsidicom for Python 3.8,
but only the DICOMweb part will not be loaded.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Dec 4, 2023
1 parent d5af348 commit 705d595
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/dicom/large_image_source_dicom/girder_plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from girder.plugin import GirderPlugin

from . import assetstore
Expand All @@ -8,4 +10,8 @@ class DICOMwebPlugin(GirderPlugin):
CLIENT_SOURCE_PATH = 'web_client'

def load(self, info):
if sys.version_info < (3, 9):
# We do not support python less than 3.9 for this plugin
return

Check warning on line 15 in sources/dicom/large_image_source_dicom/girder_plugin.py

View check run for this annotation

Codecov / codecov/patch

sources/dicom/large_image_source_dicom/girder_plugin.py#L15

Added line #L15 was not covered by tests

assetstore.load(info)
6 changes: 6 additions & 0 deletions sources/dicom/test_dicom/test_web_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import os
import sys

import pytest

# We support Python 3.9 and greater for DICOMweb
pytestmark = [
pytest.mark.skipif(sys.version_info < (3, 9), reason='requires python3.9 or higher'),
]


@pytest.mark.girder()
@pytest.mark.girder_client()
Expand Down
7 changes: 7 additions & 0 deletions test/test_source_dicomweb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import sys

import pytest

from . import utilities

# We support Python 3.9 and greater for DICOMweb
pytestmark = [
pytest.mark.skipif(sys.version_info < (3, 9), reason='requires python3.9 or higher'),
]


@pytest.mark.plugin('large_image_source_dicom')
def testTilesFromDICOMweb():
Expand Down

0 comments on commit 705d595

Please sign in to comment.