-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
[enh] add an add_plane
convenience method to ClippingPlaneList
#6921
Conversation
add_plane
convenience method to ClippingPlaneList
I'm not sure how |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6921 +/- ##
==========================================
- Coverage 92.96% 92.86% -0.10%
==========================================
Files 618 618
Lines 56525 56539 +14
==========================================
- Hits 52547 52505 -42
- Misses 3978 4034 +56 ☔ View full report in Codecov by Sentry. |
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.
Seems pretty straight forward to me, and it's clearly marked experimental so we don't need to stress about getting the API right. No clue about typing :/
I think if I dropped the |
yup, better untyped than ignored! |
Boo, dropping the None didn't work: |
@psobolewskiPhD if you can figure out typing I think this could (still!) go into 0.5.0! Maybe @Czaki has some some advice... |
@psobolewskiPhD the other thing I would do here is maybe add/update a gallery example. |
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
typing is still unhappy @Czaki 😢 |
@jni fixed |
Amazing. 😂 |
Thanks @Czaki ❤️ |
References and relevant issues
There is some discussion about this here
https://napari.zulipchat.com/#narrow/stream/212875-general/topic/clipping.20planes.20and.20slicing.20planes
Description
Prior to this PR, if a user wanted to use the experimental clipping planes feature, they had to do the following in the console or script:
In this PR, I add a convenience method to
ClippingPlaneList
calledadd_plane
that will create a ClippingPlane with args/kwargs and then append it to the list, this way it's easier for users to get at this great feature! I also add a test for the new method.