-
Notifications
You must be signed in to change notification settings - Fork 41
feat: add permissive UID validation for DicomWebClient #118
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
feat: add permissive UID validation for DicomWebClient #118
Conversation
CPBridge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jaya-krishnan-sr
A couple of thoughts:
- It seems that you have essentially copy-pasted the relevant code from
uri.pyintoweb.py. Why not import it (i.e._validate_uid) instead and reduce redundancy? - I think
permissiveis too vague a name for the parameter of the client constrcutor. It makes sense for the_validate_uidfunction, where the meaning is clear from context. But for the client itself, it could mean that all sorts of things are permissive. How about changing the name of the client constructor parameter topermissive_uid?
|
Thanks for the review @CPBridge
Theres an additional MAX_UID_LENGTH check present as part of the
Yup. Agreed 👍🏽 |
Makes sense. But I think this should be fine, especially now that the |
Unfortunately the dicomweb-client/src/dicomweb_client/uri.py Lines 630 to 640 in ded157f
|
|
Ah okay. Well I don't think there's a good reason for that. I would prefer that we use the same method, and have the permissive flag skip the length check. |
…on in permissive mode.
|
One tiny tweak and we are good to go, thanks @jaya-krishnan-sr I will put out a patch release for this once merged |
|
Hi @jaya-krishnan-sr sorry can you also fix the linter errors? |
|
Hey @CPBridge, I have fixed all the linter errors. But i could see some |
CPBridge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good



Related Issue
Fixes #117
Changes
permissiveparameter toDICOMwebClientclassURIclass