Skip to content

Commit 82b4a0d

Browse files
Add module path to sys path (#68)
1 parent 9a54df1 commit 82b4a0d

18 files changed

+46
-0
lines changed

geos-posp/src/PVplugins/PVAttributeMapping.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
if parent_dir_path not in sys.path:
1313
sys.path.append(parent_dir_path)
1414

15+
import PVplugins #required to update sys path
16+
1517
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
1618
VTKPythonAlgorithmBase,
1719
smdomain,

geos-posp/src/PVplugins/PVCreateConstantAttributePerRegion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
if parent_dir_path not in sys.path:
1616
sys.path.append(parent_dir_path)
1717

18+
import PVplugins #required to update sys path
19+
1820
import vtkmodules.util.numpy_support as vnp
1921
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2022
VTKPythonAlgorithmBase,

geos-posp/src/PVplugins/PVExtractMergeBlocksVolume.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
if parent_dir_path not in sys.path:
1717
sys.path.append(parent_dir_path)
1818

19+
import PVplugins #required to update sys path
20+
1921
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2022
VTKPythonAlgorithmBase,
2123
smdomain,

geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
if parent_dir_path not in sys.path:
1717
sys.path.append(parent_dir_path)
1818

19+
import PVplugins #required to update sys path
20+
1921
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2022
VTKPythonAlgorithmBase,
2123
smdomain,

geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurfaceWell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
if parent_dir_path not in sys.path:
1717
sys.path.append(parent_dir_path)
1818

19+
import PVplugins #required to update sys path
20+
1921
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2022
VTKPythonAlgorithmBase,
2123
smdomain,

geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeWell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
if parent_dir_path not in sys.path:
2424
sys.path.append(parent_dir_path)
2525

26+
import PVplugins #required to update sys path
27+
2628
from geos_posp.filters.GeosBlockExtractor import GeosBlockExtractor
2729
from geos_posp.filters.GeosBlockMerge import GeosBlockMerge
2830
from geos_posp.processing.vtkUtils import (

geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
if parent_dir_path not in sys.path:
2424
sys.path.append(parent_dir_path)
2525

26+
import PVplugins #required to update sys path
27+
2628
from geos.utils.Logger import Logger, getLogger
2729
from geos.utils.PhysicalConstants import (
2830
DEFAULT_FRICTION_ANGLE_DEG,

geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolume.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
if parent_dir_path not in sys.path:
1818
sys.path.append(parent_dir_path)
1919

20+
import PVplugins #required to update sys path
21+
2022
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2123
VTKPythonAlgorithmBase,
2224
smdomain,

geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
if parent_dir_path not in sys.path:
1818
sys.path.append(parent_dir_path)
1919

20+
import PVplugins #required to update sys path
2021

2122
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2223
VTKPythonAlgorithmBase,

geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurfaceWell.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
if parent_dir_path not in sys.path:
1818
sys.path.append(parent_dir_path)
1919

20+
import PVplugins #required to update sys path
2021

2122
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2223
VTKPythonAlgorithmBase,

geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeWell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
if parent_dir_path not in sys.path:
1818
sys.path.append(parent_dir_path)
1919

20+
import PVplugins #required to update sys path
21+
2022
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2123
VTKPythonAlgorithmBase,
2224
smdomain,

geos-posp/src/PVplugins/PVGeosLogReader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
if parent_dir_path not in sys.path:
1818
sys.path.append(parent_dir_path)
1919

20+
import PVplugins #required to update sys path
21+
2022
import vtkmodules.util.numpy_support as vnp
2123
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
2224
VTKPythonAlgorithmBase,

geos-posp/src/PVplugins/PVMergeBlocksEnhanced.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
if parent_dir_path not in sys.path:
1313
sys.path.append(parent_dir_path)
1414

15+
import PVplugins #required to update sys path
16+
1517
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
1618
VTKPythonAlgorithmBase,
1719
smdomain,

geos-posp/src/PVplugins/PVMohrCirclePlot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
if parent_dir_path not in sys.path:
3333
sys.path.append(parent_dir_path)
3434

35+
import PVplugins #required to update sys path
36+
3537
import geos_posp.visu.mohrCircles.functionsMohrCircle as mcf
3638
import geos_posp.visu.PVUtils.paraviewTreatments as pvt
3739
from geos_posp.processing.MohrCircle import MohrCircle

geos-posp/src/PVplugins/PVPythonViewConfigurator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
if parent_dir_path not in sys.path:
1515
sys.path.append(parent_dir_path)
1616

17+
import PVplugins #required to update sys path
18+
1719
from paraview.simple import ( # type: ignore[import-not-found]
1820
GetActiveSource,
1921
GetActiveView,

geos-posp/src/PVplugins/PVSurfaceGeomechanics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
if parent_dir_path not in sys.path:
1414
sys.path.append(parent_dir_path)
1515

16+
import PVplugins #required to update sys path
17+
1618
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
1719
VTKPythonAlgorithmBase,
1820
smdomain,

geos-posp/src/PVplugins/PVTransferAttributesVolumeSurface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
if parent_dir_path not in sys.path:
1313
sys.path.append(parent_dir_path)
1414

15+
import PVplugins #required to update sys path
16+
1517
from paraview.simple import ( # type: ignore[import-not-found]
1618
FindSource,
1719
GetActiveSource,

geos-posp/src/PVplugins/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import os
2+
import sys
3+
4+
5+
# Add other packages path to sys path
6+
dir_path = os.path.dirname(os.path.realpath(__file__))
7+
python_root = '../../..'
8+
9+
python_modules = ( 'geos-posp', 'geos-utils', 'geos-geomechanics' )
10+
11+
for m in python_modules:
12+
m_path = os.path.abspath( os.path.join( dir_path, python_root, m, 'src' ) )
13+
if m_path not in sys.path:
14+
sys.path.insert( 0, m_path)

0 commit comments

Comments
 (0)