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

Moving import of visualization library inside of function #181

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e1711d8
When using welleng.survey on a virtual linux machine additional insta…
senickel May 3, 2024
825aecc
make it installable
senickel May 3, 2024
0e1eec1
build file
senickel May 3, 2024
16523f4
Revert "build file"
senickel May 3, 2024
66b1022
Revert "make it installable"
senickel May 3, 2024
a152d13
do the same fix for another module
senickel May 6, 2024
787d6de
Merge pull request #1 from t60digital/senickel/move-visualization-imp…
senickel May 7, 2024
6ada596
wrap import vtk in try-except clause, in visual.py
nicolaphee May 7, 2024
3ee01a4
do not create Plotter class if vedo is is not installed
nicolaphee May 7, 2024
5584cc8
do not create CubeAxes class if vtk is is not installed
nicolaphee May 7, 2024
e6a15cf
create alternative CubeAxes class if vtk is is not installed
nicolaphee May 7, 2024
6976046
raise ImportError in init of alternative CubeAxes
nicolaphee May 7, 2024
00af920
raise random NameError
nicolaphee May 7, 2024
f56c17a
move random NameError
nicolaphee May 7, 2024
32f5a8d
move random NameError at the end of the script to verify for good tha…
nicolaphee May 7, 2024
3c26bf0
Revert "raise ImportError in init of alternative CubeAxes"
nicolaphee May 14, 2024
45497dc
add logging to plotly variable to install library
senickel May 27, 2024
d75da52
bump bugfix version
senickel May 27, 2024
64d16cb
import PLOTLY to return None otherwise
senickel May 27, 2024
6b99e6f
check for PLOTLY variable
senickel May 27, 2024
ca980fa
check for PLOTLY variable
senickel May 27, 2024
121d533
Merge branch 'senickel/move-visualization-import-inside-of-function' …
senickel May 27, 2024
ef8fc77
remove comment
senickel May 27, 2024
cf68829
raise import error for vtk or vedo
senickel May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion welleng/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from .utils import HLA_to_NEV, get_sigmas
from .survey import slice_survey, Survey
from .visual import figure


class WellMesh:
Expand Down Expand Up @@ -245,6 +244,7 @@ def _make_trimesh(self):
self.mesh = mesh

def figure(self, type='mesh3d', **kwargs):
from .visual import figure
fig = figure(self, type, **kwargs)
return fig

Expand Down
3 changes: 2 additions & 1 deletion welleng/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from .error import ErrorModel, ERROR_MODELS
from .node import Node
from .connector import Connector, interpolate_well
from .visual import figure
from .units import ureg

from typing import List, Union
Expand Down Expand Up @@ -965,6 +964,8 @@ def interpolate_survey(self, step=30, dls=1e-8):
return survey_interpolated

def figure(self, type='scatter3d', **kwargs):
from .visual import figure

fig = figure(self, type, **kwargs)
return fig

Expand Down
Loading