1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/0bf342288c79/ changeset: 0bf342288c79 user: greg date: 2012-07-02 20:44:46 summary: Apply recent refinements for installing tool shed repositories to the process used for reinstalling them after they've been uninstalled. affected #: 7 files diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -290,11 +290,15 @@ dest_path = os.path.abspath( app.config.tool_data_path ) sample_file_name = strip_path( filename ) copied_file = sample_file_name.replace( '.sample', '' ) - # It's ok to overwrite the .sample version of the file. - shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, sample_file_name ) ) + full_source_path = os.path.abspath( filename ) + full_destination_path = os.path.join( dest_path, sample_file_name ) + # Don't copy a file to itself - not sure how this happens, but sometimes it does... + if full_source_path != full_destination_path: + # It's ok to overwrite the .sample version of the file. + shutil.copy( full_source_path, full_destination_path ) # Only create the .loc file if it does not yet exist. We don't overwrite it in case it contains stuff proprietary to the local instance. if not os.path.exists( os.path.join( dest_path, copied_file ) ): - shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, copied_file ) ) + shutil.copy( full_source_path, os.path.join( dest_path, copied_file ) ) def copy_sample_files( app, sample_files, sample_files_copied=None, dest_path=None ): """ Copy all files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied @@ -346,8 +350,13 @@ app.model.ToolShedRepository.installation_status.INSTALLED, app.model.ToolShedRepository.installation_status.ERROR ]: tool_shed_repository.deleted = False - if status not in [ app.model.ToolShedRepository.installation_status.UNINSTALLED ]: tool_shed_repository.uninstalled = False + elif status in [ app.model.ToolShedRepository.installation_status.DEACTIVATED ]: + tool_shed_repository.deleted = True + tool_shed_repository.uninstalled = False + elif status in [ app.model.ToolShedRepository.installation_status.UNINSTALLED ]: + tool_shed_repository.deleted = True + tool_shed_repository.uninstalled = True else: tool_shed_repository = app.model.ToolShedRepository( tool_shed=tool_shed, name=name, @@ -359,6 +368,8 @@ metadata=metadata_dict, includes_datatypes=includes_datatypes, dist_to_shed=dist_to_shed, + deleted=deleted, + uninstalled=uninstalled, status=status ) sa_session.add( tool_shed_repository ) sa_session.flush() diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -488,7 +488,7 @@ return get_repository_file_contents( file_path ) @web.expose @web.require_admin - def initiate_repository_installation( self, trans, shed_repository_ids, encoded_kwd ): + def initiate_repository_installation( self, trans, shed_repository_ids, encoded_kwd, reinstalling=False ): tsr_ids = util.listify( shed_repository_ids ) tool_shed_repositories = [] for tsr_id in tsr_ids: @@ -502,7 +502,8 @@ encoded_kwd=encoded_kwd, query=query, tool_shed_repositories=tool_shed_repositories, - initiate_repository_installation_ids=shed_repository_ids ) + initiate_repository_installation_ids=shed_repository_ids, + reinstalling=reinstalling ) @web.expose @web.require_admin def initiate_tool_dependency_installation( self, trans, tool_dependencies ): @@ -660,6 +661,7 @@ tool_panel_section_key = 'section_%s' % tool_panel_section tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ] else: + tool_panel_section_key = None tool_section = None tsrids_list = [ trans.security.encode_id( tsr.id ) for tsr in created_or_updated_tool_shed_repositories ] new_kwd = dict( includes_tool_dependencies=kwd.get( 'includes_tool_dependencies', False ), @@ -668,7 +670,7 @@ repo_info_dict=kwd[ 'repo_info_dict' ], message=message, new_tool_panel_section=kwd.get( 'new_tool_panel_section', '' ), - shed_tool_conf = kwd[ 'shed_tool_conf' ], + shed_tool_conf=kwd[ 'shed_tool_conf' ], status=status, tool_panel_section=kwd.get( 'tool_panel_section', '' ), tool_path=tool_path, @@ -680,7 +682,8 @@ return trans.response.send_redirect( web.url_for( controller='admin_toolshed', action='initiate_repository_installation', shed_repository_ids=tsrids_str, - encoded_kwd=encoded_kwd ) ) + encoded_kwd=encoded_kwd, + reinstalling=False ) ) else: kwd[ 'message' ] = message kwd[ 'status' ] = status @@ -774,7 +777,7 @@ status=status ) @web.expose @web.require_admin - def install_tool_shed_repositories( self, trans, tool_shed_repositories, **kwd ): + def install_tool_shed_repositories( self, trans, tool_shed_repositories, reinstalling=False, **kwd ): """Install specified tool shed repositories.""" repo_info_dict = tool_shed_decode( kwd[ 'repo_info_dict' ] ) tool_path = kwd[ 'tool_path' ] @@ -789,13 +792,20 @@ # Clone each repository to the configured location. update_tool_shed_repository_status( trans.app, tool_shed_repository, trans.model.ToolShedRepository.installation_status.CLONING ) repo_info_tuple = repo_info_dict[ tool_shed_repository.name ] - if includes_tool_dependencies: + if includes_tool_dependencies and not reinstalling: description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple else: description, repository_clone_url, changeset_revision, ctx_rev = repo_info_tuple clone_dir = os.path.join( tool_path, self.generate_tool_path( repository_clone_url, tool_shed_repository.installed_changeset_revision ) ) relative_install_dir = os.path.join( clone_dir, tool_shed_repository.name ) clone_repository( repository_clone_url, os.path.abspath( relative_install_dir ), ctx_rev ) + if reinstalling: + # Since we're reinstalling the repository we need to find the latest changeset revision to which is can be updated. + current_changeset_revision, current_ctx_rev = get_update_to_changeset_revision_and_ctx_rev( trans, tool_shed_repository ) + if current_ctx_rev != ctx_rev: + repo = hg.repository( get_configured_ui(), path=os.path.abspath( relative_install_dir ) ) + pull_repository( repo, repository_clone_url, current_changeset_revision ) + update_repository( repo, ctx_rev=current_ctx_rev ) self.handle_repository_contents( trans, tool_shed_repository=tool_shed_repository, tool_path=tool_path, @@ -803,7 +813,8 @@ relative_install_dir=relative_install_dir, tool_shed=tool_shed_repository.tool_shed, tool_section=tool_section, - shed_tool_conf=kwd.get( 'shed_tool_conf', '' ) ) + shed_tool_conf=kwd.get( 'shed_tool_conf', '' ), + reinstalling=reinstalling ) trans.sa_session.refresh( tool_shed_repository ) metadata = tool_shed_repository.metadata if 'tools' in metadata: @@ -882,7 +893,7 @@ action='monitor_repository_installation', tool_shed_repository_ids=tsr_ids_for_monitoring ) ) def handle_repository_contents( self, trans, tool_shed_repository, tool_path, repository_clone_url, relative_install_dir, tool_shed=None, - tool_section=None, shed_tool_conf=None ): + tool_section=None, shed_tool_conf=None, reinstalling=False ): """ Generate the metadata for the installed tool shed repository, among other things. This method is called from Galaxy (never the tool shed) when an admin is installing a new repository or reinstalling an uninstalled repository. @@ -891,7 +902,7 @@ tool_shed_repository.metadata = metadata_dict trans.sa_session.add( tool_shed_repository ) trans.sa_session.flush() - if 'tool_dependencies' in metadata_dict: + if 'tool_dependencies' in metadata_dict and not reinstalling: tool_dependencies = create_tool_dependency_objects( trans.app, tool_shed_repository, tool_shed_repository.installed_changeset_revision ) if 'tools' in metadata_dict: tool_panel_dict = generate_tool_panel_dict_for_new_install( metadata_dict[ 'tools' ], tool_section ) @@ -1033,6 +1044,7 @@ kwd[ 'message' ] = 'All selected tool shed repositories are already uninstalled.' kwd[ 'status' ] = 'error' elif operation == "install": + reinstalling = util.string_as_bool( params.get( 'reinstalling', False ) ) encoded_kwd = kwd[ 'encoded_kwd' ] decoded_kwd = tool_shed_decode( encoded_kwd ) tsr_ids = decoded_kwd[ 'tool_shed_repository_ids' ] @@ -1043,7 +1055,7 @@ trans.model.ToolShedRepository.installation_status.UNINSTALLED ]: repositories_for_installation.append( repository ) if repositories_for_installation: - self.install_tool_shed_repositories( trans, repositories_for_installation, **decoded_kwd ) + self.install_tool_shed_repositories( trans, repositories_for_installation, reinstalling=reinstalling, **decoded_kwd ) else: kwd[ 'message' ] = 'All selected tool shed repositories are already installed.' kwd[ 'status' ] = 'error' @@ -1155,25 +1167,15 @@ no_changes = kwd.get( 'no_changes', '' ) no_changes_checked = CheckboxField.is_checked( no_changes ) install_tool_dependencies = CheckboxField.is_checked( kwd.get( 'install_tool_dependencies', '' ) ) + new_tool_panel_section = kwd.get( 'new_tool_panel_section', '' ) + tool_panel_section = kwd.get( 'tool_panel_section', '' ) shed_tool_conf, tool_path, relative_install_dir = get_tool_panel_config_tool_path_install_dir( trans.app, tool_shed_repository ) repository_clone_url = generate_clone_url( trans, tool_shed_repository ) clone_dir = os.path.join( tool_path, self.generate_tool_path( repository_clone_url, tool_shed_repository.installed_changeset_revision ) ) relative_install_dir = os.path.join( clone_dir, tool_shed_repository.name ) tool_shed_url = get_url_from_repository_tool_shed( trans.app, tool_shed_repository ) - if not tool_shed_repository.ctx_rev: - # The ctx_rev column was introduced late, so may be null for some installed ToolShedRepositories. - ctx_rev = get_ctx_rev( tool_shed_url, tool_shed_repository.name, tool_shed_repository.owner, tool_shed_repository.installed_changeset_revision ) - else: - ctx_rev = tool_shed_repository.ctx_rev - update_tool_shed_repository_status( trans.app, tool_shed_repository, trans.model.ToolShedRepository.installation_status.CLONING ) - clone_repository( repository_clone_url, os.path.abspath( relative_install_dir ), ctx_rev ) - # Since we're reinstalling the repository we need to find the latest changeset revision to which is can be updated. - current_changeset_revision, current_ctx_rev = get_update_to_changeset_revision_and_ctx_rev( trans, tool_shed_repository ) - if current_ctx_rev != ctx_rev: - repo = hg.repository( get_configured_ui(), path=os.path.abspath( relative_install_dir ) ) - pull_repository( repo, repository_clone_url, current_changeset_revision ) - update_repository( repo, ctx_rev=current_ctx_rev ) tool_section = None + tool_panel_section_key = None metadata = tool_shed_repository.metadata if tool_shed_repository.includes_tools: # Get the location in the tool panel in which each tool was originally loaded. @@ -1190,12 +1192,10 @@ original_section_id = tool_section_dict[ 'id' ] original_section_name = tool_section_dict[ 'name' ] if no_changes_checked: - if original_section_id in [ '' ]: - tool_section = None - else: - section_key = 'section_%s' % str( original_section_id ) - if section_key in trans.app.toolbox.tool_panel: - tool_section = trans.app.toolbox.tool_panel[ section_key ] + if original_section_id: + tool_panel_section_key = 'section_%s' % str( original_section_id ) + if tool_panel_section_key in trans.app.toolbox.tool_panel: + tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ] else: # The section in which the tool was originally loaded used to be in the tool panel, but no longer is. elem = Element( 'section' ) @@ -1203,18 +1203,16 @@ elem.attrib[ 'id' ] = original_section_id elem.attrib[ 'version' ] = '' tool_section = tools.ToolSection( elem ) - trans.app.toolbox.tool_panel[ section_key ] = tool_section + trans.app.toolbox.tool_panel[ tool_panel_section_key ] = tool_section else: # The user elected to change the tool panel section to contain the tools. - new_tool_panel_section = kwd.get( 'new_tool_panel_section', '' ) - tool_panel_section = kwd.get( 'tool_panel_section', '' ) if new_tool_panel_section: section_id = new_tool_panel_section.lower().replace( ' ', '_' ) - new_section_key = 'section_%s' % str( section_id ) - if new_section_key in trans.app.toolbox.tool_panel: + tool_panel_section_key = 'section_%s' % str( section_id ) + if tool_panel_section_key in trans.app.toolbox.tool_panel: # Appending a tool to an existing section in trans.app.toolbox.tool_panel log.debug( "Appending to tool panel section: %s" % new_tool_panel_section ) - tool_section = trans.app.toolbox.tool_panel[ new_section_key ] + tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ] else: # Appending a new section to trans.app.toolbox.tool_panel log.debug( "Loading new tool panel section: %s" % new_tool_panel_section ) @@ -1223,46 +1221,43 @@ elem.attrib[ 'id' ] = section_id elem.attrib[ 'version' ] = '' tool_section = tools.ToolSection( elem ) - trans.app.toolbox.tool_panel[ new_section_key ] = tool_section + trans.app.toolbox.tool_panel[ tool_panel_section_key ] = tool_section elif tool_panel_section: - section_key = 'section_%s' % tool_panel_section - tool_section = trans.app.toolbox.tool_panel[ section_key ] + tool_panel_section_key = 'section_%s' % tool_panel_section + tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ] else: tool_section = None - self.handle_repository_contents( trans, - tool_shed_repository=tool_shed_repository, - tool_path=tool_path, - repository_clone_url=repository_clone_url, - relative_install_dir=relative_install_dir, - tool_shed=tool_shed_repository.tool_shed, - tool_section=tool_section, - shed_tool_conf=shed_tool_conf ) - - if install_tool_dependencies and tool_shed_repository.tool_dependencies and 'tool_dependencies' in metadata: - # Install tool dependencies. - update_tool_shed_repository_status( trans.app, - tool_shed_repository, - trans.model.ToolShedRepository.installation_status.INSTALLING_TOOL_DEPENDENCIES ) - work_dir = make_tmp_directory() - # Get the tool_dependencies.xml file from the repository. - tool_dependencies_config = get_config_from_repository( trans.app, - 'tool_dependencies.xml', - tool_shed_repository, - tool_shed_repository.installed_changeset_revision, - work_dir ) - installed_tool_dependencies = handle_tool_dependencies( app=trans.app, - tool_shed_repository=tool_shed_repository, - tool_dependencies_config=tool_dependencies_config, - tool_dependencies=tool_dependencies ) - tool_shed_repository.uninstalled = False - tool_shed_repository.deleted = False - tool_shed_repository.status = trans.model.ToolShedRepository.installation_status.INSTALLED - trans.sa_session.add( tool_shed_repository ) - trans.sa_session.flush() + # The repository's status must be updated from 'Uninstall' to 'New' when initiating reinstall so the repository_installation_updater will function. + tool_shed_repository = create_or_update_tool_shed_repository( trans.app, + tool_shed_repository.name, + tool_shed_repository.description, + tool_shed_repository.installed_changeset_revision, + tool_shed_repository.ctx_rev, + repository_clone_url, + tool_shed_repository.metadata, + trans.model.ToolShedRepository.installation_status.NEW, + tool_shed_repository.installed_changeset_revision, + tool_shed_repository.owner, + tool_shed_repository.dist_to_shed ) + new_kwd = dict( includes_tool_dependencies=tool_shed_repository.includes_tool_dependencies, + includes_tools=tool_shed_repository.includes_tools, + install_tool_dependencies=install_tool_dependencies, + repo_info_dict=kwd[ 'repo_info_dict' ], + message=message, + new_tool_panel_section=new_tool_panel_section, + shed_tool_conf=shed_tool_conf, + status=status, + tool_panel_section=tool_panel_section, + tool_path=tool_path, + tool_panel_section_key=tool_panel_section_key, + tool_shed_repository_ids=[ repository_id ], + tool_shed_url=tool_shed_url ) + encoded_kwd = tool_shed_encode( new_kwd ) return trans.response.send_redirect( web.url_for( controller='admin_toolshed', - action='browse_repositories', - message=message, - status=status ) ) + action='initiate_repository_installation', + shed_repository_ids=repository_id, + encoded_kwd=encoded_kwd, + reinstalling=True ) ) @web.json def repository_installation_status_updates( self, trans, ids=None, status_list=None ): # Avoid caching @@ -1314,8 +1309,24 @@ @web.require_admin def reselect_tool_panel_section( self, trans, **kwd ): repository = get_repository( trans, kwd[ 'id' ] ) + metadata = repository.metadata + # Populate repo_info_dict. + tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository ) + ctx_rev = get_ctx_rev( tool_shed_url, repository.name, repository.owner, repository.installed_changeset_revision ) + repository_clone_url = generate_clone_url( trans, repository ) + repo_info_dict = {} + repo_info_dict[ repository.name ] = ( repository.description, repository_clone_url, repository.installed_changeset_revision, ctx_rev ) + dict_with_tool_dependencies = {} + includes_tool_dependencies = repository.includes_tool_dependencies + if includes_tool_dependencies: + # Populate dict_with_tool_dependencies. + dict_with_tool_dependencies[ repository.name ] = ( repository.description, + repository_clone_url, + repository.installed_changeset_revision, + ctx_rev, + repository.owner, + metadata[ 'tool_dependencies' ] ) # Get the location in the tool panel in which the tool was originally loaded. - metadata = repository.metadata if 'tool_panel_section' in metadata: tool_panel_dict = metadata[ 'tool_panel_section' ] if tool_panel_dict: @@ -1342,11 +1353,16 @@ message = "The tools contained in your <b>%s</b> repository were last loaded into the tool panel outside of any sections. " % repository.name message += "Uncheck the <b>No changes</b> check box and select a tool panel section to load the tools into that section." status = 'done' + install_tool_dependencies_check_box = CheckboxField( 'install_tool_dependencies', checked=True ) return trans.fill_template( '/admin/tool_shed_repository/reselect_tool_panel_section.mako', repository=repository, no_changes_check_box=no_changes_check_box, original_section_name=original_section_name, + install_tool_dependencies_check_box=install_tool_dependencies_check_box, tool_panel_section_select_field=tool_panel_section_select_field, + repo_info_dict=tool_shed_encode( repo_info_dict ), + dict_with_tool_dependencies=dict_with_tool_dependencies, + includes_tool_dependencies=includes_tool_dependencies, message=message, status=status ) @web.expose diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e templates/admin/tool_shed_repository/common.mako --- a/templates/admin/tool_shed_repository/common.mako +++ b/templates/admin/tool_shed_repository/common.mako @@ -67,6 +67,73 @@ </script></%def> +<%def name="render_tool_dependency_section( install_tool_dependencies_check_box, dict_with_tool_dependencies )"> + <% import os %> + <div class="form-row"> + <div class="toolParamHelp" style="clear: both;"> + <p> + These tool dependencies can be automatically installed with the repository. Installing them provides significant benefits and + Galaxy includes various features to manage them. + </p> + <p> + Each of these dependencies may require their own build requirements (e.g., CMake, g++, etc). Galaxy will not attempt to install + these build requirements, so tool dependency installation may partially fail if any are missing from your environment, but the + repository and all of it's contents will be installed. You can install the missing build requirements and have Galaxy attempt + to install the tool dependencies again if tool dependency installation fails in any way. + </p> + </div> + </div> + <div class="form-row"> + <label>Install tool dependencies?</label> + ${install_tool_dependencies_check_box.get_html()} + <div class="toolParamHelp" style="clear: both;"> + Un-check to skip automatic installation of these tool dependencies. + </div> + </div> + <div style="clear: both"></div> + <div class="form-row"> + <table class="grid"> + <tr><td colspan="4" bgcolor="#D8D8D8"><b>Tool dependencies</b></td></tr> + <tr> + <th>Name</th> + <th>Version</th> + <th>Type</th> + <th>Install directory</th> + </tr> + %for repository_name, repo_info_tuple in dict_with_tool_dependencies.items(): + <% description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple %> + %for dependency_key, requirements_dict in tool_dependencies.items(): + <% + name = requirements_dict[ 'name' ] + version = requirements_dict[ 'version' ] + type = requirements_dict[ 'type' ] + install_dir = os.path.join( trans.app.config.tool_dependency_dir, + name, + version, + repository_owner, + repository_name, + changeset_revision ) + tool_dependency_readme_text = requirements_dict.get( 'readme', None ) + %> + %if not os.path.exists( install_dir ): + <tr> + <td>${name}</td> + <td>${version}</td> + <td>${type}</td> + <td>${install_dir}</td> + </tr> + %if tool_dependency_readme_text: + <tr><td colspan="4" bgcolor="#FFFFCC">${name} ${version} requirements and installation information</td></tr> + <tr><td colspan="4"><pre>${tool_dependency_readme_text}</pre></td></tr> + %endif + %endif + %endfor + %endfor + </table> + <div style="clear: both"></div> + </div> +</%def> + <%def name="dependency_status_updater()"><script type="text/javascript"> // Tool dependency status updater - used to update the installation status on the Tool Dependencies Grid. diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e templates/admin/tool_shed_repository/initiate_repository_installation.mako --- a/templates/admin/tool_shed_repository/initiate_repository_installation.mako +++ b/templates/admin/tool_shed_repository/initiate_repository_installation.mako @@ -11,15 +11,15 @@ <%def name="repository_installation_javascripts()"><script type="text/javascript"> $(document).ready(function( ){ - initiate_repository_installation( "${initiate_repository_installation_ids}", "${encoded_kwd}" ); + initiate_repository_installation( "${initiate_repository_installation_ids}", "${encoded_kwd}", "${reinstalling}" ); }); - var initiate_repository_installation = function ( iri_ids, encoded_kwd ) { + var initiate_repository_installation = function ( iri_ids, encoded_kwd, reinstalling ) { // Make ajax call $.ajax( { type: "POST", url: "${h.url_for( controller='admin_toolshed', action='manage_repositories' )}", dataType: "html", - data: { operation: "install", tool_shed_repository_ids: iri_ids, encoded_kwd: encoded_kwd }, + data: { operation: "install", tool_shed_repository_ids: iri_ids, encoded_kwd: encoded_kwd, reinstalling: reinstalling }, success : function ( data ) { //alert( "Initializing repository installation succeeded" ); }, diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e templates/admin/tool_shed_repository/reselect_tool_panel_section.mako --- a/templates/admin/tool_shed_repository/reselect_tool_panel_section.mako +++ b/templates/admin/tool_shed_repository/reselect_tool_panel_section.mako @@ -1,5 +1,6 @@ <%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" /> +<%namespace file="/admin/tool_shed_repository/common.mako" import="render_tool_dependency_section" /> %if message: ${render_msg( message, status )} @@ -8,7 +9,12 @@ <div class="toolForm"><div class="toolFormTitle">Choose the tool panel section to contain the installed tools (optional)</div><div class="toolFormBody"> - <form name="reselect_tool_panel_section" id="reselect_tool_panel_section" action="${h.url_for( controller='admin_toolshed', action='reinstall_repository', id=trans.security.encode_id( repository.id ) )}" method="post" > + <form name="reselect_tool_panel_section" id="reselect_tool_panel_section" action="${h.url_for( controller='admin_toolshed', action='reinstall_repository', id=trans.security.encode_id( repository.id ), repo_info_dict=repo_info_dict )}" method="post" > + <div style="clear: both"></div> + %if includes_tool_dependencies: + ${render_tool_dependency_section( install_tool_dependencies_check_box, dict_with_tool_dependencies )} + %endif + <div style="clear: both"></div><div class="form-row"> ${no_changes_check_box.get_html()} <label style="display: inline;">No changes</label> diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e templates/admin/tool_shed_repository/select_tool_panel_section.mako --- a/templates/admin/tool_shed_repository/select_tool_panel_section.mako +++ b/templates/admin/tool_shed_repository/select_tool_panel_section.mako @@ -1,7 +1,6 @@ <%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" /> - -<% import os %> +<%namespace file="/admin/tool_shed_repository/common.mako" import="render_tool_dependency_section" /> %if message: ${render_msg( message, status )} @@ -29,69 +28,7 @@ <form name="select_tool_panel_section" id="select_tool_panel_section" action="${h.url_for( controller='admin_toolshed', action='install_repository', tool_shed_url=tool_shed_url, repo_info_dict=repo_info_dict, includes_tools=includes_tools, includes_tool_dependencies=includes_tool_dependencies )}" method="post" ><div style="clear: both"></div> %if includes_tool_dependencies: - <div class="form-row"> - <div class="toolParamHelp" style="clear: both;"> - <p> - These tool dependencies can be automatically installed with the repository. Installing them provides significant benefits and - Galaxy includes various features to manage them. - </p> - <p> - Each of these dependencies may require their own build requirements (e.g., CMake, g++, etc). Galaxy will not attempt to install - these build requirements, so tool dependency installation may partially fail if any are missing from your environment, but the - repository and all of it's contents will be installed. You can install the missing build requirements and have Galaxy attempt - to install the tool dependencies again if tool dependency installation fails in any way. - </p> - </div> - </div> - <div class="form-row"> - <label>Install tool dependencies?</label> - ${install_tool_dependencies_check_box.get_html()} - <div class="toolParamHelp" style="clear: both;"> - Un-check to skip automatic installation of these tool dependencies. - </div> - </div> - <div style="clear: both"></div> - <div class="form-row"> - <table class="grid"> - <tr><td colspan="4" bgcolor="#D8D8D8"><b>Tool dependencies</b></td></tr> - <tr> - <th>Name</th> - <th>Version</th> - <th>Type</th> - <th>Install directory</th> - </tr> - %for repository_name, repo_info_tuple in dict_with_tool_dependencies.items(): - <% description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple %> - %for dependency_key, requirements_dict in tool_dependencies.items(): - <% - name = requirements_dict[ 'name' ] - version = requirements_dict[ 'version' ] - type = requirements_dict[ 'type' ] - install_dir = os.path.join( trans.app.config.tool_dependency_dir, - name, - version, - repository_owner, - repository_name, - changeset_revision ) - tool_dependency_readme_text = requirements_dict.get( 'readme', None ) - %> - %if not os.path.exists( install_dir ): - <tr> - <td>${name}</td> - <td>${version}</td> - <td>${type}</td> - <td>${install_dir}</td> - </tr> - %if tool_dependency_readme_text: - <tr><td colspan="4" bgcolor="#FFFFCC">${name} ${version} requirements and installation information</td></tr> - <tr><td colspan="4"><pre>${tool_dependency_readme_text}</pre></td></tr> - %endif - %endif - %endfor - %endfor - </table> - <div style="clear: both"></div> - </div> + ${render_tool_dependency_section( install_tool_dependencies_check_box, dict_with_tool_dependencies )} %endif <div style="clear: both"></div><div class="form-row"> diff -r e241ff58404830172524fb099fee7b5d7324f026 -r 0bf342288c79f417e7fbb6e0e7ac992024936e6e templates/webapps/galaxy/admin/index.mako --- a/templates/webapps/galaxy/admin/index.mako +++ b/templates/webapps/galaxy/admin/index.mako @@ -70,10 +70,10 @@ <div class="toolTitle"><a href="${h.url_for( controller='admin', action='reload_tool' )}" target="galaxy_main">Reload a tool's configuration</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='memdump' )}" target="galaxy_main">Profile memory usage</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='jobs' )}" target="galaxy_main">Manage jobs</a></div> + <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='monitor_repository_installation' )}" target="galaxy_main">Monitor installing tool shed repositories</a></div> %if cloned_repositories: <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='browse_repositories' )}" target="galaxy_main">Manage installed tool shed repositories</a></div> %endif - <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='monitor_repository_installation' )}" target="galaxy_main">Monitor installing tool shed repositories</a></div></div></div> %if trans.app.tool_shed_registry and trans.app.tool_shed_registry.tool_sheds: 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.