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
Raise error in skeletonize for invalid value to method param #6805
Conversation
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.
Hi @rum1887, I've made a suggestion to comply with PEP8 formatting, and also tweak the wording a little.
Also, could you add a test for this? You can see an example of how to do this here:
scikit-image/skimage/morphology/tests/test_skeletonize.py
Lines 25 to 28 in d2f8e47
def test_skeletonize_wrong_dim2(self): | |
im = np.zeros((5, 5, 5)) | |
with pytest.raises(ValueError): | |
skeletonize(im, method='zhang') |
You should be able to copy those lines and adapt them to test this error message is raised.
PEP8 styleguide Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>
yes, on it! |
Hi @jni , I have added a unit test |
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.
This is ready imho! Thank you @rum1887! 😊
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.
Hey @rum1887, I noticed that another applicant was working on this in #6798 before you. I think they started on this in #6793 which was already closed when you created this one and than continued their work in #6798.
I am assuming that there was a misunderstanding and some confusion due to that? In the future, please take care to check if there is any previous work on this, especially by a fellow Outreachy applicant. And if there is, please feel welcome to work together and review each others contributions! There should be enough work for everyone.
@arsh73552, I'm sorry for the situation. It seems like this PR is much farther along.
@mkcor, @jni how should we handle this situation to be fair for each applicant? Considering that their solutions were quite similar, should we include @arsh73552 as a co-author so that both can record their contribution?
Ahh, I see.. It's ok I'll find other issues to work on. |
I'm sorry :( I realize now that I should have reviewed the previous work before working on the issue. The PR was closed, so I took up the issue! Will ask before taking up an issue henceforth and if there's previous work on the issue, will review it instead of creating a new pr. I don't mind if @arsh73552 PR is merged |
I like the idea of co-authorship, thank you for suggesting it @lagru — do you mind doing that in the merge commit message? I think you'll need to grab another commit from @arsh73552 to get the right All good @rum1887, and sorry everyone that I also missed the other PR. It's a busy time with all the Outreachy contributions! 😅 Thanks all! 🙏 |
Thanks, that sounds great to me! I've created a PR to help with the same. (#6823) |
Not really a fan of the logic in this function. At the very least I think we can make it a bit easier to reason about if we make the input guard for the "method" parameter its own independent if-clause.
Thanks everyone for being so understanding! 🙏 I don't think anyone wanted to step on anyone's toes and as @jni said, it's a bit busier than usual and it can be hard to keep track of something even during more quiet times. 😅 I'll merge once the CI is green and include @arsh73552 as a co-author. 🚀 |
Thanks everyone! @rum1887 and @arsh73552 you are both included in 4968b71 as authors. :) |
Fixes #6661
Description
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.example, to backport to v0.19.x after merging, add the following in a PR
comment:
@meeseeksdev backport to v0.19.x
run-benchmark
label. To rerun, the labelcan be removed and then added again. The benchmark output can be checked in
the "Actions" tab.