Skip to content

Commit

Permalink
vtk modules are added to extras_require as webviz_vtk is not yet a Py…
Browse files Browse the repository at this point in the history
…Pi package
  • Loading branch information
asnyv committed Nov 18, 2022
1 parent e4bbcd6 commit 0326746
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/subsurface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
pip install "pytest<7.2.0"
pip install "pytest-xdist<3.0"
pip install "xtgeo<2.20.2"
pip install .
pip install .[vtk]
# Testing against our latest release (including pre-releases)
pip install --pre --upgrade webviz-config webviz-core-components webviz-subsurface-components
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"types-pyyaml",
]

VTK_REQUIRE = [
"vtk>=9.2.2",
"webviz_vtk@git+https://github.com/equinor/webviz-vtk",
]
# pylint: disable=line-too-long
setup(
name="webviz-subsurface",
Expand Down Expand Up @@ -103,13 +107,11 @@
"scipy>=1.2",
"statsmodels>=0.12.1", # indirect dependency through https://plotly.com/python/linear-fits/
"xtgeo>=2.20.0",
"vtk>=9.2.2",
"webviz_vtk@git+https://github.com/equinor/webviz-vtk",
"webviz-config>=0.5",
"webviz-core-components>=0.6",
"webviz-subsurface-components>=0.4.14",
],
extras_require={"tests": TESTS_REQUIRE},
extras_require={"tests": TESTS_REQUIRE, "vtk": VTK_REQUIRE},
setup_requires=["setuptools_scm~=3.2"],
python_requires="~=3.8",
use_scm_version=True,
Expand Down
19 changes: 11 additions & 8 deletions webviz_subsurface/plugins/_grid_viewer_fmu/_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

from webviz_config import WebvizPluginABC, WebvizSettings

from webviz_subsurface._providers.ensemble_grid_provider import (
EnsembleGridProvider,
EnsembleGridProviderFactory,
GridVizService,
)

from ._layout_elements import ElementIds
from .views.view_3d._view_3d import View3D
try:
from webviz_subsurface._providers.ensemble_grid_provider import (
EnsembleGridProvider,
EnsembleGridProviderFactory,
GridVizService,
)

from ._layout_elements import ElementIds
from .views.view_3d._view_3d import View3D
except ImportError:
pass


class EXPERIMENTALGridViewerFMU(WebvizPluginABC):
Expand Down

0 comments on commit 0326746

Please sign in to comment.