comparison copernicusmarine.xml @ 3:87ae77f2bd5a draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean commit ecc01d1975d2a603ece634c6cfe2d9591b307cc8
author ecology
date Thu, 20 Mar 2025 14:49:58 +0000
parents c07f11d8e49a
children
comparison
equal deleted inserted replaced
2:c07f11d8e49a 3:87ae77f2bd5a
1 <tool id="copernicusmarine" name="Copernicus Marine Data Store" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01" license="MIT"> 1 <tool id="copernicusmarine" name="Copernicus Marine Data Store" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01" license="MIT">
2 <description>retrieve marine data</description> 2 <description>retrieve marine data</description>
3 <macros> 3 <macros>
4 <token name="@TOOL_VERSION@">1.3.3</token> 4 <token name="@TOOL_VERSION@">1.3.3</token>
5 <token name="@VERSION_SUFFIX@">1</token> 5 <token name="@VERSION_SUFFIX@">2</token>
6 </macros> 6 </macros>
7 <requirements> 7 <requirements>
8 <requirement type="package" version="@TOOL_VERSION@">copernicusmarine</requirement> 8 <requirement type="package" version="@TOOL_VERSION@">copernicusmarine</requirement>
9 </requirements> 9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 #import re 11 bash '$cmems_credentials' &&
12 #set $cmems_username = $__user__.extra_preferences.get('cmems_account|cmems_username', "")
13 #set $cmems_password = $__user__.extra_preferences.get('cmems_account|cmems_password', "")
14
15 #if $cmems_username == "" or $cmems_password == ""
16 #set $cmems_username = os.getenv('CMEMS_USERNAME', '')
17 #set $cmems_password = os.getenv('CMEMS_PASSWORD', '')
18
19 echo "Using global ENVs" &&
20
21 #if re.match(r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$", $cmems_password):
22 echo "Password meets the required criteria" &&
23 #else:
24 echo "Password does not meet the required criteria" &&
25 #end if
26
27 #end if
28
29 #if $cmems_username == ""
30 echo 'Error. Set your CMEMS credentials via: User -> Preferences -> Manage Information' &&
31 #end if
32 12
33 #set $filename="config_file_with_my_command" 13 echo -e '$input_text' > config_file_with_my_command &&
34 echo -e '$input_text' > $filename --force-download --username $cmems_username --password $cmems_password && 14 python '$__tool_directory__/check.py' 'config_file_with_my_command'
35
36 python '$__tool_directory__/check.py' $filename
37 ]]></command> 15 ]]></command>
38 <configfiles> 16 <configfiles>
39 <configfile name="cmems_credentials"> 17 <configfile name="cmems_credentials">
40 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "") 18 #import os
41 #set $cmems_password = $__user__.extra_preferences.get('cmems_password', "") 19 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "")
42 cmems_username: $cmems_username 20 #set $cmems_password = $__user__.extra_preferences.get('cmems_password', "")
43 cmems_password: $cmems_password 21 #if $cmems_username == "" or $cmems_password == ""
22 #set $cmems_username = os.getenv('CMEMS_USERNAME', '')
23 #set $cmems_password = os.getenv('CMEMS_PASSWORD', '')
24 #end if
25 export cmems_username='$cmems_username'
26 export cmems_password='$cmems_password'
44 </configfile> 27 </configfile>
45 </configfiles> 28 </configfiles>
46 <inputs> 29 <inputs>
47 <param name="input_text" label="Paste API Request" type="text" area="true"> 30 <param name="input_text" label="Paste API Request" type="text" area="true">
48 <sanitizer invalid_char=""> 31 <sanitizer invalid_char="">