changeset 2:6d0c0961ae13 draft

planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/aarnet_filesender commit c8e1e0914854bf50287ea4b9ee86dfeb747a3342
author galaxy-australia
date Mon, 21 Oct 2024 23:12:46 +0000
parents 17787c79af44
children 8a4b0f14aa4e
files README.rst aarnet_filesender.xml filesender.xml macros.xml
diffstat 4 files changed, 126 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst	Mon Oct 21 23:12:46 2024 +0000
@@ -0,0 +1,26 @@
+FileSenderCLI  wrapper
+======================
+
+Galaxy wrapper of the AARNET
+`filesender <https://support.aarnet.edu.au/hc/en-us/articles/230067927-Send-files-with-FileSender>`__.
+
+Setting up credentials on Galaxy
+--------------------------------
+
+The admin can enable users to set their own credentials
+for this tool. To enable it, make sure the file
+``config/user_preferences_extra_conf.yml`` has the following section:
+
+.. code-block:: yaml
+
+    aarnet_filesender_account:
+        description: AARNet FileSender Account Info
+        inputs:
+            - name: username
+              label: AARNet FileSender Username
+              type: text
+              required: False
+            - name: apikey
+              label: AARNet FileSender API Key
+              type: password
+              required: False
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/aarnet_filesender.xml	Mon Oct 21 23:12:46 2024 +0000
@@ -0,0 +1,99 @@
+<tool id="aarnet_filesender" name="AARNet FileSender" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>transfer files with AARNet's FileSender Service</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="version_command"/>
+    <command detect_errors="exit_code"><![CDATA[
+#if $test != "":
+    filesender -h &&
+    exit 0;
+#end if
+
+#set $apiuser = $__user__.extra_preferences.get('aarnet_filesender_account|username', "").strip()
+#set $apikey = $__user__.extra_preferences.get('aarnet_filesender_account|apikey', "").strip()
+
+#if $apiuser == "" or $apikey == "":
+    echo "ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section" >&2 &&
+    exit 1;
+#end if
+
+#if $to == "":
+    echo "WARNING: recipent email not set, setting to $__user_email__" &&
+    #set $to = $__user_email__
+#end if
+
+mkdir filestosend &&
+
+#for $file in $data
+    if [ -f "filestosend/${file.element_identifier}" ]; then
+        echo "ERROR: two datasets have the same name (${file.element_identifier})" &&
+        exit 1;
+    fi &&
+    ln -s "$file" "filestosend/${file.element_identifier}" &&
+#end for
+
+filesender -p -u '$apiuser' -a '$apikey' -b https://filesender.aarnet.edu.au/rest.php -f '$__user_email__' -r '$to' -s 'Data sent from Galaxy' filestosend >$output 2>&1
+    ]]></command>
+    <inputs>
+        <param name="data" type="data" format="data" multiple="true" optional="false" label="Datasets to be sent:"/>
+        <param name="to" type="text" optional="true" label="Email address of recipent:">
+            <sanitizer sanitize="False"/>
+        </param>
+        <param name="test" type="hidden" value=""/>
+    </inputs>
+    <outputs>
+        <data name="output" format="txt" hidden="false"/>
+    </outputs>
+    <tests>
+        <test expect_exit_code="1" expect_failure="true">
+            <param name="data" value="summary_statistics.txt"/>
+            <assert_stderr>
+                <has_text text="ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section"/>
+            </assert_stderr>
+        </test>
+        <test>
+            <param name="data" value="summary_statistics.txt"/>
+            <param name="test" value="true"/>
+            <assert_stdout>
+                <has_text text="File Sender CLI client"/>
+            </assert_stdout>
+        </test>
+    </tests>
+    <help>
+        **What it does**
+
+        Uses `AARNet’s FileSender service`_ to send dataset(s) from Galaxy. The
+        recipient will receive an email with a link to download the files.
+        
+        **Who can use it**
+        
+        AARNet FileSender is available to all institutions affiliated with the
+        `Australian Access Federation (AAF)`_. You can use your institution
+        login details to access and use FileSender.
+        
+        **How to connect your Galaxy account to FileSender**
+        
+        To send files from Galaxy you will need to connect your Galaxy account
+        to FileSender. This is done by entering your FileSender API key into your
+        Galaxy user preferences.
+        
+        1. Log in to FileSender, and copy your API key from the “API Secret” section on the FileSender “My
+           Profile” page. See the `AARNet Knowledge Base`_ for more information.
+        2. In Galaxy, add your API key to the “AARNet FileSender API Key” field
+           in User &gt; Preferences &gt; Manage Information. Your AARNet FileSender
+           Username is the email address you used to log in to FileSender.
+        
+        .. _AARNet’s FileSender service: https://filesender.aarnet.edu.au
+        .. _Australian Access Federation (AAF): https://aaf.edu.au/subscribers/
+        .. _AARNet Knowledge Base: https://support.aarnet.edu.au/hc/en-us/articles/235972948-FileSender-API
+    </help>
+    <citations>
+        <citation type="bibtex">
+           @misc{FileSenderCLI_github,
+           title={FileSenderCLI Github page},
+           url = {https://github.com/madsi1m/FileSenderCLI},}
+        </citation>
+    </citations>
+</tool>
--- a/filesender.xml	Mon Oct 07 04:49:30 2024 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-<tool id="aarnet_filesender" name="AARNet FileSender" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
-    <description>transfer files to AARNet's FileSender Service</description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements"/>
-    <expand macro="version_command"/>
-    <command detect_errors="exit_code"><![CDATA[
-#if $test != "":
-    filesender -h &&
-    exit 0;
-#end if
-
-#set $apiuser = $__user__.extra_preferences.get('aarnet_filesender_account|username', "").strip()
-#set $apikey = $__user__.extra_preferences.get('aarnet_filesender_account|apikey', "").strip()
-
-#if $apiuser == "" or $apikey == "":
-    echo "ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section" >&2 &&
-    exit 1;
-#end if
-
-#if $to == "":
-    echo "WARNING: recipent email not set, setting to $__user_email__" &&
-    #set $to = $__user_email__
-#end if
-
-mkdir filestosend &&
-
-#for $file in $data
-    if [ -f "filestosend/${file.element_identifier}" ]; then
-        echo "ERROR: two datasets have the same name (${file.element_identifier})" &&
-        exit 1;
-    fi &&
-    ln -s "$file" "filestosend/${file.element_identifier}" &&
-#end for
-
-filesender -p -u '$apiuser' -a '$apikey' -b https://filesender.aarnet.edu.au/rest.php -f "galaxy-no-reply@usegalaxy.org.au" -r '$to' filestosend >$output 2>&1
-    ]]></command>
-    <inputs>
-        <param name="data" type="data" format="txt,data" multiple="true" optional="false" label="Datasets to be sent:"/>
-        <param name="to" type="text" optional="true" label="Email address of recipent:">
-            <sanitizer sanitize="False"/>
-        </param>
-        <param name="test" type="hidden" value=""/>
-    </inputs>
-    <outputs>
-        <data name="output" format="txt" hidden="false"/>
-    </outputs>
-    <tests>
-        <test expect_exit_code="1" expect_failure="true">
-            <param name="data" value="summary_statistics.txt"/>
-            <assert_stderr>
-                <has_text text="ERROR: Please enter your FileSender Username in your user preferences under the AARNet FileSender Account Info section"/>
-            </assert_stderr>
-        </test>
-        <test>
-            <param name="data" value="summary_statistics.txt"/>
-            <param name="test" value="true"/>
-            <assert_stdout>
-                <has_text text="File Sender CLI client"/>
-            </assert_stdout>
-        </test>
-    </tests>
-    <help>
-**What it does**
-        Send dataset(s) from Galaxy to anyone via AARNet's FileSender service.
-
-**Remarks**
-        This tool leverages AARNet's FileSender (https://filesender.aarnet.edu.au)
-        to send files out of Galaxy.
-    </help>
-    <citations>
-        <citation type="bibtex">
-           @misc{FileSenderCLI_github,
-           title={FileSenderCLI Github page},
-           url = {https://github.com/madsi1m/FileSenderCLI},}
-        </citation>
-    </citations>
-</tool>
--- a/macros.xml	Mon Oct 07 04:49:30 2024 +0000
+++ b/macros.xml	Mon Oct 21 23:12:46 2024 +0000
@@ -1,6 +1,6 @@
 <macros>
     <token name="@TOOL_VERSION@">v3.0.0</token>
-    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@VERSION_SUFFIX@">2</token>
     <token name="@PROFILE@">22.05</token>
     <xml name="requirements">
          <requirements>