-
Notifications
You must be signed in to change notification settings - Fork 35
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
Added check before dropping well column #241
Conversation
Thanks for your contribution @kenibrewer - can you add a small test that would have failed the previous functionality that this contribution now fixes? |
Actually, maybe the simpler solution would be to drop the expression But, then we run into the issue when What do you think? |
Codecov Report
@@ Coverage Diff @@
## master #241 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 53 53
Lines 2794 2796 +2
=======================================
+ Hits 2676 2678 +2
Misses 118 118
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@gwaybio I added an example to the related issue page that illustrates the problem. I also added a test_case to test_annotate.py that crashes with the old code and works with the new code. In the process, I also discovered that a failure to work on fresh dataframe copies in individual tests was causing operations in one test to affect the others. So I fixed that too.
I think there is value to eliminating redundant information by having dropping the platemap version of the well column name. So I think we should still drop the column when appropriate. However, even if we drop the expression Addressing the auto_suffix problem separately, I actually do really like the idea of adding the |
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.
A couple discussion questions and required changes prior to review. Thanks again for your contribution!
@kenibrewer - please correct me if I'm wrong, but I think we're waiting on your reply to this comment prior to moving forward with merging this PR. Thanks again! |
Hi @gwaybio, |
…xisting dataframes
…es shouldn't be modified
Revisiting your suggestion about adding suffixes, I think it would be good to add The one problem with this change, however, is that it would likely break pipelines/code (including a few of my own projects), that already include logic around renaming/handling the "_x" and "_y" columns that are generated by the current codebase. I still think the change is worthwhile, but I'm not sure how you handle potentially breaking changes. |
Thanks @kenibrewer - thanks for following up and I'm excited you're able to work on this PR again. I'll respond to a couple of your thoughts and then provide a code review.
Fantastic - thanks! Once you create a new issue, please link this PR
Sounds good. My sense is that this change belongs in a separate PR. Let's focus on dropping the well column (and fixing any immediate bugs that arise from this closer investigation) here, and save this potentially breaking change for a subsequent PR.
We haven't had a hard and fast policy, but we typically mint a new release version which will kickoff a new pypi and conda build. If you're using a specific pycytominer version (or github hash) in your previous pipelines, then this should have no impact on past work other than needing to modify code for future projects if new pycytominer versions are good enough to warrant a version upgrade. |
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.
Looks good! I'll kick off tests now. Please review my minor suggestions and then, once the tests pass, I'll check in with you and merge.
Thanks again for your contribution!
Looks like the tests will pass - are we set to merge this in @kenibrewer ? |
@gwaybio Yep. Ready for merge. 🚀 |
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.
🚀
Thanks again @kenibrewer When you get a chance, please create new issues in https://github.com/cytomining/pycytominer/issues. I believe they involved 1) |
Description
Simple bugfix for #240 where a missing check for identical column names results in an inappropriately dropped column.
What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.