1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/3965354dda0b/ changeset: 3965354dda0b user: greg date: 2012-07-03 17:38:48 summary: Fixes for inspecting tool dependencies associated with a specified installed tool shed repository. affected #: 2 files
diff -r 8fd408407f7e48b917d14803c8ef61eaf10ca62c -r 3965354dda0b11768ae0c8c1ff5c33313bf98ee4 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -975,6 +975,16 @@ def get_tool_dependency( trans, id ): """Get a tool_dependency from the database via id""" return trans.sa_session.query( trans.model.ToolDependency ).get( trans.security.decode_id( id ) ) +def get_tool_dependency_ids( as_string=False, **kwd ): + tool_dependency_id = kwd.get( 'tool_dependency_id', None ) + tool_dependency_ids = util.listify( kwd.get( 'tool_dependency_ids', None ) ) + if not tool_dependency_ids: + tool_dependency_ids = util.listify( kwd.get( 'id', None ) ) + if tool_dependency_id and tool_dependency_id not in tool_dependency_ids: + tool_dependency_ids.append( tool_dependency_id ) + if as_string: + return ','.join( tool_dependency_ids ) + return tool_dependency_ids def get_tool_panel_config_tool_path_install_dir( app, repository ): # Return shed-related tool panel config, the tool_path configured in it, and the relative path to the directory where the # repository is installed. This method assumes all repository tools are defined in a single shed-related tool panel config.
diff -r 8fd408407f7e48b917d14803c8ef61eaf10ca62c -r 3965354dda0b11768ae0c8c1ff5c33313bf98ee4 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -262,7 +262,7 @@ model.ToolDependency.installation_status.ERROR ] ) ) ] def build_initial_query( self, trans, **kwd ): - tool_dependency_ids = util.listify( kwd.get( 'tool_dependency_ids', None ) ) + tool_dependency_ids = get_tool_dependency_ids( as_string=False, **kwd ) if tool_dependency_ids: clause_list = [] for tool_dependency_id in tool_dependency_ids: @@ -1067,12 +1067,7 @@ params = util.Params( kwd ) message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) - tool_dependency_id = params.get( 'tool_dependency_id', None ) - tool_dependency_ids = util.listify( params.get( 'tool_dependency_ids', None ) ) - if not tool_dependency_ids: - tool_dependency_ids = util.listify( params.get( 'id', None ) ) - if tool_dependency_id and tool_dependency_id not in tool_dependency_ids: - tool_dependency_ids.append( tool_dependency_id ) + tool_dependency_ids = get_tool_dependency_ids( as_string=False, **kwd ) # We need a tool_shed_repository, so get it from one of the tool_dependencies. tool_dependency = get_tool_dependency( trans, tool_dependency_ids[ 0 ] ) tool_shed_repository = tool_dependency.tool_shed_repository
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.
galaxy-commits@lists.galaxyproject.org