1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/18dacdf8674e/ Changeset: 18dacdf8674e User: martenson Date: 2015-01-30 18:21:35+00:00 Summary: degrade Whoosh egg to 2.4.1, adjust util fnc for pretty intervals remove debugs Affected #: 3 files diff -r 75739a5f696e57362238ec5c022a17963dd31929 -r 18dacdf8674e21c5e9a2bb61036382e44f6842bc eggs.ini --- a/eggs.ini +++ b/eggs.ini @@ -73,7 +73,7 @@ wsgiref = 0.1.2 Babel = 1.3 wchartype = 0.1 -Whoosh = 2.5.7 +Whoosh = 2.4.1 ; fluent_logger = 0.3.3 raven = 3.1.8 diff -r 75739a5f696e57362238ec5c022a17963dd31929 -r 18dacdf8674e21c5e9a2bb61036382e44f6842bc lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -371,7 +371,7 @@ if second_diff < 86400: return str(second_diff / 3600) + " hours ago" if day_diff == 1: - return "Yesterday" + return "yesterday" if day_diff < 7: return str( day_diff ) + " days ago" if day_diff < 31: @@ -381,16 +381,16 @@ return str( day_diff / 365 ) + " years ago" else: if day_diff == 0: - return "Today" + return "today" if day_diff == 1: - return "Yesterday" + return "yesterday" if day_diff < 7: - return "this week" + return "less than a week" if day_diff < 31: - return "this month" + return "less than a month" if day_diff < 365: - return "this year" - return str( day_diff / 365 ) + " years ago" + return "less than a year" + return "a few years ago" def pretty_print_json(json_data, is_json_string=False): diff -r 75739a5f696e57362238ec5c022a17963dd31929 -r 18dacdf8674e21c5e9a2bb61036382e44f6842bc lib/galaxy/webapps/tool_shed/search/repo_search.py --- a/lib/galaxy/webapps/tool_shed/search/repo_search.py +++ b/lib/galaxy/webapps/tool_shed/search/repo_search.py @@ -45,7 +45,7 @@ use_final = True def final( self, searcher, docnum, score ): - log.debug('score before: ' + str(score) ) + # log.debug('score before: ' + str(score) ) # Arbitrary for now reasonable_hits = 100.0 @@ -59,15 +59,15 @@ if times_downloaded == 0: times_downloaded = 1 popularity_modifier = ( times_downloaded / reasonable_hits ) - log.debug('popularity_modifier: ' + str(popularity_modifier) ) + # log.debug('popularity_modifier: ' + str(popularity_modifier) ) cert_modifier = 2 if searcher.stored_fields( docnum )[ "approved" ] == 'yes' else 1 - log.debug('cert_modifier: ' + str(cert_modifier) ) + # log.debug('cert_modifier: ' + str(cert_modifier) ) # Adjust the computed score for this document by the popularity # and by the certification level. final_score = score * popularity_modifier * cert_modifier - log.debug('score after: ' + str( final_score ) ) + # log.debug('score after: ' + str( final_score ) ) return final_score @@ -108,16 +108,14 @@ 'remote_repository_url', 'repo_owner_username' ], schema = schema ) - # user_query = parser.parse( search_term ) user_query = parser.parse( '*' + search_term + '*' ) + hits = searcher.search_page( user_query, page, pagelen = 10, terms = True ) - # hits = searcher.search( user_query, terms = True ) - hits = searcher.search_page( user_query, page, pagelen = 10, terms = True ) log.debug( 'searching for: #' + str( search_term ) ) log.debug( 'total hits: ' + str( len( hits ) ) ) log.debug( 'scored hits: ' + str( hits.scored_length() ) ) results = {} - results[ 'total_results'] = str( hits.scored_length() ) + results[ 'total_results'] = str( len( hits ) ) results[ 'hits' ] = [] for hit in hits: hit_dict = {} 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.