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

Fix find_closest_cell examples doctest #1809

Merged

Conversation

MatthewFlamm
Copy link
Contributor

Overview

Closes #1800. This PR fixes the doctest here by removing the block of code that relies on random points to converge to some value. It instead reworks the first block to verify that the cell chosen is indeed the closest cell to the chosen point.

The supplied point was changed as the point [0, 0, 0.5] is equidistant to many cells to within 8-9 digits of precision. See #1800 (comment)

@MatthewFlamm
Copy link
Contributor Author

Ooops messed up my branch, I will need to rebase and force push I think.

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #1809 (7e70d25) into main (828fa34) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1809   +/-   ##
=======================================
  Coverage   92.61%   92.61%           
=======================================
  Files          71       71           
  Lines       14029    14029           
=======================================
  Hits        12993    12993           
  Misses       1036     1036           

pyvista/core/dataset.py Outdated Show resolved Hide resolved
Copy link
Member

@adeak adeak left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

CI doc building segfaulted... has to be unrelated, but not great news. I'll try rerunning it.

@MatthewFlamm MatthewFlamm merged commit 82a3135 into pyvista:main Nov 18, 2021
@MatthewFlamm MatthewFlamm deleted the fix-cell-center-example-doctest branch November 18, 2021 18:52
@tkoyama010 tkoyama010 added the documentation Anything related to the documentation/website label Nov 20, 2021
@akaszynski akaszynski mentioned this pull request Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the documentation/website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doctest for find_closest_cell is flaky
3 participants