commit/galaxy-central: greg: Fix query filters for various Tool Shed "latest revision" grids by making sure revisions have actually been tested by the install and test framework, and not sure prepared the framework's preparation scripts.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/26b9fe985ee7/ Changeset: 26b9fe985ee7 User: greg Date: 2014-05-16 15:48:50 Summary: Fix query filters for various Tool Shed "latest revision" grids by making sure revisions have actually been tested by the install and test framework, and not sure prepared the framework's preparation scripts. Affected #: 1 file diff -r 7e95105c466051432e5c47ff977826a19758b867 -r 26b9fe985ee718ddf25ee2e9e9d5096e8b315fad lib/tool_shed/grids/repository_grids.py --- a/lib/tool_shed/grids/repository_grids.py +++ b/lib/tool_shed/grids/repository_grids.py @@ -1940,8 +1940,8 @@ of type repository_suite_definition and tool_dependency_definition. """ repository_metadata = get_latest_downloadable_repository_metadata_if_it_includes_tools( trans, repository ) - if repository_metadata \ - and repository_metadata.tool_test_results is not None \ + if repository_metadata is not None \ + and has_been_tested( repository_metadata ) \ and not repository_metadata.missing_test_components \ and not repository_metadata.tools_functionally_correct \ and not repository_metadata.test_install_error: @@ -1957,7 +1957,9 @@ tool_dependency_definition. """ repository_metadata = get_latest_downloadable_repository_metadata_if_it_includes_tools( trans, repository ) - if repository_metadata and repository_metadata.missing_test_components: + if repository_metadata is not None \ + and has_been_tested( repository_metadata ) \ + and repository_metadata.missing_test_components: return repository_metadata.changeset_revision return None @@ -1968,9 +1970,10 @@ and tool_dependency_definition. """ repository_metadata = get_latest_downloadable_repository_metadata_if_it_includes_tools( trans, repository ) - if repository_metadata is not None and \ - not repository_metadata.missing_test_components and \ - repository_metadata.tools_functionally_correct: + if repository_metadata is not None \ + and has_been_tested( repository_metadata ) \ + and not repository_metadata.missing_test_components \ + and repository_metadata.tools_functionally_correct: return repository_metadata.changeset_revision return None @@ -1993,7 +1996,9 @@ """ repository_metadata = get_latest_downloadable_repository_metadata_if_it_has_test_install_errors( trans, repository ) # Filter further by eliminating repositories that are missing test components. - if repository_metadata is not None and not repository_metadata.missing_test_components: + if repository_metadata is not None \ + and has_been_tested( repository_metadata ) \ + and not repository_metadata.missing_test_components: return repository_metadata.changeset_revision return None @@ -2067,7 +2072,9 @@ well as types repository_suite_definition and tool_dependency_definition. """ repository_metadata = get_latest_downloadable_repository_metadata( trans, repository ) - if repository_metadata is not None and repository_metadata.test_install_error: + if repository_metadata is not None \ + and has_been_tested( repository_metadata ) \ + and repository_metadata.test_install_error: return repository_metadata return None @@ -2104,3 +2111,25 @@ if metadata is not None and 'invalid_tools' in metadata: return repository_metadata return None + +def has_been_tested( repository_metadata ): + """ + Return True if the received repository_metadata record'd tool_test_results column was populated by + the Tool Shed's install and test framework. + """ + tool_test_results = repository_metadata.tool_test_results + if tool_test_results is None: + return False + # The install and test framework's preparation scripts will populate the tool_test_results column + # with something like this: + # [{"test_environment": + # {"time_tested": "2014-05-15 16:15:18", + # "tool_shed_database_version": 22, + # "tool_shed_mercurial_version": "2.2.3", + # "tool_shed_revision": "13459:9a1415f8108f"} + # }] + tool_test_results = listify( tool_test_results ) + for test_results_dict in tool_test_results: + if len( test_results_dict ) > 1: + return True + return False 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