-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
WIP 197 remove + keep combo should keep #198
Conversation
…ere remove overrules keep, and also explicitly show that except is using value as substring/regex match
…s marked with KEEP to skiplist", also fixed docstring on parser#perform_action and removed unused parameter, fixed typo in random place
This looks fantastic! It looks like you should run black to fix the formatting issues (black==21.12b0) and then don't forget to increment the version in version.py and add a note to the CHANGELOG. Do we have except: documented well enough along with the updated use of KEEP? |
No, as I mentioned documentation update it still coming, I'd like to agree on logic change per se. This is reflected in checklist in PR header :) I looked into failing check, but don't see exact problems there, just that file needs reformatting, so will setup |
okay no worries! And yes you can pip install black (I showed the version used in the CI in the comment above) and then run black deid and it should format. Sorry for the extra trouble - black is a bit fussy sometimes, but it's easier to instill a common format for the code. |
…rty, updated docs on action order, added two tests for ensuring blank action order
…or, clarified docs upon field that should not be None
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.
Beautiful! Aside from the one small typo in the docs that I added a suggestion for, this should be good to go. The last bit before merge is to:
- bump the version in deid/version.py
- update the CHANGELOG.md with a note for this version
I haven't bump version in my last PR, and this PR goes to 0.2.29-RC. So version could be bumped to that one, yeah, just wonder why it is not done yet :) |
oops sorry just forgot about that (it's late and I'm tired!) it looks good to go! |
Done and done! https://pypi.org/project/deid/0.2.28/ Thank you @glebsts ! |
Um.. Is 0.2 28 now rebuilt? I'm confused, what's in public repo, real 0.2.28 or 0.2.29rc1? |
Yeah sorry for being confusing! We merged 0.0.28 into master but didn't release on pypi because I was waiting for this fix under that version. So the current version in the repo is 0.0.28. |
ah crap this was merged into your other PR! I totally missed that. Yes we are going to need to do another release. |
So it's up to you how you want to proceed. If you want to do other changes to that branch then go ahead. If you are ready for that branch to PR to master here, then go ahead. I was planning on waiting to release 0.0.28 until we had these changes, but now that will be 0.0.29. Sorry for the confusing-ness, our conversation has happened slowly over time and honestly I just forgot about the plan because I maintain a lot of projects. |
No worries! Thank you :) |
Ok, so I’ll do a PR with this branch so we can get it into the mainline, probably later tomorrow. Thank you and merry Christmas! 🎁🎄 |
* #193 'bump pydicom' - bumped pydicom to 2.2.2, local tests green, changelog update, added PyCharm to gitignore * WIP 197 remove + keep combo should keep (#198) * #197 'remove and keep combo' - added tests that describe situation where remove overrules keep, and also explicitly show that except is using value as substring/regex match * #197 'remove and keep combo' - added quite straightforward "add fields marked with KEEP to skiplist", also fixed docstring on parser#perform_action and removed unused parameter, fixed typo in random place * #197 'remove and keep combo' - quotes changed as per code format convention * #197 'remove and keep combo' - changed keep list to be separate property, updated docs on action order, added two tests for ensuring blank action order * #197 'remove and keep combo' - changed keep fields collector to be more pythonic * #197 'remove and keep combo' - more safeguards in keep fields collector, clarified docs upon field that should not be None * #197 'remove and keep combo' - changelog update, typo fix, version bump * #197 'remove and replace/jitter combo' - added once-evaluated list of fields being jittered or replaced to prevent them from being removed, tests, extended description of @keep property, changelog update, typo fix, version bump * #197 'remove and replace/jitter combo' - run black * Update deid/version.py - agreed to bump to 0.3 * Bug with return of derive_ctp_coordinate Downstream code expects coordinate definitions to be a comma separated list of values, not a list of ints. * Update deid/dicom/parser.py Committing suggestion. * change derive_ctp_coordinates to private function Co-authored-by: Gleb <[email protected]> Co-authored-by: Vanessasaurus <[email protected]>
* add support for translating ctp coordinates * version bump * pin numpy and python 3.7, bump minor version * Add/remove keep behavior (Previous PR #199 - 0.2.29 rc) (#237) * #193 'bump pydicom' - bumped pydicom to 2.2.2, local tests green, changelog update, added PyCharm to gitignore * WIP 197 remove + keep combo should keep (#198) * #197 'remove and keep combo' - added tests that describe situation where remove overrules keep, and also explicitly show that except is using value as substring/regex match * #197 'remove and keep combo' - added quite straightforward "add fields marked with KEEP to skiplist", also fixed docstring on parser#perform_action and removed unused parameter, fixed typo in random place * #197 'remove and keep combo' - quotes changed as per code format convention * #197 'remove and keep combo' - changed keep list to be separate property, updated docs on action order, added two tests for ensuring blank action order * #197 'remove and keep combo' - changed keep fields collector to be more pythonic * #197 'remove and keep combo' - more safeguards in keep fields collector, clarified docs upon field that should not be None * #197 'remove and keep combo' - changelog update, typo fix, version bump * #197 'remove and replace/jitter combo' - added once-evaluated list of fields being jittered or replaced to prevent them from being removed, tests, extended description of @keep property, changelog update, typo fix, version bump * #197 'remove and replace/jitter combo' - run black * Update deid/version.py - agreed to bump to 0.3 * Bug with return of derive_ctp_coordinate Downstream code expects coordinate definitions to be a comma separated list of values, not a list of ints. * Update deid/dicom/parser.py Committing suggestion. * change derive_ctp_coordinates to private function Signed-off-by: vsoch <[email protected]> Co-authored-by: Gleb <[email protected]> Co-authored-by: Vanessasaurus <[email protected]> Signed-off-by: vsoch <[email protected]> Co-authored-by: wetzelj <[email protected]>
Description
KEEP someField
ignoresREMOVE someField
by adding it to skip list.ADD someField
overridesKEEP someField
as discussed under the issue.Added tests. Also added test illustrating that
except
is working as regex match (documentation to be updated)Related issue: #197
Checklist