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

Detect exits when recipe does not contain filters #155

Closed
mjcbello opened this issue Oct 2, 2020 · 4 comments
Closed

Detect exits when recipe does not contain filters #155

mjcbello opened this issue Oct 2, 2020 · 4 comments

Comments

@mjcbello
Copy link
Contributor

mjcbello commented Oct 2, 2020

Hi @vsoch ,

I've been working with @wetzelj on our internal deid pipeline project. It has been really interesting working with all things DICOM and pydicom/deid. Thank you for your contributions!

During my testing, I noticed that calling detect on the DicomCleaner results in a bot.exit() if the current recipe file does not contain any filter sections. Is this the intended behavior of the application? Any objections to returning flagged=False instead of sys.exit?

detect.py lines 124-127:

    # Load criteria (actions) for flagging
    filters = deid.get_filters()
    if not filters:
        bot.exit("Deid provided does not have %filter, exiting.")
@vsoch
Copy link
Member

vsoch commented Oct 2, 2020

Definitely not! It would be good to, in addition to adding the return, print a clear message for the user (debug or info, up to you!)

@mjcbello
Copy link
Contributor Author

mjcbello commented Oct 2, 2020

Sounds good! I have a fix ready. Would you like me to submit a pull request against the currently opened pull request #154 or a new pull request against master?

@vsoch
Copy link
Member

vsoch commented Oct 2, 2020

It would be easier to package it in the same version as #154 - and if you have bandwidth and are able, a review of the PR would be helpful! Sometimes users open issues and then there is a fix but they never come back to review, even if things are ready to go. So your review would be greatly appreciated!

@vsoch
Copy link
Member

vsoch commented Oct 2, 2020

And wow, I'm honored you opened your first issue here! Open source is a lot of fun, welcome to GitHub!

image

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

No branches or pull requests

2 participants