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

Update the tests to use current version 2024e #143

Merged
merged 1 commit into from
Nov 24, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
uses: actions/cache@v4
with:
path: dicom_validator/tests/fixtures/standard
key: "2015b_2024c"
key: "2015b_2024e"
enableCrossOsArchive: true

- name: Download DICOM standard
if: steps.cache-dicom.outputs.cache-hit != 'true'
run: |
pip install -e .
python .github/workflows/get_revision.py 2015b "`pwd`/dicom_validator/tests/fixtures/standard"
python .github/workflows/get_revision.py 2024c "`pwd`/dicom_validator/tests/fixtures/standard"
python .github/workflows/get_revision.py 2024e "`pwd`/dicom_validator/tests/fixtures/standard"

- name: Install dependencies
run: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Dicom Validator Release Notes
The released versions correspond to PyPi releases.

### Infrastructure
* update the tests for current version 2024e

## [Version 0.6.3](https://pypi.python.org/pypi/dicom-validator/0.6.3) (2024-10-24)
Bugfix release.

Expand Down
2 changes: 1 addition & 1 deletion dicom_validator/tests/fixtures/standard/editions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["2014a", "2014b", "2014c", "2015a", "2015b", "2015c", "2016a", "2016b", "2016c", "2016d", "2016e", "2017a", "2017b", "2017c", "2017d", "2017e", "2018a", "2018b", "2018c", "2018d", "2018e", "2019a", "2019b", "2019c", "2019d", "2019e", "2020a", "2020b", "2020c", "2020d", "2020e", "2021a", "2021b", "2021c", "2021d", "2021e", "2022a", "2022b", "2022c", "2022d", "2022e", "2023a", "2023b", "2023c", "2023d", "2023e", "2024a", "2024b", "2024c"]
["2014a", "2014b", "2014c", "2015a", "2015b", "2015c", "2016a", "2016b", "2016c", "2016d", "2016e", "2017a", "2017b", "2017c", "2017d", "2017e", "2018a", "2018b", "2018c", "2018d", "2018e", "2019a", "2019b", "2019c", "2019d", "2019e", "2020a", "2020b", "2020c", "2020d", "2020e", "2021a", "2021b", "2021c", "2021d", "2021e", "2022a", "2022b", "2022c", "2022d", "2022e", "2023a", "2023b", "2023c", "2023d", "2023e", "2024a", "2024b", "2024c", "2024d", "2024e"]
2 changes: 1 addition & 1 deletion dicom_validator/tests/spec_reader/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

CURRENT_REVISION = "2024c"
CURRENT_REVISION = "2024e"


def pytest_configure(config):
Expand Down
22 changes: 11 additions & 11 deletions dicom_validator/tests/spec_reader/test_part3_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_read_incomplete_doc_file(self, fs):

@pytest.mark.parametrize(
"revision,iod_name",
[("2015b", "Computed Tomography Image IOD"), ("2024c", "CT Image IOD")],
[("2015b", "Computed Tomography Image IOD"), ("2024e", "CT Image IOD")],
indirect=["revision"],
scope="session",
)
Expand All @@ -64,7 +64,7 @@ def test_lookup_sop_class(self, reader, iod_name):

@pytest.mark.parametrize(
"revision,module_nr",
[("2015b", 27), ("2024c", 28)],
[("2015b", 27), ("2024e", 29)],
indirect=["revision"],
scope="session",
)
Expand All @@ -78,7 +78,7 @@ def test_get_iod_modules(self, reader, module_nr):
assert module["ref"] == "C.7.5.1"
assert module["use"] == "M"

@pytest.mark.parametrize("revision", ["2015b", "2024c"], indirect=True)
@pytest.mark.parametrize("revision", ["2015b", "2024e"], indirect=True)
def test_optional_iod_module(self, reader):
description = reader.iod_description(chapter="A.38.1")
assert "modules" in description
Expand All @@ -90,7 +90,7 @@ def test_optional_iod_module(self, reader):

@pytest.mark.parametrize(
"revision,desc_nr",
[("2015b", 110), ("2024c", 154)],
[("2015b", 110), ("2024e", 155)],
indirect=["revision"],
scope="session",
)
Expand All @@ -103,7 +103,7 @@ def test_iod_descriptions(self, reader, desc_nr):

@pytest.mark.parametrize(
"revision,macro_nr",
[("2015b", 24), ("2024c", 27)],
[("2015b", 24), ("2024e", 28)],
indirect=["revision"],
scope="session",
)
Expand Down Expand Up @@ -137,7 +137,7 @@ def test_group_macros(self, reader, macro_nr):

@pytest.mark.parametrize(
"revision,desc_nr",
[("2015b", 9), ("2024c", 14)],
[("2015b", 9), ("2024e", 14)],
indirect=["revision"],
scope="session",
)
Expand All @@ -152,7 +152,7 @@ def test_module_description(self, reader, desc_nr):

@pytest.mark.parametrize(
"revision,desc_nr, seq_desc_nr",
[("2015b", 3, 3), ("2024c", 7, 4)],
[("2015b", 3, 3), ("2024e", 7, 4)],
indirect=["revision"],
scope="session",
)
Expand Down Expand Up @@ -183,7 +183,7 @@ def test_referenced_macro(self, reader):

@pytest.mark.parametrize(
"revision,desc_nr",
[("2015b", 451), ("2024c", 577)],
[("2015b", 451), ("2024e", 583)],
indirect=["revision"],
scope="session",
)
Expand All @@ -193,7 +193,7 @@ def test_module_descriptions(self, reader, desc_nr):

@pytest.mark.parametrize(
"revision,include_nr",
[("2015b", 9), ("2024c", 10)],
[("2015b", 9), ("2024e", 10)],
indirect=["revision"],
scope="session",
)
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_parsed_enum_values(self, reader):
assert enums == [{"val": ["FAILURE", "WARNING", "INFORMATIVE"]}]

@pytest.mark.parametrize(
"revision", ["2015b", "2024c"], indirect=True, scope="session"
"revision", ["2015b", "2024e"], indirect=True, scope="session"
)
def test_linked_enum_values(self, reader):
description = reader.module_description("10.24")
Expand All @@ -239,7 +239,7 @@ def test_linked_enum_values(self, reader):
assert tag["enums"] == [{"val": ["CONTINUOUS", "TRIGGERED", "AUTOMATIC"]}]

@pytest.mark.parametrize(
"revision", ["2015b", "2024c"], indirect=True, scope="session"
"revision", ["2015b", "2024e"], indirect=True, scope="session"
)
def test_graphic_annotation_sequence(self, reader):
description = reader.module_description("C.10.5")
Expand Down
8 changes: 4 additions & 4 deletions dicom_validator/tests/spec_reader/test_part6_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ def test_data_element(self, dict_reader):

def test_data_elements(self, dict_reader):
elements = dict_reader.data_elements()
assert len(elements) == 5092
assert len(elements) == 5197

def test_sop_class_uids(self, dict_reader):
sop_class_uids = dict_reader.sop_class_uids()
assert len(sop_class_uids) == 304
assert len(sop_class_uids) == 308
assert "1.2.840.10008.1.1" in sop_class_uids
assert sop_class_uids["1.2.840.10008.1.1"] == "Verification SOP Class"

def test_uid_type(self, dict_reader):
xfer_syntax_uids = dict_reader.uids("Transfer Syntax")
assert len(xfer_syntax_uids) == 59
assert len(xfer_syntax_uids) == 62
assert "1.2.840.10008.1.2.4.80" in xfer_syntax_uids
assert (
xfer_syntax_uids["1.2.840.10008.1.2.4.80"]
Expand All @@ -38,7 +38,7 @@ def test_all_uids(self, dict_reader):
assert "Transfer Syntax" in uids
assert "SOP Class" in uids
uid_nr = sum([len(uid_dict) for uid_dict in uids.values()])
assert uid_nr == 454
assert uid_nr == 461

def test_sop_class_name(self, dict_reader):
assert (
Expand Down
2 changes: 1 addition & 1 deletion dicom_validator/tests/test_cmdline_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def dicom_fixture_path(fixture_path):


@pytest.mark.order(0)
@pytest.mark.parametrize("revision", ["2015b", "2024c"])
@pytest.mark.parametrize("revision", ["2015b", "2024e"])
def test_validate_sr(revision, caplog, standard_path, dicom_fixture_path):
# test also for 2015b to test an issue causing an exception
rtdose_path = dicom_fixture_path / "rtdose.dcm"
Expand Down
2 changes: 1 addition & 1 deletion dicom_validator/tests/validator/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from dicom_validator.spec_reader.edition_reader import EditionReader
from dicom_validator.validator.iod_validator import DicomInfo

CURRENT_REVISION = "2024c"
CURRENT_REVISION = "2024e"


def pytest_configure(config):
Expand Down
Loading