-
Notifications
You must be signed in to change notification settings - Fork 588
Set VTK_DEFAULT_OPENGL_WINDOW for specific tox jobs #7945
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
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/docs.yml
Outdated
@@ -15,6 +15,9 @@ concurrency: | |||
group: ${{ github.workflow }}-${{ github.ref }} | |||
cancel-in-progress: true | |||
|
|||
env: | |||
VTK_DEFAULT_OPENGL_WINDOW: "vtkEGLRenderWindow" |
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.
Is there a way to define "vtkEGLRenderWindow"
as a variable in tox for CI use only, such that it can be reused, e.g. for the docstring/doctest workflow? I.e. address this comment #7861 (comment)
Maybe define CI_VTK_DEFAULT_OPENGL_WINDOW = "vtkEGLRenderWindow"
as the variable in tox, and do something like:
VTK_DEFAULT_OPENGL_WINDOW: "vtkEGLRenderWindow" | |
VTK_DEFAULT_OPENGL_WINDOW: CI_VTK_DEFAULT_OPENGL_WINDOW |
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.
alternatively, define a pre-command that checks if the env var CI
is true, and if it is then export VTK_DEFAULT_OPENGL_WINDOW = "vtkEGLRenderWindow"
? This way we wouldn't need to define it as an env var inside the workflow itself, and would be self-contained inside the tox config.
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.
We can also address this separately with a future PR that adds tox to the docstring tests
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.
Is there a way to define
"vtkEGLRenderWindow"
as a variable in tox for CI use only, such that it can be reused, e.g. for the docstring/doctest workflow? I.e. address this comment #7861 (comment)
Don't think it's possible to set and env
variable in tox
depending on the value of another one (ie. CI)
alternatively, define a pre-command that checks if the env var
CI
is true, and if it is then exportVTK_DEFAULT_OPENGL_WINDOW = "vtkEGLRenderWindow"
? This way we wouldn't need to define it as an env var inside the workflow itself, and would be self-contained inside the tox config.
commands output cannot be captured in subsequent commands, so I don't think this is possible either.
Maybe through a dedicated homemade plugin ...
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.
@user27182 does f7c8862 is what you intended ?
If yes, do you prefer cherry-picking f7c8862 inside another dedicated PR ?
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.
And I went to verify it's working by checking the software report, but I guess there is none?? Or at least I couldn't find it. Maybe it was excluded with #7916 ?
Looks like we need to add that back in. We can open an issue or simply add it in this PR.
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.
And I went to verify it's working by checking the software report, but I guess there is none?? Or at least I couldn't find it. Maybe it was excluded with #7916 ?
Fixed in 1a0e117
I see, then I guess we should include
doctest-modules
in the list of cases where we want to setVTK_DEFAULT_OPENGL_WINDOW
? Is that correct, @akaszynski, we want these two workflows to use this consistently?I'd say so. It's better to be explicit IMO to try to set the render window, and it's a bit of future proofing to ensure that should we decide to use a GPU in one of our workflows.
Done in d79dc41
And as an additional unrelated note, is it an easy change to exclude
-v
from the documentation image tests? I find the extra 5000 lines in the log for all the test cases to be unnecessary for this. (-v
was not used for this prior to #7916)
Done in a834b43
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.
Thanks @beroda ! I was expecting the report to include "vtkEGLRenderWindow" as the render window, but instead it's just a generic "vtkRenderWindow".
https://github.com/pyvista/pyvista/actions/runs/17657586560/job/50184056166#step:7:40
This does not appear to be specific to this workflow, it seems the unit tests, type checking, docstring tests also do not appear to be reporting a concrete render window class.
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.
Thanks @beroda ! I was expecting the report to include "vtkEGLRenderWindow" as the render window, but instead it's just a generic "vtkRenderWindow". https://github.com/pyvista/pyvista/actions/runs/17657586560/job/50184056166#step:7:40
This does not appear to be specific to this workflow, it seems the unit tests, type checking, docstring tests also do not appear to be reporting a concrete render window class.
This is reported/tracked in #7948
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.
With the fix from #7949 , on Windows unit tests we have Render Window : vtkOSOpenGLRenderWindow
https://github.com/pyvista/pyvista/actions/runs/17685334349/job/50268816978?pr=7949#step:7:57
This differs from the default of EGL set for the docs. Perhaps we want to use the same render window for all CI jobs, not just docs/docstrings? Not sure if that will cause any generated images will differ and introduce regressions... but if not perhaps we should consider doing so for consistency?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7945 +/- ##
=======================================
Coverage 96.40% 96.40%
=======================================
Files 150 150
Lines 32675 32675
Branches 4114 4114
=======================================
Hits 31501 31501
Misses 570 570
Partials 604 604 |
… with CI variable
Per #7945 (comment), waiting for #7948 to be closed before continuing this PR. |
Overview
VTK_DEFAULT_OPENGL_WINDOW
env variable is set on thetox
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 fordoctest-modules
job.