-
Notifications
You must be signed in to change notification settings - Fork 441
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
Create PyvistaFutureWarning, use it to warn about extrude capping changes #2364
Create PyvistaFutureWarning, use it to warn about extrude capping changes #2364
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2364 +/- ##
==========================================
- Coverage 93.53% 93.51% -0.02%
==========================================
Files 74 74
Lines 15723 15747 +24
==========================================
+ Hits 14706 14726 +20
- Misses 1017 1021 +4 |
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.
IMHO: It will be good to add tests of default arg using GetCapping()
in vtk object.
Thanks @tkoyama010. What would we test with that? That the default is what we think it is (i.e. |
@adeak Yes, it is. |
I see, thanks. I'm not sure we want to do that: probably everywhere in PyVista we have assumptions about the underlying VTK filters. Even if we expect that VTK changes this default in the future, I would argue that PyVista users should not be affected by this. We can hide VTK's changes and stick to the new We should definitely check though that the current VTK default is |
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.
Agree with a future deprication, probably one or two minor releases.
I would like to see coverage of the warning, but I’m not going to block this PR.
Done. |
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.
LGTM. Thanks!
Sorry, I've disabled auto-merge because I haven't looked at the built docs yet. I'll post a comment when I'm done with that. |
I missed two places where warnings would've been raised by doctest examples, these are now fixed. This is ready for auto-merge, thank you. |
Thanks for your work @adeak. |
Overview
As per the discussion in #2339 we should change back the value of the
capping
kwarg toTrue
to match VTK. As a first approach I kept the original kwarg but added a future warning (with a new non-silenced warning class), because code written in the last 6 months might rely on the newFalse
default.We could also argue that the change in default behaviour was a bug and we could also fix it (i.e. just revert the default to
True
). Let me know if this would be preferred.I haven't built the docs locally, I'll check the CI artifact.