commit/galaxy-central: dan: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/762d4010a9a5/ changeset: 762d4010a9a5 user: dan date: 2012-11-08 16:52:45 summary: Provide a warning message when uploading files to a toolshed repository and a tool_dependencies.xml has been provided, but tool_dependencies metadata has not been generated. affected #: 1 file diff -r d3054b066218eacd366e618cc97535d059d8bf6a -r 762d4010a9a534ce5237d7a0bb6d317a9d9501ac lib/galaxy/webapps/community/controllers/upload.py --- a/lib/galaxy/webapps/community/controllers/upload.py +++ b/lib/galaxy/webapps/community/controllers/upload.py @@ -160,6 +160,7 @@ # Get the new repository tip. if tip == repository.tip: message = 'No changes to repository. ' + status = 'warning' else: if ( isgzip or isbz2 ) and uncompress_file: uncompress_str = ' uncompressed and ' @@ -182,6 +183,16 @@ message += " %d files were removed from the repository root. " % len( files_to_remove ) kwd[ 'message' ] = message set_repository_metadata_due_to_new_tip( trans, repository, content_alert_str=content_alert_str, **kwd ) + #provide a warning message if a tool_dependencies.xml file is provided, but tool dependencies weren't loaded due to e.g. a requirement tag mismatch + if get_config_from_disk( 'tool_dependencies.xml', repo_dir ): + if repository.metadata_revisions: + metadata_dict = repository.metadata_revisions[0].metadata + else: + metadata_dict = {} + if 'tool_dependencies' not in metadata_dict: + message += 'Name, version and type from a tool requirement tag does not match the information in the "tool_dependencies.xml". ' + status = 'warning' + log.debug( 'Error in tool dependencies for repository %s: %s.' % ( repository.id, repository.name ) ) # Reset the tool_data_tables by loading the empty tool_data_table_conf.xml file. reset_tool_data_tables( trans.app ) trans.response.send_redirect( web.url_for( controller='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.
participants (1)
-
Bitbucket