-
Notifications
You must be signed in to change notification settings - Fork 591
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
31b5730
Revert VTK_DEFAULT_OPENGL_WINDOW from tox to github CI env
beroda f7c8862
Use local tox plugin to set the VTK_DEFAULT_OPENGL_WINDOW dynamically…
beroda 1a0e117
Add back report
beroda a834b43
Remove verbose
beroda d79dc41
Set VTK_DEFAULT_OPENGL_WINDOW for doctest-modules
beroda 5df2d63
Merge branch 'main' into maint/tox-doc-default-opengl-window
beroda 9e7a7a1
Use self hosted with gpu for doctests
beroda 474c93a
Merge branch 'main' into maint/tox-doc-default-opengl-window
user27182 40874eb
Fix docstring
beroda 0d7788e
Small fix
beroda 0afc09b
Revert "Small fix"
beroda 511f68a
Revert "Fix docstring"
beroda 39321fe
Fix docstrings
beroda 73d55c8
Continue doctest on failure
beroda b62c8c3
Fix remaining docstrings
beroda eafb63a
Skip some doctests
beroda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,7 +216,7 @@ setenv = | |
PYVISTA_OFF_SCREEN = true | ||
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} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found convenient to use |
||
local: python tests/check_doctest_names.py | ||
|
||
# ================= DOCUMENTATION ENVIRONMENTS ================= | ||
|
@@ -234,7 +234,7 @@ setenv = | |
PYVISTA_OFF_SCREEN = true | ||
ALLOW_PLOTTING = true | ||
SHELLOPTS = errexit:pipefail | ||
VTK_DEFAULT_OPENGL_WINDOW = vtkEGLRenderWindow | ||
PYTEST_ADDOPTS = --color=yes | ||
|
||
# SPHINX OPTIONS | ||
_SPHINX_JOBS = {env:PARALLEL:} | ||
|
@@ -244,8 +244,9 @@ setenv = | |
|
||
change_dir = doc | ||
commands_pre = | ||
{[testenv]software_report_cmdline} | ||
build: python -c "import subprocess, os;subprocess.run([r'{envpython}','make_tables.py'], cwd='{env:_SPHINX_SOURCE_DIR}', check=True)" | ||
build: python -c "import subprocess, os;subprocess.run([r'{envpython}','make_external_gallery.py'], cwd='{env:_SPHINX_SOURCE_DIR}', check=True)" | ||
commands = | ||
build: python -m sphinx -M {posargs:html} {env:_SPHINX_SOURCE_DIR} {env:_SPHINX_BUILD_DIR} {env:_SPHINX_DEFAULTS} {env:_SPHINX_JOBS} | ||
test: pytest --color=yes -v {tox_root}{/}tests{/}doc{/}tst_doc_build.py | ||
test: pytest {tox_root}{/}tests{/}doc{/}tst_doc_build.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import annotations # noqa: D100 | ||
|
||
import os | ||
from typing import TYPE_CHECKING | ||
|
||
from tox.plugin import impl | ||
|
||
if TYPE_CHECKING: | ||
from tox.config.sets import EnvConfigSet | ||
from tox.session.state import State | ||
|
||
|
||
@impl | ||
def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: ARG001, D103 | ||
if env_conf.env_name not in ['docs-build', 'doctest-modules']: | ||
return | ||
|
||
if os.environ.get('CI', 'false').lower() == 'true': | ||
env_conf['set_env'].update({'VTK_DEFAULT_OPENGL_WINDOW': 'vtkEGLRenderWindow'}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Ran into rounding errors with this. The workaround was to round, but was quite verbose. Alternative would be converting to
np.float64