Skip to content
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

Merged
merged 7 commits into from
Mar 19, 2022

Conversation

adeak
Copy link
Member

@adeak adeak commented Mar 19, 2022

Overview

As per the discussion in #2339 we should change back the value of the capping kwarg to True 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 new False 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.

@github-actions github-actions bot added the maintenance Low-impact maintenance activity label Mar 19, 2022
@codecov
Copy link

codecov bot commented Mar 19, 2022

Codecov Report

Merging #2364 (67d0c18) into main (611e93e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            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     

Copy link
Member

@tkoyama010 tkoyama010 left a 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.

@adeak
Copy link
Member Author

adeak commented Mar 19, 2022

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. True)?

@tkoyama010
Copy link
Member

That the default is what we think it is (i.e. True)?

@adeak Yes, it is.

@adeak
Copy link
Member Author

adeak commented Mar 19, 2022

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 True default once and for all.

We should definitely check though that the current VTK default is True. But I did that, and you did too in #2339 :) What do you think?

Copy link
Member

@akaszynski akaszynski left a 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.

@adeak
Copy link
Member Author

adeak commented Mar 19, 2022

I would like to see coverage of the warning, but I’m not going to block this PR.

Done.

Copy link
Member

@tkoyama010 tkoyama010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@akaszynski akaszynski enabled auto-merge (squash) March 19, 2022 11:48
@adeak adeak disabled auto-merge March 19, 2022 11:54
@adeak
Copy link
Member Author

adeak commented Mar 19, 2022

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.

@adeak
Copy link
Member Author

adeak commented Mar 19, 2022

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.

@akaszynski
Copy link
Member

Thanks for your work @adeak.

@akaszynski akaszynski merged commit 8b3dad3 into pyvista:main Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants