commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f3bb3c093851/ Changeset: f3bb3c093851 Branch: next-stable User: Dave Bouvier Date: 2013-05-29 21:24:52 Summary: Make the functional test results RSS feed output properly formatted data. Affected #: 1 file diff -r a6f688dade808b0e16903fbb50186ad9656c0d1c -r f3bb3c093851c7b07b8d24bfcfa30e986298fb89 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -1468,25 +1468,39 @@ trans.model.Repository.table.c.user_id == user.id ) ): if not metadata_row.tool_test_results: continue + current_repository_errors = [] + tool_dependency_errors = [] + repository_dependency_errors = [] + description_lines = [] # Per the RSS 2.0 specification, all dates in RSS feeds must be formatted as specified in RFC 822 # section 5.1, e.g. Sat, 07 Sep 2002 00:00:01 UT time_tested = metadata_row.time_last_tested.strftime( '%a, %d %b %Y %H:%M:%S UT' ) repository = metadata_row.repository # Generate a citable URL for this repository with owner and changeset revision. repository_citable_url = suc.url_join( tool_shed_url, 'view', user.username, repository.name, metadata_row.changeset_revision ) - title = 'Functional test results for changeset revision %s of %s' % ( metadata_row.changeset_revision, repository.name ) passed_tests = len( metadata_row.tool_test_results.get( 'passed_tests', [] ) ) failed_tests = len( metadata_row.tool_test_results.get( 'failed_tests', [] ) ) missing_test_components = len( metadata_row.tool_test_results.get( 'missing_test_components', [] ) ) - description = '%d tests passed, %d tests failed, %d tests missing test components.' % \ - ( passed_tests, failed_tests, missing_test_components ) + installation_errors = metadata_row.tool_test_results.get( 'installation_errors', [] ) + if installation_errors: + tool_dependency_errors = installation_errors.get( 'tool_dependencies', [] ) + repository_dependency_errors = installation_errors.get( 'repository_dependencies', [] ) + current_repository_errors = installation_errors.get( 'current_repository', [] ) + description_lines.append( '%d tests passed, %d tests failed, %d tests missing test components.' % \ + ( passed_tests, failed_tests, missing_test_components ) ) + if current_repository_errors: + description_lines.append( '\nThis repository did not install correctly. ' ) + if tool_dependency_errors or repository_dependency_errors: + description_lines.append( '\n%d tool dependencies and %d repository dependencies failed to install. ' % \ + len( tool_dependency_errors ), len( repository_dependency_errors ) ) + title = 'Revision %s of %s' % ( metadata_row.changeset_revision, repository.name ) # The guid attribute in an RSS feed's list of items allows a feed reader to choose not to show an item as updated # if the guid is unchanged. For functional test results, the citable URL is sufficiently unique to enable # that behavior. functional_test_results.append( dict( title=title, guid=repository_citable_url, link=repository_citable_url, - description=description, + description='\n'.join( description_lines ), pubdate=time_tested ) ) trans.response.set_content_type( 'application/rss+xml' ) return trans.fill_template( '/rss.mako', https://bitbucket.org/galaxy/galaxy-central/commits/07a135ce18a7/ Changeset: 07a135ce18a7 User: Dave Bouvier Date: 2013-05-29 21:25:38 Summary: Merge with next-stable. Affected #: 1 file diff -r e3455a0928824b8ef0fb8f9337e3b0a1d194d2ed -r 07a135ce18a7e40009fe93654ce46030ff213799 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -1458,25 +1458,39 @@ trans.model.Repository.table.c.user_id == user.id ) ): if not metadata_row.tool_test_results: continue + current_repository_errors = [] + tool_dependency_errors = [] + repository_dependency_errors = [] + description_lines = [] # Per the RSS 2.0 specification, all dates in RSS feeds must be formatted as specified in RFC 822 # section 5.1, e.g. Sat, 07 Sep 2002 00:00:01 UT time_tested = metadata_row.time_last_tested.strftime( '%a, %d %b %Y %H:%M:%S UT' ) repository = metadata_row.repository # Generate a citable URL for this repository with owner and changeset revision. repository_citable_url = suc.url_join( tool_shed_url, 'view', user.username, repository.name, metadata_row.changeset_revision ) - title = 'Functional test results for changeset revision %s of %s' % ( metadata_row.changeset_revision, repository.name ) passed_tests = len( metadata_row.tool_test_results.get( 'passed_tests', [] ) ) failed_tests = len( metadata_row.tool_test_results.get( 'failed_tests', [] ) ) missing_test_components = len( metadata_row.tool_test_results.get( 'missing_test_components', [] ) ) - description = '%d tests passed, %d tests failed, %d tests missing test components.' % \ - ( passed_tests, failed_tests, missing_test_components ) + installation_errors = metadata_row.tool_test_results.get( 'installation_errors', [] ) + if installation_errors: + tool_dependency_errors = installation_errors.get( 'tool_dependencies', [] ) + repository_dependency_errors = installation_errors.get( 'repository_dependencies', [] ) + current_repository_errors = installation_errors.get( 'current_repository', [] ) + description_lines.append( '%d tests passed, %d tests failed, %d tests missing test components.' % \ + ( passed_tests, failed_tests, missing_test_components ) ) + if current_repository_errors: + description_lines.append( '\nThis repository did not install correctly. ' ) + if tool_dependency_errors or repository_dependency_errors: + description_lines.append( '\n%d tool dependencies and %d repository dependencies failed to install. ' % \ + len( tool_dependency_errors ), len( repository_dependency_errors ) ) + title = 'Revision %s of %s' % ( metadata_row.changeset_revision, repository.name ) # The guid attribute in an RSS feed's list of items allows a feed reader to choose not to show an item as updated # if the guid is unchanged. For functional test results, the citable URL is sufficiently unique to enable # that behavior. functional_test_results.append( dict( title=title, guid=repository_citable_url, link=repository_citable_url, - description=description, + description='\n'.join( description_lines ), pubdate=time_tested ) ) trans.response.set_content_type( 'application/rss+xml' ) return trans.fill_template( '/rss.mako', 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