commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c666aa204369/ Changeset: c666aa204369 Branch: next-stable User: Dave Bouvier Date: 2013-05-28 15:53:36 Summary: Fixes for backward compatibility with 2012-12-20 release of Galaxy. Affected #: 6 files diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/galaxy/webapps/tool_shed/util/container_util.py --- a/lib/galaxy/webapps/tool_shed/util/container_util.py +++ b/lib/galaxy/webapps/tool_shed/util/container_util.py @@ -68,7 +68,7 @@ repository_name=name, repository_owner=owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required ) + prior_installation_required=asbool( prior_installation_required ) ) class DataManager( object ): @@ -467,7 +467,7 @@ repository_name=name, repository_owner=owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required, + prior_installation_required=asbool( prior_installation_required ), error=error ) folder.invalid_repository_dependencies.append( ird ) invalid_repository_dependencies_folder.folders.append( folder ) @@ -1328,7 +1328,7 @@ repository_name=repository_name, repository_owner=repository_owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required, + prior_installation_required=asbool( prior_installation_required ), installation_status=installation_status, tool_shed_repository_id=tool_shed_repository_id ) # Insert the repository_dependency into the folder. @@ -1338,7 +1338,7 @@ def is_subfolder_of( folder, repository_dependency ): toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required = \ suc.parse_repository_dependency_tuple( repository_dependency ) - key = generate_repository_dependencies_key_for_repository( toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required ) + key = generate_repository_dependencies_key_for_repository( toolshed, repository_name, repository_owner, changeset_revision, asbool( prior_installation_required ) ) for sub_folder in folder.folders: if key == sub_folder.key: return True diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/tool_shed/galaxy_install/repository_util.py --- a/lib/tool_shed/galaxy_install/repository_util.py +++ b/lib/tool_shed/galaxy_install/repository_util.py @@ -4,6 +4,7 @@ import tempfile import threading from galaxy import tools +from galaxy.util import asbool from galaxy.util import json from galaxy import web from galaxy.model.orm import or_ @@ -214,7 +215,7 @@ continue for rd_tup in rd_tups: tool_shed, name, owner, changeset_revision, prior_installation_required = suc.parse_repository_dependency_tuple( rd_tup ) - if prior_installation_required: + if asbool( prior_installation_required ): repository = suc.get_repository_for_dependency_relationship( trans.app, tool_shed, name, owner, changeset_revision ) if repository: encoded_repository_id = trans.security.encode_id( repository.id ) diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/tool_shed/util/common_install_util.py --- a/lib/tool_shed/util/common_install_util.py +++ b/lib/tool_shed/util/common_install_util.py @@ -202,7 +202,7 @@ tmp_repo_info_tuple = ( None, tmp_clone_url, changeset_revision, None, owner, None, None ) repository, current_changeset_revision = suc.repository_was_previously_installed( trans, tool_shed, name, tmp_repo_info_tuple ) if repository: - new_rd_tup = [ tool_shed, name, owner, changeset_revision, prior_installation_required, repository.id, repository.status ] + new_rd_tup = [ tool_shed, name, owner, changeset_revision, str( prior_installation_required ), repository.id, repository.status ] if repository.status == trans.model.ToolShedRepository.installation_status.INSTALLED: if new_rd_tup not in installed_rd_tups: installed_rd_tups.append( new_rd_tup ) @@ -210,7 +210,7 @@ if new_rd_tup not in missing_rd_tups: missing_rd_tups.append( new_rd_tup ) else: - new_rd_tup = [ tool_shed, name, owner, changeset_revision, prior_installation_required, None, 'Never installed' ] + new_rd_tup = [ tool_shed, name, owner, changeset_revision, str( prior_installation_required ), None, 'Never installed' ] if new_rd_tup not in missing_rd_tups: missing_rd_tups.append( new_rd_tup ) if installed_rd_tups: diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/tool_shed/util/metadata_util.py --- a/lib/tool_shed/util/metadata_util.py +++ b/lib/tool_shed/util/metadata_util.py @@ -206,7 +206,7 @@ current_repository_name == ancestor_repository_name and \ current_repository_owner == ancestor_repository_owner and \ current_changeset_revision == ancestor_changeset_revision and \ - current_prior_installation_required == ancestor_prior_installation_required: + util.string_as_bool( current_prior_installation_required ) == util.string_as_bool( ancestor_prior_installation_required ): found_in_current = True break if not found_in_current: @@ -771,7 +771,7 @@ else: # Append the error_message to the repository dependencies tuple. toolshed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup - repository_dependency_tup = ( toolshed, name, owner, changeset_revision, prior_installation_required, error_message ) + repository_dependency_tup = ( toolshed, name, owner, changeset_revision, str( prior_installation_required ), error_message ) invalid_repository_dependency_tups.append( repository_dependency_tup ) if invalid_repository_dependency_tups: invalid_repository_dependencies_dict[ 'repository_dependencies' ] = invalid_repository_dependency_tups @@ -823,7 +823,7 @@ tool_dependency_is_valid = False # Append the error message to the invalid repository dependency tuple. toolshed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup - repository_dependency_tup = ( toolshed, name, owner, changeset_revision, prior_installation_required, message ) + repository_dependency_tup = ( toolshed, name, owner, changeset_revision, str( prior_installation_required ), message ) invalid_repository_dependency_tups.append( repository_dependency_tup ) error_message = '%s %s' % ( error_message, message ) elif elem.tag == 'set_environment': @@ -1112,7 +1112,7 @@ owner = repository_elem.get( 'owner' ) changeset_revision = repository_elem.get( 'changeset_revision' ) prior_installation_required = str( repository_elem.get( 'prior_installation_required', False ) ) - repository_dependency_tup = [ toolshed, name, owner, changeset_revision, prior_installation_required ] + repository_dependency_tup = [ toolshed, name, owner, changeset_revision, str( prior_installation_required ) ] user = None repository = None if app.name == 'galaxy': @@ -1699,8 +1699,8 @@ else: log.debug( "Successfully reset metadata on repository %s" % repository.name ) successful_count += 1 - except Exception, e: - log.debug( "Error attempting to reset metadata on repository: %s" % str( e ) ) + except: + log.exception( "Error attempting to reset metadata on repository %s", repository.name ) unsuccessful_count += 1 message = "Successfully reset metadata on %d %s. " % ( successful_count, inflector.cond_plural( successful_count, "repository" ) ) if unsuccessful_count: @@ -1929,7 +1929,6 @@ tool_shed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup else: tool_shed, name, owner, changeset_revision, prior_installation_required, error_message = repository_dependency_tup - prior_installation_required = util.asbool( str( prior_installation_required ) ) if repository_dependencies_dict: repository_dependencies = repository_dependencies_dict.get( 'repository_dependencies', [] ) for repository_dependency_tup in repository_dependency_tups: diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/tool_shed/util/repository_dependency_util.py --- a/lib/tool_shed/util/repository_dependency_util.py +++ b/lib/tool_shed/util/repository_dependency_util.py @@ -372,7 +372,7 @@ changeset_revision ) if repository_metadata: new_key_rd_dict = {} - new_key_rd_dict[ key ] = [ rd_toolshed, rd_name, rd_owner, repository_metadata.changeset_revision, rd_prior_installation_required ] + new_key_rd_dict[ key ] = [ rd_toolshed, rd_name, rd_owner, repository_metadata.changeset_revision, str( rd_prior_installation_required ) ] # We have the updated changset revision. updated_key_rd_dicts.append( new_key_rd_dict ) else: @@ -681,7 +681,7 @@ def get_repository_dependency_as_key( repository_dependency ): tool_shed, name, owner, changeset_revision, prior_installation_required = suc.parse_repository_dependency_tuple( repository_dependency ) - return container_util.generate_repository_dependencies_key_for_repository( tool_shed, name, owner, changeset_revision, prior_installation_required ) + return container_util.generate_repository_dependencies_key_for_repository( tool_shed, name, owner, changeset_revision, str( prior_installation_required ) ) def get_repository_dependency_by_repository_id( trans, decoded_repository_id ): return trans.sa_session.query( trans.model.RepositoryDependency ) \ diff -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 -r c666aa204369e3c36498e1d4211e1ec591c3aeeb lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -1060,7 +1060,7 @@ prior_installation_required = False elif len( repository_dependency_tuple ) == 6: toolshed, name, owner, changeset_revision, prior_installation_required, error = repository_dependency_tuple - prior_installation_required = util.asbool( str( prior_installation_required ) ) + prior_installation_required = str( prior_installation_required ) return toolshed, name, owner, changeset_revision, prior_installation_required, error else: if len( repository_dependency_tuple ) == 4: @@ -1070,7 +1070,7 @@ prior_installation_required = False elif len( repository_dependency_tuple ) == 5: tool_shed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tuple - prior_installation_required = util.asbool( str( prior_installation_required ) ) + prior_installation_required = str( prior_installation_required ) return tool_shed, name, owner, changeset_revision, prior_installation_required def pretty_print( dict=None ): https://bitbucket.org/galaxy/galaxy-central/commits/f639dfdbf3a8/ Changeset: f639dfdbf3a8 User: Dave Bouvier Date: 2013-05-28 15:53:59 Summary: Merged in fixes from next-stable. Affected #: 6 files diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/galaxy/webapps/tool_shed/util/container_util.py --- a/lib/galaxy/webapps/tool_shed/util/container_util.py +++ b/lib/galaxy/webapps/tool_shed/util/container_util.py @@ -68,7 +68,7 @@ repository_name=name, repository_owner=owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required ) + prior_installation_required=asbool( prior_installation_required ) ) class DataManager( object ): @@ -467,7 +467,7 @@ repository_name=name, repository_owner=owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required, + prior_installation_required=asbool( prior_installation_required ), error=error ) folder.invalid_repository_dependencies.append( ird ) invalid_repository_dependencies_folder.folders.append( folder ) @@ -1329,7 +1329,7 @@ repository_name=repository_name, repository_owner=repository_owner, changeset_revision=changeset_revision, - prior_installation_required=prior_installation_required, + prior_installation_required=asbool( prior_installation_required ), installation_status=installation_status, tool_shed_repository_id=tool_shed_repository_id ) # Insert the repository_dependency into the folder. @@ -1339,7 +1339,7 @@ def is_subfolder_of( folder, repository_dependency ): toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required = \ suc.parse_repository_dependency_tuple( repository_dependency ) - key = generate_repository_dependencies_key_for_repository( toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required ) + key = generate_repository_dependencies_key_for_repository( toolshed, repository_name, repository_owner, changeset_revision, asbool( prior_installation_required ) ) for sub_folder in folder.folders: if key == sub_folder.key: return True diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/tool_shed/galaxy_install/repository_util.py --- a/lib/tool_shed/galaxy_install/repository_util.py +++ b/lib/tool_shed/galaxy_install/repository_util.py @@ -4,6 +4,7 @@ import tempfile import threading from galaxy import tools +from galaxy.util import asbool from galaxy.util import json from galaxy import web from galaxy.model.orm import or_ @@ -214,7 +215,7 @@ continue for rd_tup in rd_tups: tool_shed, name, owner, changeset_revision, prior_installation_required = suc.parse_repository_dependency_tuple( rd_tup ) - if prior_installation_required: + if asbool( prior_installation_required ): repository = suc.get_repository_for_dependency_relationship( trans.app, tool_shed, name, owner, changeset_revision ) if repository: encoded_repository_id = trans.security.encode_id( repository.id ) diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/tool_shed/util/common_install_util.py --- a/lib/tool_shed/util/common_install_util.py +++ b/lib/tool_shed/util/common_install_util.py @@ -202,7 +202,7 @@ tmp_repo_info_tuple = ( None, tmp_clone_url, changeset_revision, None, owner, None, None ) repository, current_changeset_revision = suc.repository_was_previously_installed( trans, tool_shed, name, tmp_repo_info_tuple ) if repository: - new_rd_tup = [ tool_shed, name, owner, changeset_revision, prior_installation_required, repository.id, repository.status ] + new_rd_tup = [ tool_shed, name, owner, changeset_revision, str( prior_installation_required ), repository.id, repository.status ] if repository.status == trans.model.ToolShedRepository.installation_status.INSTALLED: if new_rd_tup not in installed_rd_tups: installed_rd_tups.append( new_rd_tup ) @@ -210,7 +210,7 @@ if new_rd_tup not in missing_rd_tups: missing_rd_tups.append( new_rd_tup ) else: - new_rd_tup = [ tool_shed, name, owner, changeset_revision, prior_installation_required, None, 'Never installed' ] + new_rd_tup = [ tool_shed, name, owner, changeset_revision, str( prior_installation_required ), None, 'Never installed' ] if new_rd_tup not in missing_rd_tups: missing_rd_tups.append( new_rd_tup ) if installed_rd_tups: diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/tool_shed/util/metadata_util.py --- a/lib/tool_shed/util/metadata_util.py +++ b/lib/tool_shed/util/metadata_util.py @@ -206,7 +206,7 @@ current_repository_name == ancestor_repository_name and \ current_repository_owner == ancestor_repository_owner and \ current_changeset_revision == ancestor_changeset_revision and \ - current_prior_installation_required == ancestor_prior_installation_required: + util.string_as_bool( current_prior_installation_required ) == util.string_as_bool( ancestor_prior_installation_required ): found_in_current = True break if not found_in_current: @@ -771,7 +771,7 @@ else: # Append the error_message to the repository dependencies tuple. toolshed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup - repository_dependency_tup = ( toolshed, name, owner, changeset_revision, prior_installation_required, error_message ) + repository_dependency_tup = ( toolshed, name, owner, changeset_revision, str( prior_installation_required ), error_message ) invalid_repository_dependency_tups.append( repository_dependency_tup ) if invalid_repository_dependency_tups: invalid_repository_dependencies_dict[ 'repository_dependencies' ] = invalid_repository_dependency_tups @@ -823,7 +823,7 @@ tool_dependency_is_valid = False # Append the error message to the invalid repository dependency tuple. toolshed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup - repository_dependency_tup = ( toolshed, name, owner, changeset_revision, prior_installation_required, message ) + repository_dependency_tup = ( toolshed, name, owner, changeset_revision, str( prior_installation_required ), message ) invalid_repository_dependency_tups.append( repository_dependency_tup ) error_message = '%s %s' % ( error_message, message ) elif elem.tag == 'set_environment': @@ -1112,7 +1112,7 @@ owner = repository_elem.get( 'owner' ) changeset_revision = repository_elem.get( 'changeset_revision' ) prior_installation_required = str( repository_elem.get( 'prior_installation_required', False ) ) - repository_dependency_tup = [ toolshed, name, owner, changeset_revision, prior_installation_required ] + repository_dependency_tup = [ toolshed, name, owner, changeset_revision, str( prior_installation_required ) ] user = None repository = None if app.name == 'galaxy': @@ -1699,8 +1699,8 @@ else: log.debug( "Successfully reset metadata on repository %s" % repository.name ) successful_count += 1 - except Exception, e: - log.debug( "Error attempting to reset metadata on repository: %s" % str( e ) ) + except: + log.exception( "Error attempting to reset metadata on repository %s", repository.name ) unsuccessful_count += 1 message = "Successfully reset metadata on %d %s. " % ( successful_count, inflector.cond_plural( successful_count, "repository" ) ) if unsuccessful_count: @@ -1929,7 +1929,6 @@ tool_shed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tup else: tool_shed, name, owner, changeset_revision, prior_installation_required, error_message = repository_dependency_tup - prior_installation_required = util.asbool( str( prior_installation_required ) ) if repository_dependencies_dict: repository_dependencies = repository_dependencies_dict.get( 'repository_dependencies', [] ) for repository_dependency_tup in repository_dependency_tups: diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/tool_shed/util/repository_dependency_util.py --- a/lib/tool_shed/util/repository_dependency_util.py +++ b/lib/tool_shed/util/repository_dependency_util.py @@ -372,7 +372,7 @@ changeset_revision ) if repository_metadata: new_key_rd_dict = {} - new_key_rd_dict[ key ] = [ rd_toolshed, rd_name, rd_owner, repository_metadata.changeset_revision, rd_prior_installation_required ] + new_key_rd_dict[ key ] = [ rd_toolshed, rd_name, rd_owner, repository_metadata.changeset_revision, str( rd_prior_installation_required ) ] # We have the updated changset revision. updated_key_rd_dicts.append( new_key_rd_dict ) else: @@ -681,7 +681,7 @@ def get_repository_dependency_as_key( repository_dependency ): tool_shed, name, owner, changeset_revision, prior_installation_required = suc.parse_repository_dependency_tuple( repository_dependency ) - return container_util.generate_repository_dependencies_key_for_repository( tool_shed, name, owner, changeset_revision, prior_installation_required ) + return container_util.generate_repository_dependencies_key_for_repository( tool_shed, name, owner, changeset_revision, str( prior_installation_required ) ) def get_repository_dependency_by_repository_id( trans, decoded_repository_id ): return trans.sa_session.query( trans.model.RepositoryDependency ) \ diff -r 31714646a7b441f34a43748065278a1b08940c3c -r f639dfdbf3a844ad54eba487afe71d8c100f15d2 lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -1060,7 +1060,7 @@ prior_installation_required = False elif len( repository_dependency_tuple ) == 6: toolshed, name, owner, changeset_revision, prior_installation_required, error = repository_dependency_tuple - prior_installation_required = util.asbool( str( prior_installation_required ) ) + prior_installation_required = str( prior_installation_required ) return toolshed, name, owner, changeset_revision, prior_installation_required, error else: if len( repository_dependency_tuple ) == 4: @@ -1070,7 +1070,7 @@ prior_installation_required = False elif len( repository_dependency_tuple ) == 5: tool_shed, name, owner, changeset_revision, prior_installation_required = repository_dependency_tuple - prior_installation_required = util.asbool( str( prior_installation_required ) ) + prior_installation_required = str( prior_installation_required ) return tool_shed, name, owner, changeset_revision, prior_installation_required def pretty_print( dict=None ): 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)
-
commits-noreply@bitbucket.org