1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/fabe313817c4/ changeset: fabe313817c4 user: greg date: 2012-07-09 23:15:56 summary: Add the ability to view the current datatypes registry and fix some issues when installing tool shed repositories that do not include any valid tools. affected #: 5 files diff -r e598a3e78079064fcde5b709fac17bf58153d82a -r fabe313817c42eedadbdb2f1399fed46b79bae20 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -1491,7 +1491,7 @@ elif c in MAPPED_CHARS: translated.append( MAPPED_CHARS[ c ] ) else: - translated.append( 'X' ) + translated.append( '' ) return ''.join( translated ) def to_html_str( text ): """Translates the characters in text to sn html string""" @@ -1508,7 +1508,7 @@ elif c == '\n': translated.append( '<br/>' ) elif c not in [ '\r' ]: - translated.append( 'X' ) + translated.append( '' ) return ''.join( translated ) def update_repository( repo, ctx_rev=None ): """ diff -r e598a3e78079064fcde5b709fac17bf58153d82a -r fabe313817c42eedadbdb2f1399fed46b79bae20 lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py +++ b/lib/galaxy/web/controllers/admin.py @@ -685,4 +685,9 @@ if emails is None: emails = [ u.email for u in trans.sa_session.query( trans.app.model.User ).enable_eagerloads( False ).all() ] return trans.fill_template( 'admin/impersonate.mako', emails=emails, message=message, status=status ) - \ No newline at end of file + @web.expose + @web.require_admin + def view_datatypes_registry( self, trans, **kwd ): + message = util.restore_text( kwd.get( 'message', '' ) ) + status = util.restore_text( kwd.get( 'status', 'done' ) ) + return trans.fill_template( 'admin/view_datatypes_registry.mako', message=message, status=status ) diff -r e598a3e78079064fcde5b709fac17bf58153d82a -r fabe313817c42eedadbdb2f1399fed46b79bae20 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -308,6 +308,14 @@ shed_tool_conf, tool_panel_dict, new_install=False ) + if repository.includes_datatypes: + repository_install_dir = os.path.abspath ( relative_install_dir ) + # Deactivate proprietary datatypes. + installed_repository_dict = load_installed_datatypes( trans.app, repository, repository_install_dir, deactivate=False ) + if installed_repository_dict and 'converter_path' in installed_repository_dict: + load_installed_datatype_converters( trans.app, installed_repository_dict, deactivate=False ) + if installed_repository_dict and 'display_path' in installed_repository_dict: + load_installed_display_applications( trans.app, installed_repository_dict, deactivate=False ) message = 'The <b>%s</b> repository has been activated.' % repository.name status = 'done' return trans.response.send_redirect( web.url_for( controller='admin_toolshed', @@ -406,9 +414,9 @@ if tool_shed_repository.includes_datatypes: # Deactivate proprietary datatypes. installed_repository_dict = load_installed_datatypes( trans.app, tool_shed_repository, repository_install_dir, deactivate=True ) - if installed_repository_dict[ 'converter_path' ]: + if installed_repository_dict and 'converter_path' in installed_repository_dict: load_installed_datatype_converters( trans.app, installed_repository_dict, deactivate=True ) - if installed_repository_dict[ 'display_path' ]: + if installed_repository_dict and 'display_path' in installed_repository_dict: load_installed_display_applications( trans.app, installed_repository_dict, deactivate=True ) if remove_from_disk_checked: try: @@ -1243,10 +1251,21 @@ tool_shed_repository.installed_changeset_revision, tool_shed_repository.owner, tool_shed_repository.dist_to_shed ) + ctx_rev = get_ctx_rev( tool_shed_url, tool_shed_repository.name, tool_shed_repository.owner, tool_shed_repository.installed_changeset_revision ) + repo_info_dict = kwd.get( 'repo_info_dict', None ) + if not repo_info_dict: + # This should only happen if the tool_shed_repository does not include any valid tools. + repo_info_dict = {} + repo_info_dict[ tool_shed_repository.name ] = ( tool_shed_repository.description, + repository_clone_url, + tool_shed_repository.installed_changeset_revision, + ctx_rev, + tool_shed_repository.owner, + metadata.get( 'tool_dependencies', None ) ) 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_dicts=kwd[ 'repo_info_dict' ], + repo_info_dicts=util.listify( repo_info_dict ), message=message, new_tool_panel_section=new_tool_panel_section, shed_tool_conf=shed_tool_conf, diff -r e598a3e78079064fcde5b709fac17bf58153d82a -r fabe313817c42eedadbdb2f1399fed46b79bae20 templates/admin/view_datatypes_registry.mako --- /dev/null +++ b/templates/admin/view_datatypes_registry.mako @@ -0,0 +1,51 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> + +%if message: + ${render_msg( message, status )} +%endif + +<div class="toolForm"> + <div class="toolFormTitle">Current datatypes registry contains ${len( trans.app.datatypes_registry.datatype_elems )} datatypes</div> + <div class="toolFormBody"> + <table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr> + <th>Extension</th> + <th>Type</th> + <th>Mimetype</th> + <th>Display in upload</th> + <th>Datatype class</th> + </tr> + <% ctr = 0 %> + %for elem in trans.app.datatypes_registry.datatype_elems: + <% + import galaxy.util + extension = elem.get( 'extension', None ) + dtype = elem.get( 'type', None ) + type_extension = elem.get( 'type_extension', None ) + mimetype = elem.get( 'mimetype', None ) + display_in_upload = galaxy.util.string_as_bool( elem.get( 'display_in_upload', False ) ) + %> + %if ctr % 2 == 1: + <tr class="odd_row"> + %else: + <tr class="tr"> + %endif + <td>${extension}</td> + <td>${dtype}</td> + <td> + %if mimetype: + ${mimetype} + %endif + </td> + <td> + %if display_in_upload: + ${display_in_upload} + %endif + </td> + </tr> + <% ctr += 1 %> + %endfor + </table> + </div> +</div> diff -r e598a3e78079064fcde5b709fac17bf58153d82a -r fabe313817c42eedadbdb2f1399fed46b79bae20 templates/webapps/galaxy/admin/index.mako --- a/templates/webapps/galaxy/admin/index.mako +++ b/templates/webapps/galaxy/admin/index.mako @@ -66,6 +66,7 @@ <div class="toolSectionTitle">Server</div><div class="toolSectionBody"><div class="toolSectionBg"> + <div class="toolTitle"><a href="${h.url_for( controller='admin', action='view_datatypes_registry' )}" target="galaxy_main">View datatypes registry</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='tool_versions' )}" target="galaxy_main">Tool versions</a></div><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> 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.