diff --git a/geos-posp/src/PVplugins/PVAttributeMapping.py b/geos-posp/src/PVplugins/PVAttributeMapping.py index d8234423..f1901de1 100644 --- a/geos-posp/src/PVplugins/PVAttributeMapping.py +++ b/geos-posp/src/PVplugins/PVAttributeMapping.py @@ -12,6 +12,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVCreateConstantAttributePerRegion.py b/geos-posp/src/PVplugins/PVCreateConstantAttributePerRegion.py index bb8fbbdf..ff8f5520 100644 --- a/geos-posp/src/PVplugins/PVCreateConstantAttributePerRegion.py +++ b/geos-posp/src/PVplugins/PVCreateConstantAttributePerRegion.py @@ -15,6 +15,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + import vtkmodules.util.numpy_support as vnp from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, diff --git a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolume.py b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolume.py index 5423bbe9..8b5ac542 100644 --- a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolume.py +++ b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolume.py @@ -16,6 +16,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurface.py b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurface.py index 62d35ea4..77f9d005 100644 --- a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurface.py +++ b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurface.py @@ -16,6 +16,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurfaceWell.py b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurfaceWell.py index 4ab7010a..20fce2f1 100644 --- a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurfaceWell.py +++ b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeSurfaceWell.py @@ -16,6 +16,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeWell.py b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeWell.py index 2c1c5652..cc6860f8 100644 --- a/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeWell.py +++ b/geos-posp/src/PVplugins/PVExtractMergeBlocksVolumeWell.py @@ -23,6 +23,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from geos_posp.filters.GeosBlockExtractor import GeosBlockExtractor from geos_posp.filters.GeosBlockMerge import GeosBlockMerge from geos_posp.processing.vtkUtils import ( diff --git a/geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py b/geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py index 25b6f9d5..c6e90add 100644 --- a/geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py +++ b/geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py @@ -23,6 +23,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from geos.utils.Logger import Logger, getLogger from geos.utils.PhysicalConstants import ( DEFAULT_FRICTION_ANGLE_DEG, diff --git a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolume.py b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolume.py index 92c0142a..6cb49c94 100644 --- a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolume.py +++ b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolume.py @@ -17,6 +17,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurface.py b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurface.py index d498d767..a5451efb 100644 --- a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurface.py +++ b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurface.py @@ -17,6 +17,7 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, diff --git a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurfaceWell.py b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurfaceWell.py index bbfdd053..a5f798b2 100644 --- a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurfaceWell.py +++ b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeSurfaceWell.py @@ -17,6 +17,7 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, diff --git a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeWell.py b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeWell.py index f2c01541..29ac5e48 100644 --- a/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeWell.py +++ b/geos-posp/src/PVplugins/PVGeomechanicsWorkflowVolumeWell.py @@ -17,6 +17,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVGeosLogReader.py b/geos-posp/src/PVplugins/PVGeosLogReader.py index a5dd35dd..7a5b65d2 100644 --- a/geos-posp/src/PVplugins/PVGeosLogReader.py +++ b/geos-posp/src/PVplugins/PVGeosLogReader.py @@ -17,6 +17,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + import vtkmodules.util.numpy_support as vnp from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, diff --git a/geos-posp/src/PVplugins/PVMergeBlocksEnhanced.py b/geos-posp/src/PVplugins/PVMergeBlocksEnhanced.py index 4b8a7c86..7c7c155d 100644 --- a/geos-posp/src/PVplugins/PVMergeBlocksEnhanced.py +++ b/geos-posp/src/PVplugins/PVMergeBlocksEnhanced.py @@ -12,6 +12,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVMohrCirclePlot.py b/geos-posp/src/PVplugins/PVMohrCirclePlot.py index 583777c9..c464e951 100644 --- a/geos-posp/src/PVplugins/PVMohrCirclePlot.py +++ b/geos-posp/src/PVplugins/PVMohrCirclePlot.py @@ -32,6 +32,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + import geos_posp.visu.mohrCircles.functionsMohrCircle as mcf import geos_posp.visu.PVUtils.paraviewTreatments as pvt from geos_posp.processing.MohrCircle import MohrCircle diff --git a/geos-posp/src/PVplugins/PVPythonViewConfigurator.py b/geos-posp/src/PVplugins/PVPythonViewConfigurator.py index 9d63e707..e8c850ce 100644 --- a/geos-posp/src/PVplugins/PVPythonViewConfigurator.py +++ b/geos-posp/src/PVplugins/PVPythonViewConfigurator.py @@ -14,6 +14,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.simple import ( # type: ignore[import-not-found] GetActiveSource, GetActiveView, diff --git a/geos-posp/src/PVplugins/PVSurfaceGeomechanics.py b/geos-posp/src/PVplugins/PVSurfaceGeomechanics.py index 2ff1b4f5..cc91a209 100644 --- a/geos-posp/src/PVplugins/PVSurfaceGeomechanics.py +++ b/geos-posp/src/PVplugins/PVSurfaceGeomechanics.py @@ -13,6 +13,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found] VTKPythonAlgorithmBase, smdomain, diff --git a/geos-posp/src/PVplugins/PVTransferAttributesVolumeSurface.py b/geos-posp/src/PVplugins/PVTransferAttributesVolumeSurface.py index 2bc6e1ca..26af9867 100644 --- a/geos-posp/src/PVplugins/PVTransferAttributesVolumeSurface.py +++ b/geos-posp/src/PVplugins/PVTransferAttributesVolumeSurface.py @@ -12,6 +12,8 @@ if parent_dir_path not in sys.path: sys.path.append(parent_dir_path) +import PVplugins #required to update sys path + from paraview.simple import ( # type: ignore[import-not-found] FindSource, GetActiveSource, diff --git a/geos-posp/src/PVplugins/__init__.py b/geos-posp/src/PVplugins/__init__.py index e69de29b..1fface1c 100644 --- a/geos-posp/src/PVplugins/__init__.py +++ b/geos-posp/src/PVplugins/__init__.py @@ -0,0 +1,14 @@ +import os +import sys + + +# Add other packages path to sys path +dir_path = os.path.dirname(os.path.realpath(__file__)) +python_root = '../../..' + +python_modules = ( 'geos-posp', 'geos-utils', 'geos-geomechanics' ) + +for m in python_modules: + m_path = os.path.abspath( os.path.join( dir_path, python_root, m, 'src' ) ) + if m_path not in sys.path: + sys.path.insert( 0, m_path)