Skip to content

Commit 7982467

Browse files
refactor: Update ParaView plugins names and categories (#194)
1 parent 49c91f8 commit 7982467

23 files changed

+150
-139
lines changed

docs/geos_pv_docs/meshQuality.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Mesh Quality
55
PVCellTypeCounterEnhanced
66
----------------------------------
77

8-
.. automodule:: geos.pv.plugins.PVCellTypeCounterEnhanced
8+
.. automodule:: geos.pv.plugins.qc.PVCellTypeCounterEnhanced
99

1010
PVMeshQualityEnhanced
1111
---------------------------
1212

13-
.. automodule:: geos.pv.plugins.PVMeshQualityEnhanced
13+
.. automodule:: geos.pv.plugins.qc.PVMeshQualityEnhanced

docs/geos_pv_docs/processing.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,37 @@ The plugins include:
1111
PVAttributeMapping
1212
--------------------
1313

14-
.. automodule:: geos.pv.plugins.PVAttributeMapping
14+
.. automodule:: geos.pv.plugins.generic_processing.PVAttributeMapping
1515

1616

1717
PVCreateConstantAttributePerRegion
1818
-----------------------------------
1919

20-
.. automodule:: geos.pv.plugins.PVCreateConstantAttributePerRegion
20+
.. automodule:: geos.pv.plugins.generic_processing.PVCreateConstantAttributePerRegion
2121

2222

2323
PVFillPartialArrays
2424
--------------------
2525

26-
.. automodule:: geos.pv.plugins.PVFillPartialArrays
26+
.. automodule:: geos.pv.plugins.generic_processing.PVFillPartialArrays
2727

2828

2929
PVSplitMesh
3030
----------------------------------
3131

32-
.. automodule:: geos.pv.plugins.PVSplitMesh
32+
.. automodule:: geos.pv.plugins.generic_processing.PVSplitMesh
3333

3434

3535
PVMergeBlocksEnhanced module
3636
--------------------------------------
3737

38-
.. automodule:: geos.pv.plugins.PVMergeBlocksEnhanced
38+
.. automodule:: geos.pv.plugins.generic_processing.PVMergeBlocksEnhanced
3939

4040

4141
PVClipToMainFrame
4242
----------------------------------
4343

44-
.. automodule:: geos.pv.plugins.PVClipToMainFrame
44+
.. automodule:: geos.pv.plugins.generic_processing.PVClipToMainFrame
4545

4646

4747
Geos output pre-processing
@@ -50,7 +50,7 @@ Geos output pre-processing
5050
PVGeosBlockExtractAndMerge plugin
5151
----------------------------------
5252

53-
.. automodule:: geos.pv.plugins.PVGeosBlockExtractAndMerge
53+
.. automodule:: geos.pv.plugins.post_processing.PVGeosBlockExtractAndMerge
5454

5555

5656
Geomechanics workflows
@@ -60,16 +60,16 @@ Geomechanics workflows
6060
PVGeomechanicsWorkflow plugin
6161
------------------------------
6262

63-
.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflow
63+
.. automodule:: geos.pv.plugins.post_processing.PVGeomechanicsWorkflow
6464

6565

6666
PVGeomechanicsCalculator plugin
6767
---------------------------------------
6868

69-
.. automodule:: geos.pv.plugins.PVGeomechanicsCalculator
69+
.. automodule:: geos.pv.plugins.post_processing.PVGeomechanicsCalculator
7070

7171

7272
PVMohrCirclePlot plugin
7373
---------------------------------
7474

75-
.. automodule:: geos.pv.plugins.PVMohrCirclePlot
75+
.. automodule:: geos.pv.plugins.post_processing.PVMohrCirclePlot

docs/geos_pv_docs/readers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Readers
44
PVGeosLogReader
55
--------------------
66

7-
.. automodule:: geos.pv.plugins.PVGeosLogReader
7+
.. automodule:: geos.pv.plugins.post_processing.PVGeosLogReader

geos-pv/src/geos/pv/plugins/PVAttributeMapping.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing_extensions import Self
99

1010
# update sys.path to load all GEOS Python Package dependencies
11-
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
11+
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
1212
sys.path.insert( 0, str( geos_pv_path / "src" ) )
1313
from geos.pv.utils.config import update_paths
1414

@@ -33,7 +33,9 @@
3333
vtkMultiBlockDataSet,
3434
)
3535

36-
__doc__ = """
36+
from geos.pv.utils.details import FilterCategory
37+
38+
__doc__ = f"""
3739
AttributeMapping is a paraview plugin that transfers global attributes from a source mesh to a final mesh with same point/cell coordinates.
3840
3941
Input and output meshes can be vtkDataSet or vtkMultiBlockDataSet.
@@ -47,19 +49,19 @@
4749
4850
To use it:
4951
50-
* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVAttributeMapping.
51-
* Select the mesh to transfer the global attributes (meshTo).
52-
* Select Filters > 4- Geos Utils > Attribute Mapping.
53-
* Select the source mesh with global attributes to transfer (meshFrom).
54-
* Select the on witch element (onPoints/onCells) the attributes to transfer are.
55-
* Select the global attributes to transfer from the source mesh to the final mesh.
56-
* Apply.
52+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping
53+
* Select the mesh to transfer the global attributes (meshTo)
54+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Attribute Mapping
55+
* Select the source mesh with global attributes to transfer (meshFrom)
56+
* Select the on which element (onPoints/onCells) the attributes to transfer are
57+
* Select the global attributes to transfer from the source mesh to the final mesh
58+
* Apply
5759
5860
"""
5961

6062

6163
@smproxy.filter( name="PVAttributeMapping", label="Attribute Mapping" )
62-
@smhint.xml( '<ShowInMenu category="4- Geos Utils"/>' )
64+
@smhint.xml( f'<ShowInMenu category="{ FilterCategory.GENERIC_PROCESSING.value }"/>' )
6365
@smproperty.input( name="meshFrom", port_index=1, label="Mesh From" )
6466
@smdomain.datatype(
6567
dataTypes=[ "vtkDataSet", "vtkMultiBlockDataSet" ],

geos-pv/src/geos/pv/plugins/PVClipToMainFrame.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
vtkMultiBlockDataSet, )
1717

1818
# update sys.path to load all GEOS Python Package dependencies
19-
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
19+
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
2020
sys.path.insert( 0, str( geos_pv_path / "src" ) )
2121
from geos.pv.utils.config import update_paths
2222

@@ -25,18 +25,20 @@
2525
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
2626
from geos.processing.generic_processing_tools.ClipToMainFrame import ClipToMainFrame
2727

28-
__doc__ = """
28+
__doc__ = f"""
2929
Clip the input mesh to the main frame applying the correct LandmarkTransform
3030
3131
To use it:
3232
33-
* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVClipToMainFrame.
34-
* Apply.
33+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame
34+
* Select the mesh to process
35+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Clip to the main frame
36+
* Apply
3537
3638
"""
3739

3840

39-
@SISOFilter( category=FilterCategory.GEOS_UTILS,
41+
@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
4042
decoratedLabel="Clip to the main frame",
4143
decoratedType=[ "vtkMultiBlockDataSet", "vtkDataSet" ] )
4244
class PVClipToMainFrame( VTKPythonAlgorithmBase ):

geos-pv/src/geos/pv/plugins/PVCreateConstantAttributePerRegion.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
vtkDataSet, )
2323

2424
# update sys.path to load all GEOS Python Package dependencies
25-
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
25+
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
2626
sys.path.insert( 0, str( geos_pv_path / "src" ) )
2727
from geos.pv.utils.config import update_paths
2828

@@ -32,7 +32,7 @@
3232

3333
from geos.pv.utils.details import SISOFilter, FilterCategory
3434

35-
__doc__ = """
35+
__doc__ = f"""
3636
PVCreateConstantAttributePerRegion is a Paraview plugin that allows to create an attribute
3737
with constant values per components for each chosen indexes of a reference/region attribute.
3838
If other region indexes exist, values are set to nan for float type, -1 for int type or 0 for uint type.
@@ -45,16 +45,16 @@
4545
4646
To use it:
4747
48-
* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVCreateConstantAttributePerRegion.
49-
* Select the mesh in which you want to create the attributes.
50-
* Select the filter Create Constant Attribute Per Region in filter|0- Geos Pre-processing.
51-
* Choose the region attribute, the relation index/values, the new attribute name, the type of the value, the number of components and their names.
52-
* Apply.
48+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion
49+
* Select the mesh in which you want to create the attributes
50+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Create Constant Attribute Per Region
51+
* Choose the region attribute, the relation index/values, the new attribute name, the type of the value, the number of components and their names
52+
* Apply
5353
5454
"""
5555

5656

57-
@SISOFilter( category=FilterCategory.GEOS_PROP,
57+
@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
5858
decoratedLabel="Create Constant Attribute Per Region",
5959
decoratedType=[ "vtkMultiBlockDataSet", "vtkDataSet" ] )
6060
class PVCreateConstantAttributePerRegion( VTKPythonAlgorithmBase ):

geos-pv/src/geos/pv/plugins/PVFillPartialArrays.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@
2727
from geos.pv.utils.details import SISOFilter, FilterCategory
2828
from geos.processing.generic_processing_tools.FillPartialArrays import FillPartialArrays
2929

30-
__doc__ = """
30+
__doc__ = f"""
3131
Fill partial arrays of input mesh.
3232
3333
Input and output are vtkMultiBlockDataSet.
3434
3535
To use it:
3636
37-
* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVFillPartialArrays.
38-
* Select the input mesh.
39-
* Select the partial arrays to fill.
40-
* Set the filling value (defaults to nan).
41-
* Apply.
37+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays
38+
* Select the input mesh to process
39+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Fill Partial Arrays
40+
* Set the partial attribute to fill and its filling values
41+
* Apply
4242
4343
"""
4444

4545

46-
@SISOFilter( category=FilterCategory.GEOS_UTILS,
46+
@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
4747
decoratedLabel="Fill Partial Arrays",
4848
decoratedType="vtkMultiBlockDataSet" )
4949
class PVFillPartialArrays( VTKPythonAlgorithmBase ):

geos-pv/src/geos/pv/plugins/PVMergeBlocksEnhanced.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@
2323
)
2424

2525
# Update sys.path to load all GEOS Python Package dependencies
26-
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
26+
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
2727
sys.path.insert( 0, str( geos_pv_path / "src" ) )
2828
from geos.pv.utils.config import update_paths
2929

3030
update_paths()
3131

3232
from geos.processing.generic_processing_tools.MergeBlockEnhanced import MergeBlockEnhanced
33+
from geos.pv.utils.details import FilterCategory
3334

34-
__doc__ = """
35+
__doc__ = f"""
3536
Merge Blocks Keeping Partial Attributes is a Paraview plugin filter that allows to merge blocks from a multiblock dataset while keeping partial attributes.
3637
3738
Input is a vtkMultiBlockDataSet and output is a vtkUnstructuredGrid.
@@ -42,9 +43,9 @@
4243
4344
To use it:
4445
45-
* Load the module in Paraview: Tools > Manage Plugins... > Load new > PVMergeBlocksEnhanced
46+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced
4647
* Select the multiblock dataset mesh you want to merge
47-
* Select Filters > 4- Geos Utils > Merge Blocks Keeping Partial Attributes
48+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Merge Blocks Keeping Partial Attributes
4849
* Apply
4950
5051
@@ -57,7 +58,7 @@
5758

5859

5960
@smproxy.filter( name="PVMergeBlocksEnhanced", label="Merge Blocks Keeping Partial Attributes" )
60-
@smhint.xml( '<ShowInMenu category="4- Geos Utils"/>' )
61+
@smhint.xml( f'<ShowInMenu category="{ FilterCategory.GENERIC_PROCESSING.value }"/>' )
6162
@smproperty.input( name="Input", port_index=0, label="Input" )
6263
@smdomain.datatype( dataTypes=[ "vtkMultiBlockDataSet" ], composite_data_supported=True )
6364
class PVMergeBlocksEnhanced( VTKPythonAlgorithmBase ):

geos-pv/src/geos/pv/plugins/PVSplitMesh.py renamed to geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from vtkmodules.vtkCommonDataModel import vtkPointSet
1414

1515
# update sys.path to load all GEOS Python Package dependencies
16-
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
16+
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
1717
sys.path.insert( 0, str( geos_pv_path / "src" ) )
1818
from geos.pv.utils.config import update_paths
1919

@@ -22,21 +22,22 @@
2222
from geos.processing.generic_processing_tools.SplitMesh import SplitMesh
2323
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
2424

25-
__doc__ = """
25+
__doc__ = f"""
2626
Split each cell of input mesh to smaller cells.
2727
2828
Output mesh is of same type as input mesh. If input mesh is a composite mesh, the plugin split cells of each part independently.
2929
3030
To use it:
3131
32-
* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVSplitMesh.
33-
* Select the input mesh.
34-
* Apply the filter.
32+
* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh
33+
* Select the input mesh to process
34+
* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Split Mesh
35+
* Apply
3536
3637
"""
3738

3839

39-
@SISOFilter( category=FilterCategory.GEOS_UTILS, decoratedLabel="Split Mesh", decoratedType="vtkPointSet" )
40+
@SISOFilter( category=FilterCategory.GENERIC_PROCESSING, decoratedLabel="Split Mesh", decoratedType="vtkPointSet" )
4041
class PVSplitMesh( VTKPythonAlgorithmBase ):
4142

4243
def __init__( self: Self ) -> None:

geos-pv/src/geos/pv/plugins/generic_processing/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)