DICOMweb URL manipulation for Google Cloud Healthcare API#48
DICOMweb URL manipulation for Google Cloud Healthcare API#48hackermd merged 20 commits intoImagingDataCommons:masterfrom
Conversation
|
I see that this breaks the build for Python versions 3.6 and 3.7 due to missing features of |
|
I'm going to jump in here and suggest that Google support doesn't should not be a first class property of the python package, but should be provided as another layer on top. I added support to Slicer that assumes We also follow this model in javascript, where the dicomweb client is a layer beneath the Google-specific project/location/dataset/dicomstore layers. |
I generally agree with you @pieper and share your concerns regarding the inclusion of code that is specific to a particular vendor implementation. |
|
@ntenenz what do you think? |
I agree with @pieper that having this functionality in the main client feels a bit strange, in particular, because it adds a fairly minor feature (string templatization) in exchange for what appears to be an added dependency. An alternate approach may be to conditionally make available vendor-specific clients with auth, path building, etc built-in if As an aside, I don't see the |
|
@agharwal I have put further thought into this PR and @ntenenz's suggestion. I like the idea of creating vendor-specific extensions ( |
|
I'd recommend using extra requirements. Relative to the size of the added code, I wouldn't want to handle the extra complexity and package management that comes along with namespace packages. |
Sounds good. That's also the approach we have been taking so far. Implementing the extension mechanism will require minor changes to the repository structure. @agharwal I would suggest moving the I would further suggest moving the |
|
Given the move, this may be a good time to revisit the API/implementation. If the GCP functionality can be accomplished with a decorator, it may make sense to first implement the proposal discussed in #50 and then create a GCPDICOMwebClient which injects the required decorator. |
What exactly do you have in mind? I don't think the extension mechanism would require passing any decorators to |
|
I'm unfamiliar with the Google product, however if it requires custom headers or auth, the decorator approach would be a pretty seamless way of incorporating it. I'm assuming the vendor-specific client would wrap all vendor functionality under a single umbrella for ease of use? |
…p.session_utils` and add deprecation warning to the original.
@hackermd: Apologies for the delayed turnaround, and thank you for the feedback! Per your suggestion, I've moved @ntenenz: Thank you for helping incorporate vendor-specific implementations in a meaningful and non-disruptive fashion. |
|
Glad to see the project is still going strong. |
…ntials()` to `ext.gcp.session_utils`.
Markus - thank you for your kind consideration!
The PR introduces a
GoogleCloudHealthcareURLclass to facilitate parsing and creation of DICOMweb API Service URLs for the Google Cloud Healthcare API.Implementation notes:
base_urlparameter, I focused the API's interactions with thebase_urlstring.str<--> CHC DICOM Store), more than one method was needed. In order to limit the footprint of vendor-specific features within theurimodule, I opted to encapsulate the requisite functionality under a dedicated class.attrin favor ofdataclasses.dataclassfor compatibility with Python 3.6. I understand, however, that this is not part of the Standard Library, so you may preferdataclasswith a Python 3.6 backport. Alternately, we could drop any such dependency and implement a custom container. Given how simple the non-attribute-functionality is, however, this may be overkill.I look forward to your feedback :-)