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

Partly fix parsing of Graphic Annotation condition #117

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

mrbean-bremen
Copy link
Member

  • handle ", that is" phrase
  • handle mixed ORed values and conditions
  • catch incorrectly parsed value type
  • remove now unneeded special case

@drahoja9 - please have a look. I reverted some of your changes, as the special handling is no longer needed, but let the mechanism in place.

- handle ", that is" phrase
- handle mixed ORed values and conditions
- catch incorrectly parsed value type
- remove now unneeded special case
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.98%. Comparing base (e8644e2) to head (8dfef58).
Report is 33 commits behind head on main.

Files Patch % Lines
dicom_validator/spec_reader/condition_parser.py 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
+ Coverage   89.82%   89.98%   +0.15%     
==========================================
  Files          15       15              
  Lines        1632     1697      +65     
==========================================
+ Hits         1466     1527      +61     
- Misses        166      170       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -246,15 +246,13 @@ def test_graphic_annotation_sequence(self, reader):
assert "(0070,0001)" in description
assert "items" in description["(0070,0001)"]

graphic_object_sequence = "(0070,0009)"
compound_graphic_sequence = "(0070,0209)"
for sequence_tag in (graphic_object_sequence, compound_graphic_sequence):
Copy link
Member Author

@mrbean-bremen mrbean-bremen Aug 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(0070,0209) actually has another condition, so I removed in from the test. This is a problem with the SPECIAL_CASES mechanism, as it would change the condition for all occurrences of a tag.

Copy link
Contributor

@drahoja9 drahoja9 Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my mistake, I've looked it up briefly and did not check the attributes carefully, sorry.

@drahoja9
Copy link
Contributor

drahoja9 commented Aug 5, 2024

Looks good to me. Thank you for the quick fix! ☺️

@mrbean-bremen mrbean-bremen merged commit 1c18bea into pydicom:main Aug 5, 2024
17 checks passed
@mrbean-bremen mrbean-bremen deleted the grafic_anno branch August 5, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants