commit/galaxy-central: greg: Miscellaneous enhancements for the tool shed:
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/540ff06d44b4/ changeset: 540ff06d44b4 user: greg date: 2011-10-10 21:51:43 summary: Miscellaneous enhancements for the tool shed: 1. Enable the same behavior for the config settings named "tool_config_file" and "tool_config_files" since this config setting can now be a comma-separated list of file names. 2. Display an error message if a user attempts to install a Galaxy tool shed repository but they do not have a shed tool config file named in the "tool_config_file" setting in universe_wsgi.ini. 3. If tool search using whoosh is enabled, re-index the tool box when new tools are installed from a tool shed. affected #: 3 files (-1 bytes) --- a/lib/galaxy/config.py Mon Oct 10 15:45:31 2011 -0400 +++ b/lib/galaxy/config.py Mon Oct 10 15:51:43 2011 -0400 @@ -52,7 +52,13 @@ self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "tool-data" ), os.getcwd() ) self.len_file_path = kwargs.get( "len_file_path", resolve_path(os.path.join(self.tool_data_path, 'shared','ucsc','chrom'), self.root) ) self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root ) - self.tool_configs = [ resolve_path( p, self.root ) for p in listify( kwargs.get( 'tool_config_file', 'tool_conf.xml' ) ) ] + if 'tool_config_file' in kwargs: + tcf = kwargs[ 'tool_config_file' ] + elif 'tool_config_files' in kwargs: + tcf = kwargs[ 'tool_config_files' ] + else: + tcf = 'tool_conf.xml' + self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ] self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root ) self.tool_secret = kwargs.get( "tool_secret", "" ) self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" ) --- a/lib/galaxy/web/controllers/admin.py Mon Oct 10 15:45:31 2011 -0400 +++ b/lib/galaxy/web/controllers/admin.py Mon Oct 10 15:51:43 2011 -0400 @@ -2,6 +2,7 @@ from galaxy import model from galaxy.model.orm import * from galaxy.web.framework.helpers import time_ago, iff, grids +from galaxy.tools.search import ToolBoxSearch import logging log = logging.getLogger( __name__ ) @@ -693,6 +694,15 @@ @web.expose @web.require_admin def install_tool_shed_repository( self, trans, **kwd ): + if not trans.app.toolbox.shed_tool_confs: + message = 'The <b>tool_config_file</b> setting in <b>universe_wsgi.ini</b> must include at least one shed tool configuration file name with a ' + message += '<b><toolbox></b> tag that includes a <b>tool_path</b> attribute value which is a directory relative to the Galaxy installation ' + message += 'directory in order to automatically install tools from a Galaxy tool shed (e.g., the file name <b>shed_tool_conf.xml</b> whose ' + message += '<b><toolbox></b> tag is <b><toolbox tool_path="../shed_tools"></b>).<p/>See the ' + message += '<a href="http://wiki.g2.bx.psu.edu/Tool%20Shed#Automatic_installation_of_Galaxy_tool_..." ' + message += 'target=_blank">Automatic installation of Galaxy tool shed repository tools into a local Galaxy instance</a> section of the ' + message += '<a href="http://wiki.g2.bx.psu.edu/Tool%20Shed" target="_blank">Galaxy tool shed wiki</a> for all of the details.' + return trans.show_error_message( message ) params = util.Params( kwd ) message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) @@ -782,6 +792,9 @@ pass # Append the new section to the shed_tool_config file. self.__add_shed_tool_conf_entry( trans, shed_tool_conf, new_tool_section ) + if trans.app.toolbox_search.enabled: + # If search support for tools is enabled, index the new installed tools. + trans.app.toolbox_search = ToolBoxSearch( trans.app.toolbox ) message = 'Revision <b>%s</b> of repository <b>%s</b> has been installed in tool panel section <b>%s</b>.' % \ ( changeset_revision, name, tool_section.name ) return trans.show_ok_message( message ) --- a/universe_wsgi.ini.sample Mon Oct 10 15:45:31 2011 -0400 +++ b/universe_wsgi.ini.sample Mon Oct 10 15:51:43 2011 -0400 @@ -124,8 +124,8 @@ #new_file_path = database/tmp # Tool config files, defines what tools are available in Galaxy. -# Tools can be locally developed or installed from tool sheds. -#tool_config_file = tool_conf.xml +# Tools can be locally developed or installed from Galaxy tool sheds. +#tool_config_file = tool_conf.xml,shed_tool_conf.xml # Default path to the directory containing the tools defined in tool_conf.xml. # Other tool config files must include the tool_path as an attribute in the <toolbox> tag. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket