comparison ogs_simulation.xml @ 0:ce3d848dff57 draft default tip

planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/ogs/ commit 8d522c2d14b28a4df096a5a13cd800bbf086f09f
author ufz
date Thu, 06 Mar 2025 17:29:42 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ce3d848dff57
1 <tool id="ogs_simulation" name="OGS" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>
3 Runs an OGS simulation
4 </description>
5 <macros>
6 <import>macros.xml</import>
7 <token name="@VERSION_SUFFIX@">0</token>
8 </macros>
9 <requirements>
10 <expand macro="ogs_requirement"/>
11 </requirements>
12 <expand macro="creator"/>
13 <command detect_errors="exit_code"><![CDATA[
14 #import re
15
16 ln -s '$project_file' main_file.prj &&
17 #for $f in $project_files:
18 #set $identifier= re.sub(r'[^\w\-.]', '_', $f.element_identifier)
19 ln -s '$f' '$identifier' &&
20 #end for
21 #for $file in $xml_patch_files:
22 #set $identifier= re.sub(r'[^\w\-.]', '_', $file.element_identifier)
23 ln -s '$file' '$identifier' &&
24 #end for
25
26 ogs main_file.prj
27 #if $log_level:
28 --log-level '${log_level}'
29 #end if
30
31 #for $file in $xml_patch_files:
32 #set $identifier= re.sub(r'[^\w\-.]', '_', $file.element_identifier)
33 --xml-patch '$identifier'
34 #end for
35 -o output
36 ]]></command>
37 <inputs>
38 <param name="project_file" format="prj" type="data" label="Project File"/>
39 <param name="project_files" format="data" type="data_collection" collection_type="list" label="Project Files"/>
40 <param name="xml_patch_files" format="xml" type="data_collection" collection_type="list" label="XML Patch Files"/>
41 <param name="log_level" type="select" label="Log Level" optional="true">
42 <option value="none">None</option>
43 <option value="error">Error</option>
44 <option value="warn">Warning</option>
45 <option value="info" selected="true">Info</option>
46 <option value="debug">Debug</option>
47 <option value="all">All</option>
48 </param>
49 </inputs>
50 <outputs>
51 <collection name="simulation_results" type="list">
52 <discover_datasets pattern="(?P&lt;designation&gt;.*\.pvd)" directory="output" visible="true"/>
53 <discover_datasets pattern="(?P&lt;designation&gt;.*\.vtu)" format="vtkxml" directory="output" visible="true"/>
54 </collection>
55 </outputs>
56 <tests>
57 <test>
58 <param name="project_file" value="square_1e0_neumann.prj" />
59 <param name="project_files">
60 <collection type="list">
61 <element name="square_1x1_quad_1e0.vtu" value="square_1x1_quad_1e0.vtu"/>
62 <element name="square_1x1.gml" value="square_1x1.gml"/>
63 </collection>
64 </param>
65 <param name="xml_patch_files">
66 <collection type="list">
67 <element name="square_1e0.xml" value="square_1e0.xml" ftype="xml"/>
68 <element name="square_neumann.xml" value="square_neumann.xml" ftype="xml"/>
69 </collection>
70 </param>
71 <param name="log_level" value="info" />
72 <output_collection name="simulation_results" type="list" count="3">
73 <element name="square_1e0_neumann_neumann.pvd">
74 <assert_contents>
75 <has_text text="VTKFile type=&quot;Collection&quot;" />
76 <has_n_lines min="5" max="7"/>
77 </assert_contents>
78 </element>
79 <element name="square_1e0_neumann_neumann_ts_0_t_0.000000.vtu">
80 <assert_contents>
81 <has_text text="VTKFile type=&quot;UnstructuredGrid&quot;" />
82 <has_n_lines min="23" max="27"/>
83 </assert_contents>
84 </element>
85 <element name="square_1e0_neumann_neumann_ts_1_t_1.000000.vtu">
86 <assert_contents>
87 <has_text text="VTKFile type=&quot;UnstructuredGrid&quot;"/>
88 <has_n_lines min="23" max="27"/>
89 </assert_contents>
90 </element>
91
92 </output_collection>
93 </test>
94 </tests>
95
96 <help><![CDATA[
97 **Overview:**
98
99 This tool runs an OpenGeoSys (OGS) simulation with support for Python boundary conditions and enhanced CLI argument parsing. The simulation uses a project file and optional XML patch files to define and adjust simulation parameters dynamically.
100
101 **Inputs:**
102
103 1. **Project File:** The main project file (.prj) that defines the simulation setup.
104 2. **Project Files:** The files mentioned in the Project File (.prj).
105 3. **XML Patch Files:** Optional XML files for modifying the project file configuration at runtime.
106 4. **Log Level:** Sets the verbosity of logs. Options include `none`, `error`, `warn`, `info` (default), `debug`, and `all`.
107
108 **Outputs:**
109
110 1. **Log File:** Contains all log messages generated during the simulation.
111 2. **Simulation Results:** Includes output files such as VTU and other simulation results saved in the specified output directory.
112 ]]></help>
113 <expand macro="ogs_citation"/>
114 </tool>