Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

beroda
Copy link
Collaborator

@beroda beroda commented Sep 10, 2025

Overview

VTK_DEFAULT_OPENGL_WINDOW env variable is set on the tox config. It prevents users from changing its value outside of tox.
This PR fixes that by setting the env variable specifically when the CI env variable is true.

Moreover, VTK_DEFAULT_OPENGL_WINDOW is also explicitely specified for doctest-modules job.

@beroda beroda requested a review from a team as a code owner September 10, 2025 15:39
@pyvista-bot pyvista-bot added the maintenance Low-impact maintenance activity label Sep 10, 2025
@beroda beroda self-assigned this Sep 10, 2025
akaszynski
akaszynski previously approved these changes Sep 10, 2025
@pyvista-bot
Copy link
Contributor

pyvista-bot commented Sep 10, 2025

@pyvista-bot pyvista-bot temporarily deployed to pull request September 10, 2025 16:09 Inactive
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 96.40%. Comparing base (c556a05) to head (eafb63a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7945   +/-   ##
=======================================
  Coverage   96.40%   96.40%           
=======================================
  Files         150      150           
  Lines       32682    32682           
  Branches     4118     4118           
=======================================
  Hits        31508    31508           
  Misses        570      570           
  Partials      604      604           

@pyvista-bot pyvista-bot temporarily deployed to pull request September 10, 2025 21:08 Inactive
@beroda beroda changed the title Revert VTK_DEFAULT_OPENGL_WINDOW from tox to github CI env Set VTK_DEFAULT_OPENGL_WINDOW for specific tox jobs Sep 11, 2025
@pyvista-bot pyvista-bot temporarily deployed to pull request September 11, 2025 21:48 Inactive
@beroda
Copy link
Collaborator Author

beroda commented Sep 12, 2025

Per #7945 (comment), waiting for #7948 to be closed before continuing this PR.

@beroda beroda marked this pull request as draft September 12, 2025 07:11
@pyvista-bot pyvista-bot temporarily deployed to pull request September 12, 2025 10:56 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request September 13, 2025 18:50 Inactive
@beroda
Copy link
Collaborator Author

beroda commented Sep 15, 2025

Let's continue the thread here

Just need to determine whether we want this render window set just for these two jobs or if we want this for all CI jobs, including unit tests.

@akaszynski what's your feeling about it ? I'm +1 with the idea of specifying the value of VTK_DEFAULT_OPENGL_WINDOW in CI only for all jobs that run plotting tests for consistency.

@user27182
Copy link
Contributor

I think there was a previous PR where @akaszynski also had issues with these docstrings. We could probably just skip the doctest for these, clean up the output and not use numpy printoptions. These functions have plenty of test coverage for numerical error / sign differences in the unit tests and don't need the coverage from the docstrings.

This reverts commit 0d7788e.
@pyvista-bot pyvista-bot temporarily deployed to pull request September 16, 2025 09:08 Inactive
PYTEST_ADDOPTS = --color=yes -v {env:PARALLEL:}
commands =
modules: pytest --doctest-modules {env_site_packages_dir}{/}pyvista {posargs}
modules: pytest --doctest-modules --doctest-continue-on-failure {env_site_packages_dir}{/}pyvista {posargs}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Found convenient to use --doctest-continue-on-failure since it enables to see all docstring issues and not only the first one.

@beroda beroda marked this pull request as ready for review September 16, 2025 09:23
Comment on lines +336 to +337
>>> normal # doctest:+SKIP
pyvista_ndarray([0.0, 0.0, 1.0], dtype=float32)
Copy link
Member

Choose a reason for hiding this comment

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

Ran into rounding errors with this. The workaround was to round, but was quite verbose. Alternative would be converting to np.float64

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.

Good to go. Looks like self-hosted worked fine for this as well; thanks for moving it over.

@akaszynski
Copy link
Member

@akaszynski what's your feeling about it ? I'm +1 with the idea of specifying the value of VTK_DEFAULT_OPENGL_WINDOW in CI only for all jobs that run plotting tests for consistency.

The render window only needs to be set for plotting tests, though it shouldn't matter outside of the plotting jobs.

@beroda
Copy link
Collaborator Author

beroda commented Sep 16, 2025

@akaszynski what's your feeling about it ? I'm +1 with the idea of specifying the value of VTK_DEFAULT_OPENGL_WINDOW in CI only for all jobs that run plotting tests for consistency.

The render window only needs to be set for plotting tests, though it shouldn't matter outside of the plotting jobs.

Let's open a new PR to explicitly set VTK_DEFAULT_OPENGL_WINDOW for all tests.

@user27182 user27182 merged commit b487bf3 into main Sep 17, 2025
36 checks passed
@user27182 user27182 deleted the maint/tox-doc-default-opengl-window branch September 17, 2025 12:51
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.

4 participants