Hi all,
I've implemented functionality for adding tools via the admin menu.
Let me just briefly explain what I did.
You can upload a binary/script file to a specific folder (choosable). Then this file is analyzed.
The analysis is at the moment only done for Perl/Python script, as those are mostly used in our institute.
First, it is checked in what language the script is written in (if it is not a binary), then a syntax check is performed (for python pyflakes must be installed), and then it is checked how many arguments are in the script.
Once you uploaded a file, you can add the XML file for this script.
The XML file is analyzed as well, in the following matter. First it is checked that the XML is well formed. Then it is checked if the mandatory tags are in the XML ( I choosed for mandatory tags: root = tool, command, input, help )
Then it is checked if script and XML are "compatible" by checking if they have the same number of arguments.
I also wrote unit tests for the main methods. They can be executed by "python lib/galaxy/util/test_tool_analysis.py"
The main files I changed are
lib/galaxy/web/base/controller.py
lib/galaxy/util/tool_analysis.py
lib/galaxy/util/helper.py
lib/galaxy/util/tool_conf_helper.py
and the templates for the admin in
templates/admin
The "update tools" is only done for one web process, there is no hup signal sent at the moment.
If you have any questions or something is not working for you, please let me know, I probably have some time to check it.
There are still some things that can be / should be implemented later on but I think this can be a good start for you guys.
I forked galaxy-central, so you can check it out by cloning
https://bitbucket.org/Bodolski/galaxy-central-adding-tools
hg clone https://Bodolski@bitbucket.org/Bodolski/galaxy-central-adding-tools
If you have any comments or question please do not hesitate to contact me, I'm open for every kind of critics.
Best wishes from Germany,
Bodo Vossen