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

ENH Add BaseTag handling in _tag_matches #59

Closed
wants to merge 2 commits into from
Closed

Conversation

sustrev
Copy link

@sustrev sustrev commented Nov 1, 2023

See Issue 58

@codecov-commenter
Copy link

Codecov Report

Merging #59 (7f63335) into main (988957a) will decrease coverage by 0.15%.
Report is 1 commits behind head on main.
The diff coverage is 62.50%.

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
- Coverage   88.93%   88.78%   -0.15%     
==========================================
  Files          14       14              
  Lines        1518     1525       +7     
==========================================
+ Hits         1350     1354       +4     
- Misses        168      171       +3     
Files Coverage Δ
dicom_validator/validator/iod_validator.py 91.68% <62.50%> (-0.67%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -560,6 +561,8 @@ def _tag_id_string(tag_id):

@staticmethod
def _tag_matches(tag_value, operator, values):
if type(tag_value) == BaseTag:
values = IODValidator._value_basetag_conversion(values)
Copy link
Member

Choose a reason for hiding this comment

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

While this will fix the issue, I would prefer to fix the parser instead, so that the created json array can be correctly parsed. I checked that this problem appears only 4 times in the json file, and rather than add this check each time I would like to make it unnessary.
If you want to have a go at this, you are welcome of course, otherwise I will have a go (hopefuly soon).

In case you want to do this, I would recommend to write a test for the problem first (check the tests in test_part3_reader), and then write a fix against the test.

Copy link
Author

Choose a reason for hiding this comment

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

Makes sense to me! I'm not sure exactly when I'll have time to work on this again, but I'll give it a go unless you get to it before me!

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks! I'm also not sure when I will get the time - best case would be this weekend... I will let you know!

Copy link
Member

Choose a reason for hiding this comment

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

I had a preliminary look at this, and this may be a little bit trickier than I thought - I also encountered a couple of other conditions that are wrong due to the same parsing issue. So I think I'll better tackle this myself, but thanks for your help! You can of course go with your fix as long as I haven't done it.

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good! Thanks for all your work on dicom-validator, it's very appreciated!

@mrbean-bremen
Copy link
Member

Superseded by #61 as discussed - closing.

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