diff --git a/tools/ogsAutowrap/.shed.yml b/tools/ogsAutowrap/.shed.yml new file mode 100644 index 00000000..b940d687 --- /dev/null +++ b/tools/ogsAutowrap/.shed.yml @@ -0,0 +1,16 @@ +name: suite_ogs +owner: ufz +description: A suite of tools for OpenGeoSys (ogs) +long_description: A suite of tools for ogs +categories: +- Geo Science +remote_repository_url: https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/ogs/ +homepage_url: https://gitlab.opengeosys.org/ogs/ogs +type: unrestricted +auto_tool_repositories: + name_template: "{{ tool_id }}" + description_template: A suite of tools for OpenGeoSys (ogs) +suite: + name: suite_ogs + description: A suite of tools for ogs + long_description: A suite of tools for og \ No newline at end of file diff --git a/tools/ogsAutowrap/AddElementQuality.xml b/tools/ogsAutowrap/AddElementQuality.xml new file mode 100644 index 00000000..3b35860a --- /dev/null +++ b/tools/ogsAutowrap/AddElementQuality.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'AddElementQuality'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + This tool runs the **AddElementQuality** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/AddFaultToVoxelGrid.xml b/tools/ogsAutowrap/AddFaultToVoxelGrid.xml new file mode 100644 index 00000000..657a458c --- /dev/null +++ b/tools/ogsAutowrap/AddFaultToVoxelGrid.xml @@ -0,0 +1,30 @@ + + + Galaxy wrapper for the OGS utility 'AddFaultToVoxelGrid'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **AddFaultToVoxelGrid** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/AddLayer.xml b/tools/ogsAutowrap/AddLayer.xml new file mode 100644 index 00000000..fe6df82a --- /dev/null +++ b/tools/ogsAutowrap/AddLayer.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'AddLayer'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **AddLayer** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/AssignRasterDataToMesh.xml b/tools/ogsAutowrap/AssignRasterDataToMesh.xml new file mode 100644 index 00000000..dd567a39 --- /dev/null +++ b/tools/ogsAutowrap/AssignRasterDataToMesh.xml @@ -0,0 +1,38 @@ + + + Galaxy wrapper for the OGS utility 'AssignRasterDataToMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + This tool runs the **AssignRasterDataToMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ComputeNodeAreasFromSurfaceMesh.xml b/tools/ogsAutowrap/ComputeNodeAreasFromSurfaceMesh.xml new file mode 100644 index 00000000..cfa8cbf1 --- /dev/null +++ b/tools/ogsAutowrap/ComputeNodeAreasFromSurfaceMesh.xml @@ -0,0 +1,36 @@ + + + Galaxy wrapper for the OGS utility 'ComputeNodeAreasFromSurfaceMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + This tool runs the **ComputeNodeAreasFromSurfaceMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/CreateAnchors.xml b/tools/ogsAutowrap/CreateAnchors.xml new file mode 100644 index 00000000..0b82c043 --- /dev/null +++ b/tools/ogsAutowrap/CreateAnchors.xml @@ -0,0 +1,23 @@ + + + Galaxy wrapper for the OGS utility 'CreateAnchors'. + + macros.xml + test_macros.xml + + + + + + + + + + + This tool runs the **CreateAnchors** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/CreateBoundaryConditionsAlongPolylines.xml b/tools/ogsAutowrap/CreateBoundaryConditionsAlongPolylines.xml new file mode 100644 index 00000000..dcd4a7ff --- /dev/null +++ b/tools/ogsAutowrap/CreateBoundaryConditionsAlongPolylines.xml @@ -0,0 +1,42 @@ + + + Galaxy wrapper for the OGS utility 'CreateBoundaryConditionsAlongPolylines'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **CreateBoundaryConditionsAlongPolylines** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ExtractBoundary.xml b/tools/ogsAutowrap/ExtractBoundary.xml new file mode 100644 index 00000000..e26479cd --- /dev/null +++ b/tools/ogsAutowrap/ExtractBoundary.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'ExtractBoundary'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **ExtractBoundary** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ExtractMaterials.xml b/tools/ogsAutowrap/ExtractMaterials.xml new file mode 100644 index 00000000..ba0d372a --- /dev/null +++ b/tools/ogsAutowrap/ExtractMaterials.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'ExtractMaterials'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **ExtractMaterials** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ExtractSurface.xml b/tools/ogsAutowrap/ExtractSurface.xml new file mode 100644 index 00000000..b85e55b6 --- /dev/null +++ b/tools/ogsAutowrap/ExtractSurface.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'ExtractSurface'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **ExtractSurface** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/FEFLOW2OGS.xml b/tools/ogsAutowrap/FEFLOW2OGS.xml new file mode 100644 index 00000000..9903fbed --- /dev/null +++ b/tools/ogsAutowrap/FEFLOW2OGS.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'FEFLOW2OGS'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **FEFLOW2OGS** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Feflow2Mesh.xml b/tools/ogsAutowrap/Feflow2Mesh.xml new file mode 100644 index 00000000..31cd2397 --- /dev/null +++ b/tools/ogsAutowrap/Feflow2Mesh.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'Feflow2Mesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **Feflow2Mesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/GMSH2OGS.xml b/tools/ogsAutowrap/GMSH2OGS.xml new file mode 100644 index 00000000..6b5def4c --- /dev/null +++ b/tools/ogsAutowrap/GMSH2OGS.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'GMSH2OGS'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **GMSH2OGS** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/GocadSGridReader.xml b/tools/ogsAutowrap/GocadSGridReader.xml new file mode 100644 index 00000000..257de978 --- /dev/null +++ b/tools/ogsAutowrap/GocadSGridReader.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'GocadSGridReader'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **GocadSGridReader** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/GocadTSurfaceReader.xml b/tools/ogsAutowrap/GocadTSurfaceReader.xml new file mode 100644 index 00000000..52d9f3c8 --- /dev/null +++ b/tools/ogsAutowrap/GocadTSurfaceReader.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'GocadTSurfaceReader'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **GocadTSurfaceReader** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/IntegrateBoreholesIntoMesh.xml b/tools/ogsAutowrap/IntegrateBoreholesIntoMesh.xml new file mode 100644 index 00000000..9f057673 --- /dev/null +++ b/tools/ogsAutowrap/IntegrateBoreholesIntoMesh.xml @@ -0,0 +1,34 @@ + + + Galaxy wrapper for the OGS utility 'IntegrateBoreholesIntoMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **IntegrateBoreholesIntoMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Layers2Grid.xml b/tools/ogsAutowrap/Layers2Grid.xml new file mode 100644 index 00000000..bb642e61 --- /dev/null +++ b/tools/ogsAutowrap/Layers2Grid.xml @@ -0,0 +1,39 @@ + + + Galaxy wrapper for the OGS utility 'Layers2Grid'. + + macros.xml + test_macros.xml + + + + > input_list.txt; +#end for +Layers2Grid + $dilate + --cellsize-z '$cellsize_z' + --cellsize-y '$cellsize_y' + --cellsize-x '$cellsize_x' + --input input_list.txt + --output output_1.vtu +]]> + + + + + + + + + + + + + This tool runs the **Layers2Grid** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/MapGeometryToMeshSurface.xml b/tools/ogsAutowrap/MapGeometryToMeshSurface.xml new file mode 100644 index 00000000..2b27fdd8 --- /dev/null +++ b/tools/ogsAutowrap/MapGeometryToMeshSurface.xml @@ -0,0 +1,32 @@ + + + Galaxy wrapper for the OGS utility 'MapGeometryToMeshSurface'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **MapGeometryToMeshSurface** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/MergeMeshToBulkMesh.xml b/tools/ogsAutowrap/MergeMeshToBulkMesh.xml new file mode 100644 index 00000000..5f2d3fcc --- /dev/null +++ b/tools/ogsAutowrap/MergeMeshToBulkMesh.xml @@ -0,0 +1,46 @@ + + + Galaxy wrapper for the OGS utility 'MergeMeshToBulkMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + This tool runs the **MergeMeshToBulkMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Mesh2Raster.xml b/tools/ogsAutowrap/Mesh2Raster.xml new file mode 100644 index 00000000..6bbbd3aa --- /dev/null +++ b/tools/ogsAutowrap/Mesh2Raster.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'Mesh2Raster'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **Mesh2Raster** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/MeshMapping.xml b/tools/ogsAutowrap/MeshMapping.xml new file mode 100644 index 00000000..624869be --- /dev/null +++ b/tools/ogsAutowrap/MeshMapping.xml @@ -0,0 +1,39 @@ + + + Galaxy wrapper for the OGS utility 'MeshMapping'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + This tool runs the **MeshMapping** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/MoveGeometry.xml b/tools/ogsAutowrap/MoveGeometry.xml new file mode 100644 index 00000000..71dfcb39 --- /dev/null +++ b/tools/ogsAutowrap/MoveGeometry.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'MoveGeometry'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **MoveGeometry** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/MoveMesh.xml b/tools/ogsAutowrap/MoveMesh.xml new file mode 100644 index 00000000..e37b776d --- /dev/null +++ b/tools/ogsAutowrap/MoveMesh.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'MoveMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **MoveMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/NodeReordering.xml b/tools/ogsAutowrap/NodeReordering.xml new file mode 100644 index 00000000..dfc036c1 --- /dev/null +++ b/tools/ogsAutowrap/NodeReordering.xml @@ -0,0 +1,36 @@ + + + Galaxy wrapper for the OGS utility 'NodeReordering'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + This tool runs the **NodeReordering** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/OGS2VTK.xml b/tools/ogsAutowrap/OGS2VTK.xml new file mode 100644 index 00000000..e8b24e57 --- /dev/null +++ b/tools/ogsAutowrap/OGS2VTK.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'OGS2VTK'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **OGS2VTK** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/PVD2XDMF.xml b/tools/ogsAutowrap/PVD2XDMF.xml new file mode 100644 index 00000000..f980b6e3 --- /dev/null +++ b/tools/ogsAutowrap/PVD2XDMF.xml @@ -0,0 +1,31 @@ + + + Galaxy wrapper for the OGS utility 'PVD2XDMF'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **PVD2XDMF** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/PVTU2VTU.xml b/tools/ogsAutowrap/PVTU2VTU.xml new file mode 100644 index 00000000..3407fecc --- /dev/null +++ b/tools/ogsAutowrap/PVTU2VTU.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'PVTU2VTU'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **PVTU2VTU** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/PartitionMesh.xml b/tools/ogsAutowrap/PartitionMesh.xml new file mode 100644 index 00000000..b2deb3da --- /dev/null +++ b/tools/ogsAutowrap/PartitionMesh.xml @@ -0,0 +1,42 @@ + + + Galaxy wrapper for the OGS utility 'PartitionMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **PartitionMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Raster2ASC.xml b/tools/ogsAutowrap/Raster2ASC.xml new file mode 100644 index 00000000..cc399e52 --- /dev/null +++ b/tools/ogsAutowrap/Raster2ASC.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'Raster2ASC'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **Raster2ASC** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Raster2Mesh.xml b/tools/ogsAutowrap/Raster2Mesh.xml new file mode 100644 index 00000000..8370a571 --- /dev/null +++ b/tools/ogsAutowrap/Raster2Mesh.xml @@ -0,0 +1,40 @@ + + + Galaxy wrapper for the OGS utility 'Raster2Mesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **Raster2Mesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/RemoveGhostData.xml b/tools/ogsAutowrap/RemoveGhostData.xml new file mode 100644 index 00000000..361623a8 --- /dev/null +++ b/tools/ogsAutowrap/RemoveGhostData.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'RemoveGhostData'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **RemoveGhostData** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/RemoveUnusedPoints.xml b/tools/ogsAutowrap/RemoveUnusedPoints.xml new file mode 100644 index 00000000..19d31b67 --- /dev/null +++ b/tools/ogsAutowrap/RemoveUnusedPoints.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'RemoveUnusedPoints'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **RemoveUnusedPoints** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ReorderMesh.xml b/tools/ogsAutowrap/ReorderMesh.xml new file mode 100644 index 00000000..116eaa77 --- /dev/null +++ b/tools/ogsAutowrap/ReorderMesh.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'ReorderMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **ReorderMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ResetPropertiesInPolygonalRegion.xml b/tools/ogsAutowrap/ResetPropertiesInPolygonalRegion.xml new file mode 100644 index 00000000..1c0df857 --- /dev/null +++ b/tools/ogsAutowrap/ResetPropertiesInPolygonalRegion.xml @@ -0,0 +1,41 @@ + + + Galaxy wrapper for the OGS utility 'ResetPropertiesInPolygonalRegion'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + This tool runs the **ResetPropertiesInPolygonalRegion** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/SWMMConverter.xml b/tools/ogsAutowrap/SWMMConverter.xml new file mode 100644 index 00000000..ec2f9464 --- /dev/null +++ b/tools/ogsAutowrap/SWMMConverter.xml @@ -0,0 +1,39 @@ + + + Galaxy wrapper for the OGS utility 'SWMMConverter'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + This tool runs the **SWMMConverter** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/TIN2VTK.xml b/tools/ogsAutowrap/TIN2VTK.xml new file mode 100644 index 00000000..f40f9083 --- /dev/null +++ b/tools/ogsAutowrap/TIN2VTK.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'TIN2VTK'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **TIN2VTK** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/TecPlotTools.xml b/tools/ogsAutowrap/TecPlotTools.xml new file mode 100644 index 00000000..715dbef9 --- /dev/null +++ b/tools/ogsAutowrap/TecPlotTools.xml @@ -0,0 +1,31 @@ + + + Galaxy wrapper for the OGS utility 'TecPlotTools'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **TecPlotTools** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/VTK2OGS.xml b/tools/ogsAutowrap/VTK2OGS.xml new file mode 100644 index 00000000..41adc752 --- /dev/null +++ b/tools/ogsAutowrap/VTK2OGS.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'VTK2OGS'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **VTK2OGS** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/VTK2TIN.xml b/tools/ogsAutowrap/VTK2TIN.xml new file mode 100644 index 00000000..f8e60e27 --- /dev/null +++ b/tools/ogsAutowrap/VTK2TIN.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'VTK2TIN'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **VTK2TIN** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/Vtu2Grid.xml b/tools/ogsAutowrap/Vtu2Grid.xml new file mode 100644 index 00000000..b792ec46 --- /dev/null +++ b/tools/ogsAutowrap/Vtu2Grid.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'Vtu2Grid'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **Vtu2Grid** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/addDataToRaster.xml b/tools/ogsAutowrap/addDataToRaster.xml new file mode 100644 index 00000000..2a64f6d8 --- /dev/null +++ b/tools/ogsAutowrap/addDataToRaster.xml @@ -0,0 +1,45 @@ + + + Galaxy wrapper for the OGS utility 'addDataToRaster'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **addDataToRaster** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/appendLinesAlongPolyline.xml b/tools/ogsAutowrap/appendLinesAlongPolyline.xml new file mode 100644 index 00000000..697f5e18 --- /dev/null +++ b/tools/ogsAutowrap/appendLinesAlongPolyline.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'appendLinesAlongPolyline'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **appendLinesAlongPolyline** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/checkMesh.xml b/tools/ogsAutowrap/checkMesh.xml new file mode 100644 index 00000000..4d0ff1f9 --- /dev/null +++ b/tools/ogsAutowrap/checkMesh.xml @@ -0,0 +1,30 @@ + + + Galaxy wrapper for the OGS utility 'checkMesh'. + + macros.xml + test_macros.xml + + + + '$stdout_log' +]]> + + + + + + + + + + + This tool runs the **checkMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/computeSurfaceNodeIDsInPolygonalRegion.xml b/tools/ogsAutowrap/computeSurfaceNodeIDsInPolygonalRegion.xml new file mode 100644 index 00000000..91848f9f --- /dev/null +++ b/tools/ogsAutowrap/computeSurfaceNodeIDsInPolygonalRegion.xml @@ -0,0 +1,32 @@ + + + Galaxy wrapper for the OGS utility 'computeSurfaceNodeIDsInPolygonalRegion'. + + macros.xml + test_macros.xml + + + + '$stdout_log' +]]> + + + + + + + + + + + This tool runs the **computeSurfaceNodeIDsInPolygonalRegion** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/constructMeshesFromGeometry.xml b/tools/ogsAutowrap/constructMeshesFromGeometry.xml new file mode 100644 index 00000000..92514a95 --- /dev/null +++ b/tools/ogsAutowrap/constructMeshesFromGeometry.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'constructMeshesFromGeometry'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + This tool runs the **constructMeshesFromGeometry** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/convertGEO.xml b/tools/ogsAutowrap/convertGEO.xml new file mode 100644 index 00000000..6c59e543 --- /dev/null +++ b/tools/ogsAutowrap/convertGEO.xml @@ -0,0 +1,30 @@ + + + Galaxy wrapper for the OGS utility 'convertGEO'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **convertGEO** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/convertToLinearMesh.xml b/tools/ogsAutowrap/convertToLinearMesh.xml new file mode 100644 index 00000000..83755c1c --- /dev/null +++ b/tools/ogsAutowrap/convertToLinearMesh.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'convertToLinearMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **convertToLinearMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/convertVtkDataArrayToVtkDataArray.xml b/tools/ogsAutowrap/convertVtkDataArrayToVtkDataArray.xml new file mode 100644 index 00000000..a0eb3cf6 --- /dev/null +++ b/tools/ogsAutowrap/convertVtkDataArrayToVtkDataArray.xml @@ -0,0 +1,36 @@ + + + Galaxy wrapper for the OGS utility 'convertVtkDataArrayToVtkDataArray'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + This tool runs the **convertVtkDataArrayToVtkDataArray** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createIntermediateRasters.xml b/tools/ogsAutowrap/createIntermediateRasters.xml new file mode 100644 index 00000000..1f842e56 --- /dev/null +++ b/tools/ogsAutowrap/createIntermediateRasters.xml @@ -0,0 +1,32 @@ + + + Galaxy wrapper for the OGS utility 'createIntermediateRasters'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **createIntermediateRasters** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createLayeredMeshFromRasters.xml b/tools/ogsAutowrap/createLayeredMeshFromRasters.xml new file mode 100644 index 00000000..2b0b1507 --- /dev/null +++ b/tools/ogsAutowrap/createLayeredMeshFromRasters.xml @@ -0,0 +1,38 @@ + + + Galaxy wrapper for the OGS utility 'createLayeredMeshFromRasters'. + + macros.xml + test_macros.xml + + + + > raster_list_list.txt; +#end for +ln -sf '$input_mesh_file' '$input_mesh_file.element_identifier'; +createLayeredMeshFromRasters + $ascii_output + --raster-list raster_list_list.txt + $keep_surface_material_ids + --input-mesh-file '$input_mesh_file.element_identifier' + --output-mesh-file output_1.vtu +]]> + + + + + + + + + + + + This tool runs the **createLayeredMeshFromRasters** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createMeshElemPropertiesFromASCRaster.xml b/tools/ogsAutowrap/createMeshElemPropertiesFromASCRaster.xml new file mode 100644 index 00000000..ae5afdf1 --- /dev/null +++ b/tools/ogsAutowrap/createMeshElemPropertiesFromASCRaster.xml @@ -0,0 +1,36 @@ + + + Galaxy wrapper for the OGS utility 'createMeshElemPropertiesFromASCRaster'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **createMeshElemPropertiesFromASCRaster** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createNeumannBc.xml b/tools/ogsAutowrap/createNeumannBc.xml new file mode 100644 index 00000000..efa04b71 --- /dev/null +++ b/tools/ogsAutowrap/createNeumannBc.xml @@ -0,0 +1,31 @@ + + + Galaxy wrapper for the OGS utility 'createNeumannBc'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **createNeumannBc** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createQuadraticMesh.xml b/tools/ogsAutowrap/createQuadraticMesh.xml new file mode 100644 index 00000000..faf80fb2 --- /dev/null +++ b/tools/ogsAutowrap/createQuadraticMesh.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'createQuadraticMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **createQuadraticMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createRaster.xml b/tools/ogsAutowrap/createRaster.xml new file mode 100644 index 00000000..6d00194c --- /dev/null +++ b/tools/ogsAutowrap/createRaster.xml @@ -0,0 +1,34 @@ + + + Galaxy wrapper for the OGS utility 'createRaster'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + This tool runs the **createRaster** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/createTetgenSmeshFromRasters.xml b/tools/ogsAutowrap/createTetgenSmeshFromRasters.xml new file mode 100644 index 00000000..9c8cad58 --- /dev/null +++ b/tools/ogsAutowrap/createTetgenSmeshFromRasters.xml @@ -0,0 +1,36 @@ + + + Galaxy wrapper for the OGS utility 'createTetgenSmeshFromRasters'. + + macros.xml + test_macros.xml + + + + > raster_list_list.txt; +#end for +ln -sf '$input_mesh_file' '$input_mesh_file.element_identifier'; +createTetgenSmeshFromRasters + $ascii_output + --raster-list raster_list_list.txt + --input-mesh-file '$input_mesh_file.element_identifier' + --output-mesh-file output_1.smesh +]]> + + + + + + + + + + + This tool runs the **createTetgenSmeshFromRasters** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/editMaterialID.xml b/tools/ogsAutowrap/editMaterialID.xml new file mode 100644 index 00000000..724edac0 --- /dev/null +++ b/tools/ogsAutowrap/editMaterialID.xml @@ -0,0 +1,48 @@ + + + Galaxy wrapper for the OGS utility 'editMaterialID'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **editMaterialID** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/gen.py b/tools/ogsAutowrap/gen.py new file mode 100644 index 00000000..1542715b --- /dev/null +++ b/tools/ogsAutowrap/gen.py @@ -0,0 +1,1268 @@ +import argparse +import logging +import re +import sys +import json +import shlex +import urllib.request +import xml.etree.ElementTree as ET +from pathlib import Path +from typing import Any, Dict, List, Optional, Tuple + +import json +from galaxyxml.tool import Tool +from galaxyxml.tool.parameters import ( + BooleanParam, + DataParam, + DiscoverDatasets, + Expand, + FloatParam, + Inputs, + IntegerParam, + OutputCollection, + OutputData, + Outputs, + SelectParam, + Tests, + TextParam, +) + +# --- CONFIGURATION (ONLINE) --- +GITLAB_BASE_URL = "https://gitlab.opengeosys.org/ogs/ogs/-" +RAW_URL_ROOT = f"{GITLAB_BASE_URL}/raw/master" +API_URL_ROOT = "https://gitlab.opengeosys.org/api/v4/projects/ogs%2Fogs/repository/tree" +UTILS_PATH = "Applications/Utils" +OUTPUT_DIR = Path(".") +REPO_B_RAW = "https://gitlab.opengeosys.org/kristofkessler/ogs/-/raw/ebd40a71bacd951b90b64e2e42fb8d11528bde39" +REPO_B_API = ( + "https://gitlab.opengeosys.org/api/v4/projects/kristofkessler%2Fogs/repository/tree" +) +REPO_B_DATA_PATH = "Tests/Data" + +# Tools with broken executable commands +EXCLUDED_TOOLS = [ + "netcdfconverter", + "binarytopvtu", + "ogsfileconverter", + "raster2pointcloud", + "verticalslicefromlayers", + "convertshptogli", + "mesh2shape", +] + +TCLAP_PATTERN_STD = re.compile( + r"TCLAP::(?P(?:Value|Switch|Multi)Arg)\s*" + r"(?:<(?P.*?)>)?\s*(?P\w+)\s*" + r"[\({]\s*(?P.*?)\s*[\)}];", + re.DOTALL, +) + +TCLAP_PATTERN_UNLABELED = re.compile( + r"TCLAP::(?PUnlabeled(?:Value|Multi)Arg)\s*" + r"(?:<(?P.*?)>)?\s*(?P\w+)\s*" + r"[\({]\s*(?P.*?)\s*[\)}];", + re.DOTALL, +) +FILE_EXTENSION_PATTERN = re.compile(r"\((.*?)\)") +MIN_MAX_PATTERN = re.compile(r"\((min|max)\s*=\s*([^)]+)\)") + + +def list_cpp_files(root_dir: str) -> List[str]: + """Return a sorted list of all *.cpp file paths under ``root_dir`` (recursive).""" + return sorted(str(p) for p in Path(root_dir).rglob("*.cpp")) + + +def get_repo_b_file_index() -> Dict[str, str]: + index = {} + try: + url = f"{REPO_B_API}?path={REPO_B_DATA_PATH}&ref=ebd40a71bacd951b90b64e2e42fb8d11528bde39&per_page=100" + with urllib.request.urlopen(url) as resp: + items = json.loads(resp.read().decode()) + folders = [i["path"] for i in items if i["type"] == "tree"] + except: + return {} + + eprint(f"Scanning {len(folders)} subfolders in Repo B...") + for folder in folders: + page = 1 + while True: + url = f"{REPO_B_API}?path={folder}&recursive=true&per_page=100&page={page}&ref=ebd40a71bacd951b90b64e2e42fb8d11528bde39" + try: + with urllib.request.urlopen(url) as resp: + data = json.loads(resp.read().decode()) + if not data: + break + for item in data: + if item["type"] == "blob": + index[item["path"].split("/")[-1]] = item["path"] + page += 1 + except: + break + eprint(f"-> Index built: {len(index)} files found in Repo B.") + return index + + +def get_ogs_ftype(extensions: List[str]) -> str: + """Mapping for Galaxy file types (including custom OGS types)""" + if not extensions: + return "vtkxml" + + ext = extensions[0].lower().lstrip(".") + + if ext == "sg": + return "gocad.sg" + if ext == "fem": + return "feflow.fem" + if ext == "asc": + return "raster.asc" + + if ext in ["vtu", "vtk", "pvtu", "pvd"]: + return "vtkxml" + + if ext in ["prj", "xml", "gml", "ts", "gli"]: + return "xml" + + if ext == "nc": + return "netcdf" + + if ext in ["plt", "tin", "mesh", "bin", "smesh"]: + return "txt" + + return ext + + +def eprint(*args, **kwargs): + print(*args, file=sys.stderr, **kwargs) + + +def sanitize_name(name: str) -> str: + return re.sub(r"[^a-zA-Z0-9_]+", "_", name) + + +def url_exists(url: str) -> bool: + try: + req = urllib.request.Request(url, method="HEAD") + with urllib.request.urlopen(req, timeout=5) as response: + return response.status == 200 + except: + return False + + +def resolve_values_constraint(constraint_ptr: str, search_space: str) -> List[str]: + var_name = constraint_ptr.lstrip("&") + vc_pattern = re.compile( + r"TCLAP::ValuesConstraint<.*?>\s+" + + re.escape(var_name) + + r"\s*[\({]\s*(\w+)\s*[\)}]", + re.DOTALL, + ) + vc_match = vc_pattern.search(search_space) + if not vc_match: + return [] + + vector_var_name = vc_match.group(1) + options = [] + + vec_init_pattern = re.compile( + r"std::vector<.*?>\s+" + + re.escape(vector_var_name) + + r"\s*(?:=)?\s*[({]?\s*\{(.*?)\}\s*[)}]?;", + re.DOTALL, + ) + vec_match = vec_init_pattern.search(search_space) + if vec_match: + content = vec_match.group(1) + string_options = re.findall(r'"(.*?)"', content) + if string_options: + options.extend(string_options) + else: + numeric_options = [ + item.strip() for item in content.split(",") if item.strip() + ] + options.extend(numeric_options) + + push_pattern = re.compile( + re.escape(vector_var_name) + + r"\.(?:emplace_back|push_back)\s*\(\s*([^)]+)\s*\)\s*;", + re.MULTILINE, + ) + push_matches = push_pattern.findall(search_space) + if push_matches: + for val in push_matches: + clean_val = val.strip().strip('"') + options.append(clean_val) + + seen = set() + return [x for x in options if not (x in seen or seen.add(x))] + + +def discover_tools(ogs_root: Path) -> List[Dict[str, Any]]: + source_files = list_cpp_files(ogs_root / "Applications" / "Utils") + tools_dict: Dict[str, Dict[str, Any]] = {} + logging.info(f"Searching {len(source_files)} remote .cpp files") + + for file_path in source_files: + path_obj = Path(file_path) + + raw_url = f"{RAW_URL_ROOT}/{file_path}" + with open(file_path) as fh: + content = fh.read() + + all_matches = list(TCLAP_PATTERN_STD.finditer(content)) + list( + TCLAP_PATTERN_UNLABELED.finditer(content) + ) + + if not all_matches: + logging.debug(f"Skiping (no tclap): {file_path}") + continue + + if path_obj.name == "main.cpp": + tool_name = path_obj.parent.name + else: + tool_name = path_obj.stem + + if tool_name.lower() in ["main", "utils"]: + continue + + if tool_name not in tools_dict: + tools_dict[tool_name] = {"name": tool_name, "parameters": []} + + for match in all_matches: + param_data = match.groupdict() + param_data["is_unlabeled"] = "Unlabeled" in param_data.get("arg_type", "") + param_data["full_source_code"] = content + param_data["match_start_pos"] = match.start() + tools_dict[tool_name]["parameters"].append(param_data) + + all_tools_data = list(tools_dict.values()) + logging.info(f"-> Found {len(all_tools_data)}") + return sorted(all_tools_data, key=lambda x: x["name"]) + + +def process_parameters( + tclap_params: List[Dict[str, Any]] +) -> Tuple[List[object], Dict[str, str]]: + galaxy_inputs = [] + output_command_map = {} + output_idx = 1 + + if tclap_params and "writeMeshToFile" in tclap_params[0].get( + "full_source_code", "" + ): + has_tclap_output = any( + "output" in p.get("all_args", "").lower() + or "BASE_FILENAME_OUTPUT" in p.get("all_args", "") + for p in tclap_params + ) + if not has_tclap_output: + output_command_map["VIRTUAL_no_flag"] = { + "filename": "new_", + "format": "vtkxml", + "type": "BASE_FILENAME", + } + + for param_info in tclap_params: + if param_info.get("tclap_var_name") == "log_level_arg": + continue + all_args_str = param_info.get("all_args", "") + if not all_args_str: + continue + + args = re.split(r",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)", all_args_str) + args = [arg.strip() for arg in args] + is_unlabeled = param_info.get("is_unlabeled", False) + + short_flag, long_flag, help_text_raw = "", "", "" + if not is_unlabeled: + if len(args) > 0: + short_flag = args[0].strip('"') + if len(args) > 1: + long_flag = args[1].strip('"') + if len(args) > 2: + help_text_raw = args[2] + else: + if len(args) > 0: + long_flag = args[0].strip('"') + if len(args) > 1: + help_text_raw = args[1] + if not long_flag: + long_flag = param_info.get("tclap_var_name", f"arg_{output_idx}") + + if not long_flag: + continue + help_parts = re.findall(r'"(.*?)"', help_text_raw, re.DOTALL) + help_text = " ".join(part.strip() for part in help_parts).strip() + var_name = sanitize_name(long_flag) + argument = f"--{long_flag}" if long_flag else f"-{short_flag}" + + # OUTPUT LOGIC + is_output_help = ( + help_text.lower().startswith("output") + or "directory name and output base" in help_text.lower() + ) + + if is_output_help or "BASE_FILENAME_OUTPUT" in all_args_str: + format_match = FILE_EXTENSION_PATTERN.search(help_text) + primary_ext = "vtu" + if format_match: + primary_ext = format_match.group(1).split("|")[0].strip().lstrip(".") + + file_format = get_ogs_ftype([primary_ext]) + disk_ext = "vtu" if file_format == "vtkxml" else primary_ext + + is_base_filename_output = ( + "BASE_FILENAME_OUTPUT" in all_args_str + or "base name" in help_text.lower() + ) + + output_command_map[long_flag] = { + "filename": f"output_{output_idx}.{disk_ext}", + "format": file_format, + "short_flag": short_flag, + "type": "BASE_FILENAME" if is_base_filename_output else "FIXED_FILE", + } + output_idx += 1 + continue + + # INPUT & PARAMETER LOGIC + param = None + constraint_ptr = "" + if len(args) >= 5: + for potential_ptr in args[4:]: + ptr_stripped = potential_ptr.strip() + if ( + ptr_stripped + and not ptr_stripped.startswith('"') + and not ptr_stripped[0].isdigit() + ): + constraint_ptr = ptr_stripped + break + + if constraint_ptr: + options_list = resolve_values_constraint( + constraint_ptr, param_info.get("full_source_code", "") + ) + if options_list: + opts_dict = {opt: opt for opt in options_list} + is_multi = "MultiArg" in param_info.get("arg_type", "") + param = SelectParam( + argument=argument, + label=var_name.replace("_", " "), + help=help_text, + options=opts_dict, + optional=True, + multiple=is_multi, + ) + param.options_dict = opts_dict + elif ( + help_text.startswith("Input") + or "filenames" in var_name + or "INPUT_FILE_LIST" in all_args_str + ): + format_match = FILE_EXTENSION_PATTERN.search(help_text) + all_exts = ( + [e.strip().lstrip(".") for e in format_match.group(1).split("|")] + if format_match + else [] + ) + is_pvd = "pvd" in help_text.lower() or "pvd" in all_exts + primary_ext = "pvd" if is_pvd else (all_exts[0] if all_exts else "vtu") + galaxy_type = get_ogs_ftype([primary_ext]) + is_file_list = "INPUT_FILE_LIST" in all_args_str + is_collection = ( + "MultiArg" in param_info.get("arg_type", "") + or "filenames" in var_name + or is_file_list + ) + is_optional = len(args) > 3 and args[3].lower() == "false" + + param = DataParam( + argument=argument, + label=var_name.replace("_", " "), + help=help_text, + format=galaxy_type, + optional=is_optional, + ) + param.is_data_collection = is_collection + param.is_collection = is_collection + param.ogs_ext = primary_ext + param.is_pvd = is_pvd + param.is_file_list = is_file_list + + if is_pvd: + pvd_data = DataParam( + name=f"{var_name}_pvd_data", + label=f"{var_name} PVD Data Elements", + help="VTU Member Collection", + format="vtkxml", + optional=True, + ) + pvd_data.is_pvd_element = True + pvd_data.is_data_collection = True + pvd_data.is_collection = True + galaxy_inputs.append(pvd_data) + + elif "Switch" in param_info.get("arg_type", ""): + param = BooleanParam( + argument=argument, + label=var_name.replace("_", " "), + help=help_text, + truevalue=f"--{long_flag}", + falsevalue="", + checked=False, + ) + + else: + cpp_type = param_info.get("cpp_type", "").lower() + if "int" in cpp_type or "size_t" in cpp_type: + p_class = IntegerParam + elif "float" in cpp_type or "double" in cpp_type: + p_class = FloatParam + else: + p_class = TextParam + param = p_class( + argument=argument, + label=var_name.replace("_", " "), + help=help_text, + optional=True, + ) + + if param: + param.original_long_flag = long_flag + param.original_short_flag = short_flag + param.is_unlabeled = is_unlabeled + galaxy_inputs.append(param) + + return galaxy_inputs, output_command_map + + +def generate_tools(ogs_root: Path): + OUTPUT_DIR.mkdir(exist_ok=True) + all_tools_data = discover_tools(ogs_root) + if not all_tools_data: + eprint("No tools with TCLAP definitions found. Aborting.") + return + + generated_count = 0 + for tool_data in all_tools_data: + tool_name = tool_data["name"] + if tool_name.lower() in EXCLUDED_TOOLS: + logging.info(f"--> Skipping excluded tool: {tool_name}") + continue + logging.info(f"Generating wrapper for: {tool_name}...") + galaxy_inputs, output_command_map = process_parameters( + tool_data["parameters"] + ) + + # 1. EXECUTABLE NAMING + current_exe = tool_name + if tool_name.upper() == "PVTU2VTU": + current_exe = "pvtu2vtu" + elif tool_name[0].isupper() and tool_name[1:].islower(): + current_exe = tool_name[0].lower() + tool_name[1:] + + m_fixes = { + "PVTU2VTU": "pvtu2vtu", + "FEFLOW2OGS": "feflow2ogs", + "MergeMeshToBulkMesh": "mergeMeshToBulkMesh", + "PartitionMesh": "partmesh", + } + + executable_name = m_fixes.get(tool_name, current_exe) + + command_parts = [] + flag_parts = [] + unlabeled_parts = [] + + # 2. SYMLINKS & ARGUMENT MAPPING + for param in galaxy_inputs: + is_repeat = getattr(param, "is_repeat", False) + is_unlabeled = getattr(param, "is_unlabeled", False) + + flag = getattr(param, "original_long_flag", None) + if flag: + name = sanitize_name(flag) + else: + name = "" + + is_pvd_element = getattr(param, "is_pvd_element", False) + + if isinstance(param, DataParam): + is_file_list = getattr(param, "is_file_list", False) + is_coll = getattr(param, "is_data_collection", False) + + if getattr(param, "is_pvd_element", False): + command_parts.append( + f" #for $item in ${param.name}\n ln -sf '$item' '$item.element_identifier';\n #end for" + ) + continue + if is_file_list: + list_file = f"{name}_list.txt" + command_parts.append(f"touch {list_file};") + command_parts.append( + f"#for $item in ${name}\n ln -sf '$item' '$item.element_identifier';\n echo '$item.element_identifier' >> {list_file};\n#end for" + ) + flag_parts.append(f" --{flag} {list_file}") + continue + if is_coll: + command_parts.append( + f"#for $item in ${name}\nln -sf '$item' '$item.element_identifier';\n#end for" + ) + loop_str = f"#for $item in ${name}\n'$item.element_identifier'\n#end for" + if is_unlabeled: + unlabeled_parts.append(f" --\n{loop_str}") + else: + flag_parts.append(f" --{flag}\n{loop_str}") + else: + command_parts.append( + f"ln -sf '${name}' '${name}.element_identifier';" + ) + arg_val = f"'${name}.element_identifier'" + if is_unlabeled: + unlabeled_parts.append(f" {arg_val}") + else: + flag_parts.append(f" --{flag} {arg_val}") + elif isinstance(param, BooleanParam): + flag_parts.append(f" ${name}") + elif isinstance( + param, (TextParam, IntegerParam, FloatParam, SelectParam) + ): + if is_unlabeled: + unlabeled_parts.append(f" '${name}'") + else: + flag_parts.append(f" --{flag} '${name}'") + + # 3. OUTPUT FLAGS + for flag, info in output_command_map.items(): + if flag == "VIRTUAL_no_flag": + continue + if info.get("type") == "BASE_FILENAME": + if "directory" in flag.lower(): + flag_parts.append(f" --{flag} 'new_output'") + else: + flag_parts.append(f" --{flag} 'new_'") + else: + flag_parts.append(f" --{flag} {info['filename']}") + + final_exec_line = [executable_name] + final_exec_line.extend(flag_parts) + final_exec_line.extend(unlabeled_parts) + command_parts.extend(final_exec_line) + if not output_command_map: + command_parts[-1] += " > '$stdout_log'" + command_str = "\n".join(command_parts) + + # 4. Tool object + tool = Tool( + name=f"OGS: {tool_name}", + id=f"ogs_{tool_name.lower()}", + version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@", + description=f"Galaxy wrapper for the OGS utility '{tool_name}'.", + executable=executable_name, + macros=["macros.xml", "test_macros.xml"], + profile="22.01", + version_command=f"{executable_name} --version", + command_override=[command_str], + ) + + inputs_tag = tool.inputs = Inputs() + for param in galaxy_inputs: + inputs_tag.append(param) + + if output_command_map: + outputs_tag = tool.outputs = Outputs() + uses_base_filename = any( + info.get("type") == "BASE_FILENAME" + for info in output_command_map.values() + ) + + if uses_base_filename: + pattern = ( + r"(?P.*)\.vtu" + if "VIRTUAL_no_flag" in output_command_map + else r"(?Pnew_.*)" + ) + first_out_info = next( + info + for info in output_command_map.values() + if info.get("type") == "BASE_FILENAME" + ) + target_fmt = first_out_info.get("format", "vtkxml") + collection = OutputCollection( + name="tool_outputs", + type="list", + label=f"Outputs from {tool_name}", + ) + collection.append( + DiscoverDatasets( + pattern=pattern, format=target_fmt, visible=True + ) + ) + outputs_tag.append(collection) + else: + single_file_outputs = [ + v + for v in output_command_map.values() + if v.get("type") == "FIXED_FILE" + ] + if len(single_file_outputs) == 1 and len(output_command_map) == 1: + flag, info = list(output_command_map.items())[0] + outputs_tag.append( + OutputData( + name=sanitize_name(f"output_{tool_name}"), + format=info["format"], + from_work_dir=info["filename"], + label=f"Output from {tool_name}", + ) + ) + else: + collection = OutputCollection( + name="tool_outputs", + type="list", + label=f"Outputs from {tool_name}", + ) + collection.append( + DiscoverDatasets( + pattern=r"output_.*\.(vtu|msh|asc|gml|xml)", + format="data", + visible=True, + ) + ) + outputs_tag.append(collection) + else: + outputs_tag = tool.outputs = Outputs() + outputs_tag.append( + OutputData( + name="stdout_log", + format="txt", + label=f"Output Log from {tool_name}", + ) + ) + + tests_section = Tests() + tests_section.append(Expand(macro=f"{tool_name.lower()}_test")) + tool.tests = tests_section + tool.help = ( + f"This tool runs the **{tool_name}** utility from the OpenGeoSys suite." + ) + + # --- 5. XML + raw_xml_string = tool.export() + tool_xml_root = ET.fromstring(raw_xml_string) + inputs_node = tool_xml_root.find("inputs") + + if inputs_node is not None: + for param in galaxy_inputs: + if getattr(param, "is_data_collection", False): + p_node = inputs_node.find(f"param[@argument='--{flag}']") + if p_node is not None: + p_node.set("type", "data_collection") + p_node.set("collection_type", "list") + if "multiple" in p_node.attrib: + del p_node.attrib["multiple"] + + output_file_path = OUTPUT_DIR / f"{tool_name}.xml" + xml_str = ET.tostring(tool_xml_root, encoding="unicode") + + def version_cdata_rewrite(match): + return f"" + + xml_str = re.sub( + r"(.*?)", + version_cdata_rewrite, + xml_str, + ) + + def command_cdata_rewrite(match): + content = ( + match.group(1) + .strip() + .replace("<", "<") + .replace(">", ">") + .replace("&", "&") + ) + return f"" + + xml_str = re.sub( + r"(.*?)", + command_cdata_rewrite, + xml_str, + flags=re.DOTALL, + ) + + with open(output_file_path, "w", encoding="utf-8") as f: + f.write('\n' + xml_str) + generated_count += 1 + + eprint(f"\nFinished. {generated_count} tool wrappers created.") + + +def parse_diff_data( + diff_str: str, base_url: str, workdir: str, input_files: List[str] +) -> List[Dict[str, str]]: + diff_files = [] + seen_generated = set() + valid_exts = ( + ".vtu", + ".gml", + ".bin", + ".asc", + ".pvtu", + ".msh", + ".smesh", + ".xdmf", + ".prj", + ".xml", + ".png", + ".geo", + ) + + clean_lines = [line.split("#")[0].strip() for line in diff_str.strip().split("\n")] + tokens = (" ".join(clean_lines)).split() + + i = 0 + while i < len(tokens): + t1 = tokens[i] + if any(t1.lower().endswith(ext) for ext in valid_exts): + if i + 1 < len(tokens) and any( + tokens[i + 1].lower().endswith(ext) for ext in valid_exts + ): + t2 = tokens[i + 1] + + if t2 not in input_files and t2 not in seen_generated: + ref_url = ( + f"{base_url}/{workdir}/{t1}".replace("", workdir) + if workdir + else f"{base_url}/{t1}" + ) + diff_files.append( + { + "reference": ref_url, + "generated": t2, + "ftype": t2.split(".")[-1], + } + ) + seen_generated.add(t2) + i += 2 + continue + i += 1 + return diff_files + + +def get_dummy_value(param, tool_name, all_params=None): + URL_AREHS_TEST = "https://gitlab.opengeosys.org/kristofkessler/ogs/-/raw/ebd40a71bacd951b90b64e2e42fb8d11528bde39/Tests/Data/Utils/VoxelGridFromLayers/AREHS_test.vtu" + URL_AREHS_FAULT = "https://gitlab.opengeosys.org/kristofkessler/ogs/-/raw/ebd40a71bacd951b90b64e2e42fb8d11528bde39/Tests/Data/Utils/VoxelGridFromLayers/AREHS_fault.vtu" + URL_PVD_MAIN = "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/HydroMechanics/IdealGas/flow_pressure_boundary/flow_pressure_boundary.pvd" + URL_VTK_TEST = "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/Utils/VoxelGridFromLayers/AREHS_Layer17.vtu" + + special_tool_files = { + "ComputeNodeAreasFromSurfaceMesh": "computeNodeAreasFromSurfaceMesh_test_data", + } + if isinstance(param, DataParam): + ext = getattr(param, "ogs_ext", "vtu").lower() + if tool_name in special_tool_files: + return f"{special_tool_files[tool_name]}.{ext}" + if getattr(param, "is_pvd", False): + return URL_PVD_MAIN + if (param.name == "fault" or "fault" in param.label.lower()) and ext in [ + "vtu", + "vtk", + "msh", + ]: + return URL_AREHS_FAULT + if ext in ["vtu", "msh"]: + return URL_AREHS_TEST + if ext in ["vtk"]: + return URL_VTK_TEST + return f"test.{ext}" + + if isinstance(param, SelectParam): + opts = getattr(param, "options_dict", {}) + return list(opts.keys())[0] if opts else "value" + if isinstance(param, (IntegerParam, FloatParam)): + return "1" if isinstance(param, IntegerParam) else "1.0" + if isinstance(param, BooleanParam): + return "true" + return "dummy_text" + + +def generate_tests(): + eprint("--- Generating Final Unified Test Macros ---") + tests_cmake_url = f"{RAW_URL_ROOT}/{UTILS_PATH}/Tests.cmake" + RAW_GITLAB_TEST_DATA_URL = ( + "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data" + ) + RAW_GITLAB_PROJECT_ROOT_URL = "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master" + repo_b_index = get_repo_b_file_index() + + all_tools_data = discover_tools() + tools_map_lower = { + tool["name"].lower(): tool + for tool in all_tools_data + if tool["name"].lower() not in EXCLUDED_TOOLS + } + tool_tests_accumulator = {tool_name: [] for tool_name in tools_map_lower.keys()} + + cmake_content = fetch_url_content(tests_cmake_url) + if not cmake_content: + eprint("ERROR: Could not fetch Tests.cmake from GitLab.") + return + addtest_pattern = re.compile(r"AddTest\s*\((.*?)\s*\)(?!\s*PROPERTIES)", re.DOTALL) + + STOP_KEYWORDS = [ + "TESTER", + "RUNTIME", + "PROPERTIES", + "DEPENDS", + "REQUIREMENTS", + "DIFF_DATA", + "WRAPPER", + "WRAPPER_ARGS", + ] + + for match in addtest_pattern.finditer(cmake_content): + test_block = match.group(1) + + exec_match = re.search(r"EXECUTABLE\s+([^\s\)]+)", test_block) + matched_tool = None + if exec_match and exec_match.group(1).lower() in tools_map_lower: + matched_tool = exec_match.group(1).lower() + else: + for t in tools_map_lower.keys(): + if re.search( + r"(?:[\s/_-]|^)" + re.escape(t) + r"(?:[\s/_-]|$)", + test_block.lower(), + ): + matched_tool = t + break + + if not matched_tool or matched_tool.lower() in EXCLUDED_TOOLS: + continue + + tool_data = tools_map_lower[matched_tool] + g_inputs_temp, _ = process_parameters(tool_data["parameters"]) + has_complex_input = any( + getattr(p, "is_pvd", False) or getattr(p, "is_file_list", False) + for p in g_inputs_temp + ) + + if has_complex_input: + eprint( + f" -> Marking {matched_tool} for Dummy-Test (Complex PVD/List Input)." + ) + continue + + if tool_tests_accumulator[matched_tool]: + continue + galaxy_inputs, output_map = process_parameters(tool_data["parameters"]) + all_inputs_map = {p.name: p for p in galaxy_inputs} + + flag_map = {} + unlabeled_p = next( + (p for p in galaxy_inputs if getattr(p, "is_unlabeled", False)), None + ) + for p in galaxy_inputs: + if hasattr(p, "original_long_flag") and p.original_long_flag: + flag_map[f"--{p.original_long_flag}"] = p + if hasattr(p, "original_short_flag") and p.original_short_flag: + flag_map[f"-{p.original_short_flag}"] = p + + path_match = re.search(r"PATH\s+([^\s\)]+)", test_block) + p_rep = path_match.group(1).strip() if path_match else "" + wd_match = re.search( + r"WORKING_DIRECTORY\s+\$\{Data_SOURCE_DIR\}/([^\s\)]+)", test_block + ) + wd_sub = wd_match.group(1).replace("", p_rep).strip() if wd_match else "" + + # ARGUMENT PARSING + params_in_test = {} + input_files_in_this_test = [] + args_match = re.search(r"EXECUTABLE_ARGS\s+(.*)", test_block, re.DOTALL) + if args_match: + raw_args = args_match.group(1).split(")")[0].strip().replace("\n", " ") + norm_args = raw_args.replace(" -- ", " --SEP-- ") + try: + args_list = shlex.split(norm_args) + except: + args_list = norm_args.split() + + i = 0 + while i < len(args_list): + arg = args_list[i] + if arg.upper() in STOP_KEYWORDS: + break + + if arg in flag_map: + p = flag_map[arg] + i += 1 + if isinstance(p, BooleanParam): + params_in_test[p.name] = "true" + else: + collected_vals = [] + while ( + i < len(args_list) + and not args_list[i].startswith("-") + and args_list[i].upper() not in STOP_KEYWORDS + ): + val = ( + args_list[i] + .replace("", p_rep) + .replace("${Data_BINARY_DIR}/", "") + .split("/")[-1] + ) + if val: + collected_vals.append(val) + i += 1 + if collected_vals: + params_in_test[p.name] = ",".join(collected_vals) + continue + + elif unlabeled_p and not arg.startswith("-"): + current_unlabeled = [] + if unlabeled_p.name in params_in_test: + current_unlabeled = params_in_test[unlabeled_p.name].split(",") + + while ( + i < len(args_list) + and not args_list[i].startswith("-") + and args_list[i].upper() not in STOP_KEYWORDS + ): + val = args_list[i].replace("", p_rep).split("/")[-1] + if any( + val.lower().endswith(ext) + for ext in [ + ".pvd", + ".vtu", + ".msh", + ".gml", + ".asc", + ".nc", + ".xyz", + ] + ): + current_unlabeled.append(val) + i += 1 + if current_unlabeled: + params_in_test[unlabeled_p.name] = ",".join(current_unlabeled) + continue + + i += 1 + + # XML generation + test_case = ET.Element("test") + test_is_valid = True + test_params_xml = [] + + for p_name, p_val in params_in_test.items(): + p_obj = all_inputs_map.get(p_name) + if not p_obj: + continue + + val_clean = ( + str(p_val) + .replace("", p_rep) + .replace("${Data_BINARY_DIR}/", "") + .replace("${Data_SOURCE_DIR}/", "") + .lstrip("/") + ) + + # PVD + if getattr(p_obj, "is_pvd", False): + pvd_members = [ + v + for v in re.findall(r"([^\s/]+\.vt[ui])", test_block) + if not v.endswith(".pvd") + ] + if pvd_members: + p_pvd_name = f"{p_name}_pvd_data" + coll_param = ET.Element("param", {"name": p_pvd_name}) + coll_wrapper = ET.SubElement( + coll_param, "collection", {"type": "list"} + ) + + for v in sorted(set(pvd_members)): + url = ( + f"{RAW_GITLAB_TEST_DATA_URL}/{wd_sub}/{v}" + if wd_sub + else f"{RAW_GITLAB_PROJECT_ROOT_URL}/{v}" + ) + ET.SubElement( + coll_wrapper, + "element", + {"name": v, "value": v, "location": url, "ftype": "vtkxml"}, + ) + test_params_xml.append(coll_param) + + # Collections / INPUT_FILE_LIST + if getattr(p_obj, "is_data_collection", False): + files_to_process = val_clean.split(",") + coll_param = ET.Element("param", {"name": p_name}) + coll_wrapper = ET.SubElement(coll_param, "collection", {"type": "list"}) + + for f_path in files_to_process: + f_name = f_path.split("/")[-1] + url = ( + f"{RAW_GITLAB_TEST_DATA_URL}/{wd_sub}/{f_name}" + if wd_sub + else f"{RAW_GITLAB_PROJECT_ROOT_URL}/{f_name}" + ) + + if not url_exists(url): + search_name = f_name if "." in f_name else f"{f_name}.vtu" + if search_name in repo_b_index: + url = f"{REPO_B_RAW}/{repo_b_index[search_name]}" + f_name = search_name + else: + test_is_valid = False + break + + ET.SubElement( + coll_wrapper, + "element", + { + "name": f_name, + "value": f_name, + "location": url, + "ftype": p_obj.format.split(",")[0], + }, + ) + + if test_is_valid: + test_params_xml.append(coll_param) + + # 3. single parameter + else: + attrs = {"name": p_name} + if isinstance(p_obj, DataParam): + f_name = val_clean.split("/")[-1] + url = ( + f"{RAW_GITLAB_TEST_DATA_URL}/{wd_sub}/{f_name}" + if wd_sub + else f"{RAW_GITLAB_PROJECT_ROOT_URL}/{f_name}" + ) + if not url_exists(url): + search_name = f_name if "." in f_name else f"{f_name}.vtu" + if search_name in repo_b_index: + url = f"{REPO_B_RAW}/{repo_b_index[search_name]}" + f_name = search_name + else: + test_is_valid = False + break + attrs.update( + { + "value": f_name, + "location": url, + "ftype": p_obj.format.split(",")[0], + } + ) + else: + is_base_filename_param = any( + sanitize_name(flag) == p_name + and info.get("type") == "BASE_FILENAME" + for flag, info in output_map.items() + ) + attrs["value"] = ( + "new_" if is_base_filename_param else val_clean.split("/")[-1] + ) + + test_params_xml.append(ET.Element("param", attrs)) + + if not test_is_valid: + break + + if not test_is_valid: + continue + + for elem in test_params_xml: + val = elem.get("value") + if val and val.startswith("${") and val.endswith("}"): + p_name = elem.get("name") + p_obj = all_inputs_map.get(p_name) + if p_obj: + new_val = get_dummy_value( + p_obj, matched_tool, all_params=galaxy_inputs + ) + elem.set("value", str(new_val)) + + for xml_elem in test_params_xml: + test_case.append(xml_elem) + + # --- OUTPUT LOGIK --- + dm = re.search(r"DIFF_DATA\s+(.*?)(?=\s*\)|$)", test_block, re.DOTALL) + output_added = False + + if dm: + diff_files = parse_diff_data( + dm.group(1).strip(), + RAW_GITLAB_TEST_DATA_URL, + wd_sub, + input_files_in_this_test, + ) + if diff_files: + diff_files.sort(key=lambda x: x["generated"]) + if len(output_map) > 1 or any( + info.get("type") == "BASE_FILENAME" for info in output_map.values() + ): + coll = ET.SubElement( + test_case, + "output_collection", + {"name": "tool_outputs", "type": "list"}, + ) + for df in diff_files: + e = ET.SubElement(coll, "element", {"name": df["generated"]}) + ET.SubElement( + ET.SubElement(e, "assert_contents"), + "has_size", + {"min": "100"}, + ) + output_added = True + elif len(diff_files) == 1: + out_name = sanitize_name(f"output_{matched_tool}") + out_elem = ET.SubElement(test_case, "output", {"name": out_name}) + ET.SubElement( + ET.SubElement(out_elem, "assert_contents"), + "has_size", + {"min": "100"}, + ) + output_added = True + + # Fallback + if not output_added and output_map: + if len(output_map) > 1 or any( + info.get("type") == "BASE_FILENAME" for info in output_map.values() + ): + ET.SubElement( + test_case, + "output_collection", + {"name": "tool_outputs", "type": "list"}, + ) + else: + out_name = sanitize_name(f"output_{matched_tool}") + out_elem = ET.SubElement(test_case, "output", {"name": out_name}) + ET.SubElement( + ET.SubElement(out_elem, "assert_contents"), "has_size", {"min": "1"} + ) + + tool_tests_accumulator[matched_tool].append(test_case) + + # Build Macros + macros_root = ET.Element("macros") + for t_name, cases in tool_tests_accumulator.items(): + macro_xml = ET.SubElement(macros_root, "xml", {"name": f"{t_name}_test"}) + + if not cases: + fallback_test = ET.SubElement(macro_xml, "test") + tool_data = tools_map_lower[t_name] + g_inputs, g_outputs = process_parameters(tool_data["parameters"]) + + for p in g_inputs: + is_data_coll = getattr(p, "is_data_collection", False) + + if is_data_coll: + if getattr(p, "is_pvd_element", False): + urls = [ + "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/HydroMechanics/IdealGas/flow_pressure_boundary/flow_pressure_boundary_ts_0_t_0.000000.vtu", + "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/HydroMechanics/IdealGas/flow_pressure_boundary/flow_pressure_boundary_ts_100_t_4000.000000.vtu", + ] + elif getattr(p, "is_file_list", False) or p.name == "raster_list": + urls = [ + "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/Utils/VoxelGridFromLayers/AREHS_Layer0.vtu", + "https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/Tests/Data/Utils/VoxelGridFromLayers/AREHS_Layer15.vtu", + ] + else: + urls = [get_dummy_value(p, t_name, all_params=g_inputs)] + + coll_node = ET.SubElement(fallback_test, "param", {"name": p.name}) + coll_wrapper = ET.SubElement( + coll_node, "collection", {"type": "list"} + ) + for url in urls: + filename = url.split("/")[-1] + ET.SubElement( + coll_wrapper, + "element", + { + "name": filename, + "value": filename, + "location": url, + "ftype": "vtkxml", + }, + ) + continue + + # Standard parameter + is_mandatory = getattr(p, "optional", True) is False + if ( + is_mandatory + or isinstance(p, DataParam) + or isinstance(p, SelectParam) + ): + val_str = get_dummy_value(p, t_name, all_params=g_inputs) + is_ext = str(val_str).startswith("http") + clean_val = val_str.split("/")[-1] if is_ext else val_str + attrs = {"name": p.name, "value": clean_val} + if isinstance(p, DataParam): + attrs["ftype"] = p.format.split(",")[0] + if is_ext: + attrs["location"] = val_str + ET.SubElement(fallback_test, "param", attrs) + + # Outputs + if g_outputs: + if len(g_outputs) > 1 or any( + info.get("type") == "BASE_FILENAME" for info in g_outputs.values() + ): + ET.SubElement( + fallback_test, + "output_collection", + {"name": "tool_outputs", "type": "list"}, + ) + else: + out_n = sanitize_name(f"output_{t_name}") + out_tag = ET.SubElement(fallback_test, "output", {"name": out_n}) + ET.SubElement( + ET.SubElement(out_tag, "assert_contents"), + "has_size", + {"min": "1"}, + ) + + else: + out_tag = ET.SubElement(fallback_test, "output", {"name": "stdout_log"}) + ac = ET.SubElement(out_tag, "assert_contents") + ET.SubElement(ac, "has_size", {"min": "1"}) + else: + for case in cases: + macro_xml.append(case) + + tree = ET.ElementTree(macros_root) + ET.indent(tree, space=" ") + with open("test_macros.xml", "wb") as f: + f.write(b'\n') + tree.write(f, encoding="utf-8", xml_declaration=False) + + +def main(): + parser = argparse.ArgumentParser( + description="Galaxy XML Wrapper Generator for OGS Utilities" + ) + parser.add_argument( + "--generate-tools", + action="store_true", + help="Generate individual tool XML wrappers (default action).", + ) + parser.add_argument( + "--generate-tests", + action="store_true", + help="Generate a single test_macros.xml file for all tools.", + ) + + args = parser.parse_args() + + if args.generate_tests: + generate_tests() + else: + generate_tools(Path("/home/berntm/projects/gitlab.opengeosys.org/ogs")) + + +if __name__ == "__main__": + main() diff --git a/tools/ogsAutowrap/generateGeometry.xml b/tools/ogsAutowrap/generateGeometry.xml new file mode 100644 index 00000000..93f43e8c --- /dev/null +++ b/tools/ogsAutowrap/generateGeometry.xml @@ -0,0 +1,46 @@ + + + Galaxy wrapper for the OGS utility 'generateGeometry'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **generateGeometry** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/generateMatPropsFromMatID.xml b/tools/ogsAutowrap/generateMatPropsFromMatID.xml new file mode 100644 index 00000000..2dad0d6e --- /dev/null +++ b/tools/ogsAutowrap/generateMatPropsFromMatID.xml @@ -0,0 +1,28 @@ + + + Galaxy wrapper for the OGS utility 'generateMatPropsFromMatID'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + This tool runs the **generateMatPropsFromMatID** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/generateStructuredMesh.xml b/tools/ogsAutowrap/generateStructuredMesh.xml new file mode 100644 index 00000000..1df2dc97 --- /dev/null +++ b/tools/ogsAutowrap/generateStructuredMesh.xml @@ -0,0 +1,64 @@ + + + Galaxy wrapper for the OGS utility 'generateStructuredMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **generateStructuredMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/geometryToGmshGeo.xml b/tools/ogsAutowrap/geometryToGmshGeo.xml new file mode 100644 index 00000000..32afb449 --- /dev/null +++ b/tools/ogsAutowrap/geometryToGmshGeo.xml @@ -0,0 +1,45 @@ + + + Galaxy wrapper for the OGS utility 'geometryToGmshGeo'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + This tool runs the **geometryToGmshGeo** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/identifySubdomains.xml b/tools/ogsAutowrap/identifySubdomains.xml new file mode 100644 index 00000000..ec84d5f3 --- /dev/null +++ b/tools/ogsAutowrap/identifySubdomains.xml @@ -0,0 +1,41 @@ + + + Galaxy wrapper for the OGS utility 'identifySubdomains'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + This tool runs the **identifySubdomains** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/ipDataToPointCloud.xml b/tools/ogsAutowrap/ipDataToPointCloud.xml new file mode 100644 index 00000000..53dc8185 --- /dev/null +++ b/tools/ogsAutowrap/ipDataToPointCloud.xml @@ -0,0 +1,27 @@ + + + Galaxy wrapper for the OGS utility 'ipDataToPointCloud'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + This tool runs the **ipDataToPointCloud** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/macros.xml b/tools/ogsAutowrap/macros.xml new file mode 100644 index 00000000..846c7858 --- /dev/null +++ b/tools/ogsAutowrap/macros.xml @@ -0,0 +1,26 @@ + + + + ogs + + + 6.5.7 + 0 + + + + @misc{ogs, + author = {The OpenGeoSys Community}, + title = {OpenGeoSys}, + doi = {10.5281/zenodo.15496721}, + url = {http://www.opengeosys.org}, + note = {https://doi.org/10.5281/zenodo.15496721} + } + + + + + + + + \ No newline at end of file diff --git a/tools/ogsAutowrap/postLIE.xml b/tools/ogsAutowrap/postLIE.xml new file mode 100644 index 00000000..d0ef8f38 --- /dev/null +++ b/tools/ogsAutowrap/postLIE.xml @@ -0,0 +1,33 @@ + + + Galaxy wrapper for the OGS utility 'postLIE'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + This tool runs the **postLIE** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/queryMesh.xml b/tools/ogsAutowrap/queryMesh.xml new file mode 100644 index 00000000..5190ea15 --- /dev/null +++ b/tools/ogsAutowrap/queryMesh.xml @@ -0,0 +1,32 @@ + + + Galaxy wrapper for the OGS utility 'queryMesh'. + + macros.xml + test_macros.xml + + + + '$stdout_log' +]]> + + + + + + + + + + + + This tool runs the **queryMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/removeMeshElements.xml b/tools/ogsAutowrap/removeMeshElements.xml new file mode 100644 index 00000000..9dfd46de --- /dev/null +++ b/tools/ogsAutowrap/removeMeshElements.xml @@ -0,0 +1,54 @@ + + + Galaxy wrapper for the OGS utility 'removeMeshElements'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This tool runs the **removeMeshElements** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/reviseMesh.xml b/tools/ogsAutowrap/reviseMesh.xml new file mode 100644 index 00000000..8db29db6 --- /dev/null +++ b/tools/ogsAutowrap/reviseMesh.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'reviseMesh'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **reviseMesh** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/scaleProperty.xml b/tools/ogsAutowrap/scaleProperty.xml new file mode 100644 index 00000000..e902056d --- /dev/null +++ b/tools/ogsAutowrap/scaleProperty.xml @@ -0,0 +1,35 @@ + + + Galaxy wrapper for the OGS utility 'scaleProperty'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + + + + + + This tool runs the **scaleProperty** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/swapNodeCoordinateAxes.xml b/tools/ogsAutowrap/swapNodeCoordinateAxes.xml new file mode 100644 index 00000000..0d555a4d --- /dev/null +++ b/tools/ogsAutowrap/swapNodeCoordinateAxes.xml @@ -0,0 +1,29 @@ + + + Galaxy wrapper for the OGS utility 'swapNodeCoordinateAxes'. + + macros.xml + test_macros.xml + + + + + + + + + + + + + + This tool runs the **swapNodeCoordinateAxes** utility from the OpenGeoSys suite. + + \ No newline at end of file diff --git a/tools/ogsAutowrap/test-data/test.asc b/tools/ogsAutowrap/test-data/test.asc new file mode 100644 index 00000000..53855cda --- /dev/null +++ b/tools/ogsAutowrap/test-data/test.asc @@ -0,0 +1,45 @@ +ncols 20 +nrows 39 +xllcorner 406775 +yllcorner 5.61523e+06 +cellsize 904.674 +NODATA_value -9999 +-9999 -9999 -9999 1.9 3 4.2 9.7 10.3 14.3 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 +-9999 -9999 -9999 2.8 3.3 6.3 10.5 9.9 15.7 24.5 30.4 41.8 43.4 39 16.1 13.6 11.9 17.2 14.9 14.1 +-9999 -9999 -9999 2.3 2.6 3.1 8.6 10.9 14.6 28.7 55.5 37.8 30.5 39.3 19.8 14.5 17.6 21.6 13.4 12.9 +-9999 -9999 -9999 2.9 3.8 5.3 5.6 7.5 20 22.4 36.4 24.1 15.1 20 19 16.9 29.7 31.7 26.8 23.5 +-9999 -9999 -9999 2.8 3.6 10.8 9.2 9.4 21.1 32.3 38.6 22.2 36.6 37.8 24.6 12.5 26.4 29.2 26.8 31.8 +-9999 -9999 -9999 3.4 4.5 5.9 11.3 16.3 22.6 27.1 32.5 30.6 34.4 27.7 36.4 17.3 17.1 21.8 27.4 36.1 +-9999 -9999 -9999 3.3 4.5 5.2 7.7 14.2 16.2 28 16.6 25.4 26.1 30.5 35.8 40.4 21.4 24.1 30.8 46.6 +-9999 -9999 -9999 3.4 6.1 6.3 8.9 9.7 19 19.5 19.1 15.6 34.4 25.6 28 29.7 24 28.1 33.7 49.2 +-9999 -9999 6.2 8.1 9.4 14.5 12.1 18.8 16 29.4 24.7 22.3 26.9 25.6 31.1 31.1 28.4 31.6 27.8 36.5 +-9999 -9999 4 5 7.3 17.7 17.1 17.3 18.4 25.2 24.1 21.9 33.7 42.3 33.3 32.9 28.3 26.2 26.8 -9999 +-9999 -9999 4.2 4.7 4.9 12.4 13.7 16.4 14.7 24.4 24.4 24.6 34.4 43.9 40.8 33 29.5 18.4 39.9 -9999 +-9999 -9999 3.5 5.4 7.1 14.2 15.2 16.9 16 16.7 16.9 32.9 40.3 42.1 33.7 26.5 22.6 21 29.7 -9999 +-9999 -9999 3.6 8.5 13.8 17 16.3 17.3 13.5 18.3 22.8 40.7 30.7 30.2 28.6 24.9 15.4 17.6 19.6 -9999 +-9999 -9999 3.4 4.9 9.5 10.4 12.3 15.1 17.6 17.1 44.2 35.3 38.7 25.4 20.4 24 19.7 18.5 13.4 -9999 +-9999 -9999 3.5 5.3 7.1 10.2 12 27.4 32.2 24.2 29.5 35 31.6 29.3 26.4 17.9 24.1 11.7 9.2 -9999 +-9999 -9999 3.4 4 6.3 10.7 15.9 18.4 27.1 36.9 27.5 22.8 27.1 23.8 21.5 24.3 10.8 10.6 8.5 -9999 +-9999 -9999 4.3 4.1 6.4 7.5 13.4 19.9 27.1 37.8 24.8 19.6 21.1 30 18.8 14.1 11.1 6.4 8 -9999 +-9999 -9999 3.6 7 6.8 8.9 19 29.2 25.1 27.5 19.3 19.8 23.1 27.5 27.5 11.5 11.1 6.6 3.7 -9999 +-9999 -9999 3.7 6 10.1 16.6 20.8 33.9 21 23.9 16.8 20.4 23.8 22.7 12.8 8.2 7.4 4.3 3.8 -9999 +-9999 -9999 4.7 6.3 9.9 14.3 25.3 25.2 32.4 41 37.7 24.7 26.6 15.7 8.5 5.3 4.2 4.2 3.1 -9999 +-9999 5.5 6.4 7.9 10 18.5 21.2 28.5 26.6 30.5 21.1 32.8 13.8 7.2 7.2 4.6 3.4 2.9 1.7 -9999 +-9999 6.5 7.9 11.7 15.3 19.8 19 36.6 26.1 24.8 22.7 28.4 10.9 8 2.4 2.5 1.8 1.4 -9999 -9999 +-9999 6.6 8 11.5 18.3 26.4 23.5 31.6 35 22.4 20.9 27.5 13.5 6.4 3 1.1 0.7 0.8 -9999 -9999 +-9999 7.8 8.8 12.3 18.1 32.4 36.2 37.1 41 31.6 28 31.9 10.4 8.6 5 2.7 0.6 0.3 -9999 -9999 +-9999 12 11.1 15.3 17.8 29.2 34.8 27 35.7 26.2 29.1 25.7 15.2 8.2 7 2.8 1.4 0.4 -9999 -9999 +-9999 13.5 16.5 14.8 20.3 29.8 31 22 28.8 26.7 30.5 19.9 12.4 4.2 2.5 2.3 1.2 0.6 -9999 -9999 +-9999 13.1 16.1 22.3 24.3 36.8 32 29.8 24.9 27.4 26.9 10.2 8.3 6.3 2.4 1.2 0.9 0.4 -9999 -9999 +-9999 13.7 16.1 22 26.8 38.6 30.8 30.1 36.3 28 33 18.8 10.5 4.1 2.9 1.6 0.8 0.4 -9999 -9999 +-9999 18.2 19.4 24.3 26 31.5 32.3 24.6 36.1 29.6 27.9 22.1 11.5 6 2.9 1.4 0.4 0.2 -9999 -9999 +-9999 16.6 18.5 25.8 31.1 31.5 31.8 29.4 31.4 25.3 23.4 12.6 9.8 5.4 1.3 0.8 0.6 0.2 -9999 -9999 +-9999 18 26.7 33.4 32.5 27.8 25.7 28.7 32 26.3 14.9 9.9 6.5 3.4 2.1 0.5 0.4 0.1 -9999 -9999 +-9999 30.5 35.7 41.8 35.1 23.6 25.5 25.9 23 18.6 25.6 10.5 4.7 2.4 2 1.2 0.4 0.3 -9999 -9999 +27.9 35.8 35.5 31 29.2 28.1 31.9 33.7 26.6 17.2 13.4 6.8 3.2 3.2 1.9 1.4 0.9 0.7 -9999 -9999 +24.3 30.2 35 30.7 31.5 24.9 26.7 22.7 22.5 8 4.5 4.5 2.8 1 0.5 0.8 0.7 -9999 -9999 -9999 +32.1 32.8 38.6 33.4 32.1 27.8 34.8 24.7 16.1 16.4 4.8 4.5 2.3 1 0.7 0.7 0.6 -9999 -9999 -9999 +34.9 34.2 25.7 25.9 24.2 20.5 24.7 18.2 15.7 17.5 14.7 4.9 1.6 1.2 0.7 0.6 1.1 -9999 -9999 -9999 +31.6 27.7 23.7 24 22.1 21.3 24.7 11.1 11.3 9 10.6 6.1 1.7 1.3 0.9 1.8 1.6 -9999 -9999 -9999 +30.2 23.1 29.4 26.7 26.5 22.9 20.4 10.9 6.2 5.8 6.3 5.9 2.7 1.3 1.3 1.4 1.1 -9999 -9999 -9999 +-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 5.4 6.8 6.1 5.9 2.8 1.4 1.6 1.4 1.7 -9999 -9999 -9999 diff --git a/tools/ogsAutowrap/test-data/test.bin b/tools/ogsAutowrap/test-data/test.bin new file mode 100644 index 00000000..0b38b2f3 --- /dev/null +++ b/tools/ogsAutowrap/test-data/test.bin @@ -0,0 +1 @@ +head -c 100 /dev/urandom \ No newline at end of file diff --git a/tools/ogsAutowrap/test-data/test.fem b/tools/ogsAutowrap/test-data/test.fem new file mode 100644 index 00000000..fb700a54 --- /dev/null +++ b/tools/ogsAutowrap/test-data/test.fem @@ -0,0 +1,832 @@ +PROBLEM: +CLASS (v.7.007.14984) + 2 1 0 3 1 0 8 8 0 0 +DIMENS + 12 2 8 1 0 0 0 0 0 2 0 0 1 0 0 0 0 +SCALE + 3.44328703703704e-03, 4.40740740740741e+00, 1.00000000000000e+00, 1.00000000000000e+00,-1.98821548821549e+00,-9.96969696969697e+00 +NODE + 4 5 6 3 10 11 12 9 + 3 6 1 2 9 12 7 8 +COOR + 2.74410774410774e+00, 2.18855218855219e+00, 3.89730639730640e+00, 5.60606060606061e+00, 6.19528619528620e+00, 4.46969696969697e+00, + 1.30808080808081e+01, 1.09595959595960e+01, 1.05387205387205e+01, 1.01178451178451e+01, 1.24074074074074e+01, 1.27441077441077e+01, +ELEV_I + 0.00000000000000e+00 1-6 +2 + -1.00000000000000e+01 1-6 +GK_COOR +1.98821548821549,9.96969696969697 +EXTENTS + 1.98821548821549e+00, 9.96969696969697e+00, 6.39562289562290e+00, 1.32289562289562e+01, + 0.00000000000000e+00, 0.00000000000000e+00, 3.56000000000000e+04, 2.84800000000000e+04, +FLOW_I_BC +INIT_I_FLOW + 0.00000000000000e+00 1-12 +MAT_I_FLOW +101 1.000000e+00 "K_xx" + 1.000000e+00 1 2 +103 1.000000e+00 "K_yy" + 1.000000e+00 1 2 +105 1.000000e+00 "K_zz" + 1.000000e+00 1 2 +107 0.000000e+00 "In/outflow on top/bottom" + 0.000000e+00 1 2 +109 0.000000e+00 "Density ratio" + 0.000000e+00 1 2 +110 2.000000e-01 "Drain-/fillable porosity" + 2.000000e-01 1 2 +112 1.000000e-04 "Specific storage (compressibility)" + 1.000000e-04 1 2 +113 0.000000e+00 "Source/sink (fluid)" + 0.000000e+00 1 2 +114 0.000000e+00 "In-transfer rate (fluid)" + 0.000000e+00 1 2 +115 0.000000e+00 "Out-transfer rate (fluid)" + 0.000000e+00 1 2 +134 0.000000e+00 "Phi" + 0.000000e+00 1 2 +135 0.000000e+00 "Psi" + 0.000000e+00 1 2 +136 0.000000e+00 "Theta" + 0.000000e+00 1 2 +TINI +0 +STEPS2 +0,0.001,365 +GOBS +GRAVITY + 0 0 -1 +PROJGRAVITY +-1 0 +ERROR_NORM +2 +PHYSICS +1,0,0,1,1,0,1,12, 1.010000e-03,0, 1.000000e-03,0,0,0,1,0 +OPTIONS + SkipMeshFill=false + SkipMeshDraw=false + BackingStore=false + + OpaqueFringeMode=false + LegendViewMode=false + VelocityApproximationType=0 + EquationSolverType=12 + IterSymmType=0 + IterNonsymmType=4 + DirectSolverType=1 + PreconditionSymmType=0 + MaxNumbOrthogonal=5 + ReorderingMethod=1 + RecordCPU=false + HideVelocity=false + VelocityType=0 + GeoCS= + SubdivisionCurvedEdges=32 + ShowOverview=true + ShowMeshWindow=true + TimeUnit=0 + SpatialIndexing=false + MinimalSliceDistance=0.1 + UseUnsmoothVelocityField=false + UnsatFractureMode=1 + ComputeIterativeSolverResiduals=0 + SkipOutputSteps=1 + UseAsComputationalSteps=false + UseAsOutputSteps=false + SmoothingIterations=10 + SmoothingMethod=0 + rho_0=999793 +SYMSOLV +0 +0, 1.000000e-10 +200,300,500,1000,5000 +NONSYMSOLV +4 + 1.000000e-10 +200,300,500,1000,5000 +SOLVERDUMP + enabled=0, ascii=0, time=0, once=0 + +SUPERMESH + + + + 1 2.74410774410774 13.0808080808081 + 2 6.1952861952862 12.4074074074074 + 4 5.60606060606061 10.1178451178451 + 8 2.18855218855219 10.959595959596 + + + 3 3.8973063973064 10.5387205387205 + 5 2.46632996632997 12.020202020202 + 6 5.9006734006734 11.2626262626263 + 7 4.46969696969697 12.7441077441077 + + + + + + + + + 1 5 8 3 4 6 2 7 + + + + +EXPRDISTR + + + + + No_n + + +CLIENT + + + + + +CLIENT + + + + + 0025802d022d4117ff + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Orientation Icon + Length Scale + + + + + + + + + + + + + + + +
00000000
+
00000000
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + Simulation Time + Length Scale + + + + + + + + + + + + + + + +
00000000
+
00000000
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + Orientation Icon + Simulation Time + + + + + + + + + + + + + + + + +
00000000
+
00000000
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+CLIENT + + + + + + + + + + + + +