-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ability to specify external command to generate acquisition uid #38
base: master
Are you sure you want to change the base?
Conversation
@gsfr How would you feel about passing a |
This is a POC implementation. Consider passing custom function for generation rather than assuming source dicoms are in dir named the same as the resulting zip file. Then the zip meta would be accurate as well.
Rebased and added a new commit. This is untested and likely buggy, but I wanted to show it to you, @ryansanford, for feedback on general approach. Command line looks like this:
|
@gsfr Thanks. I should be able to check this out before I leave. |
@gsfr pushed change to fix an issue with subprocess call. Feel free to refactor to more elegant approach. I only tested that narrow use case. I'll review with a more critical eye tomorrow. |
Thanks. I'm going to refactor that just a tad. Also note that I have updated the original description of this PR. I don't think that an empty string return value should prevent reaping. Non-zero exit also doesn't currently prevent reaping, but it probably should. |
What is the purpose of the latest commit? Does the previous code not work? |
@gsfr I pushed a change so a single file from the series gets passed, rather than the original filename that's no longer valid after it's renamed. Behavior with a non-zero return from the external command is an empty metadata value and does not prevent the upload. It would be nice to have a defined return/exception interface on pkg_series() so we can fail the operation with predictable results to any callers. |
My bad on the first point and agreed on the second point. I can take that on once you agree on the general design and have tested the current implementation. |
Thanks for the python tip @gsfr I agree with the general design. Cursory testing with static, dicom tag name, and external command is working for me. 👍 |
@ryansanford I've added basic error handling. Please give it a whirl. We now error out on non-zero return of external command and proceed zero return, even with an empty string.
|
Included in this PR
uid_ext_command
to specify external command to run.Non-zero or empty string returned by command will prevent acquisition from being uploaded.Actions Before Merge