feat: add permissive UID validation for DicomWebClient#118
Conversation
CPBridge
left a comment
There was a problem hiding this comment.
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 |



Related Issue
Fixes #117
Changes
permissiveparameter toDICOMwebClientclassURIclass